Skip to content

Workaround for ineffective network proxy settings #834

@mroi

Description

@mroi

What Happened?

Elementary apps like Web (i.e., Epiphany) should use the network proxy configured with switchboard, but they currently do not. I can verify this as follows:

> dbus-send --print-reply --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.ProxyResolver.Lookup string:https://example.com
method return time=1753364121.042409 sender=:1.60 -> destination=:1.120 serial=242 reply_serial=2
   array [
      string "direct://"
   ]

Meaning: No proxy is in use. The reason is in the implementation of the ProxyResolver portal within the xdg-desktop-portal service. It uses libproxy to determine the proxy configuration. libproxy however only reads the configuration from Dconf, when the XDG_CURRENT_DESKTOP variable is set to GNOME. For elementary OS, this variable is set to Pantheon, so libproxy will not use the configuration.

The proper long-term has been filed upstream with libproxy.

As an immediate workaround, I suggest to amend the entry DesktopNames in /usr/share/wayland-sessions/pantheon-wayland.desktop and /usr/share/xsessions/pantheon.desktop from Pantheon to Pantheon;GNOME. This causes XDG_CURRENT_DESKTOP to contain GNOME and libproxy will happily use the network proxy configuration.

Steps to Reproduce

  1. open switchboard, navigate to the network module, navigate to the proxy settings
  2. enable manual proxy configuration, enter localhost, port 9050
  3. open terminal and test proxy settings using the above DBus command

Expected Behavior

The DBus response from the ProxyResolver portal should show the SOCKS proxy being used.

OS Version

8.x (Circe)

OS Architecture

arm64 (on Raspberry Pi, Apple Silicon, etc.)

Session Type

Secure Session (Wayland)

Software Version

Latest release (I have run all updates)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions