GNOME Bugzilla – Bug 706809
ostree tool does not work with proxy
Last modified: 2014-04-01 23:13:47 UTC
I both tried to set the global proxy variables http_proxy and https_proxy, and than I used the gnome network manager, and tried the command ostree admin upgrade --verbose both with root, and a normal user. Both fail, it takes for ever to get any reply. After some time I get the message: "ostree admin: Cannot connect to destination (build.gnome.org)" It seems there is no support for proxies. Other applications, like epiphany work, both with http:// and https:// , with websites from the WWW.
So...proxies are a bit of a mess. There's generic support in GLib for proxy resolution which typically has glib-networking's proxy resolver as a backend. But I'm not sure it respects the http_proxy environment variable. The architectural mess here is that for user sessions, we can rely on GSettings. But there's no such thing for root. It looks to me like PackageKit has some code to explicitly look at genv("http_proxy"); not clear to me if that's necessary for every libsoup-using app.
(In reply to comment #1) > So...proxies are a bit of a mess. There's generic support in GLib for proxy > resolution which typically has glib-networking's proxy resolver as a backend. I think it's fair to say that proxy handling [fullstop] is a mess. > It looks to me like PackageKit has some code to explicitly look at > genv("http_proxy"); not clear to me if that's necessary for every libsoup-using > app. So PackageKit supports two things: * A http_proxy setting in the config file * If the session user has started the transaction then the proxy details are sent along to the daemon (and stored) and used only for that user. This allows us to use the session proxy info in a system daemon. It's a hack. Really we want to have some kind of centralized proxy daemon like pacrunner, but I don't think that ever gained traction.
See also: https://mail.gnome.org/archives/gtk-devel-list/2014-March/msg00003.html I think all I want as a stopgap at the moment is to parse the http_proxy environment variable and set it as the default if ostree is running as root. In the future though it does make sense to me for processes running as root to ask NetworkManager.
https://git.gnome.org/browse/ostree/commit/?id=edc866520661d78704fb18e8866bdac56fe27a3e