GNOME Bugzilla – Bug 628746
souphttpsrc: Don't do manual proxy configuration from environment variable but depend on libsoup doing the right thing
Last modified: 2018-11-03 14:42:35 UTC
The gstreamer soup extension sets the proxy value from the environment, however in the event of a pac config, it sets an inappropriate value which results in a name resolution failure in libsoup when trying to use the badly-configured proxy value.
One of the effects of this is that rhythmbox cannot stream last.fm through a proxy. It always whines about a proxy name resolution failure.
If you comment out every call to gst_soup_http_src_set_proxy inside gst-plugins-good/ext/soup/gstsouphttpsrc.c it streams correctly. libsoup handles environment and configured proxies itself, so I think that attempting to set libsoup's proxy from the env in gstreamer is redundant.
GLib HEAD has had proxy support merged. Hopefully we can use that in the future. Well, hopefully libsoup will use gio and will do it all for us.
I probably should say I noticed and played with the above mentioned workaround in the latest Ubuntu source distributed versions of things. Can anyone give an ETA for when the Ubuntu released version will be fixed? (whether through a workaround like mine, or the GLib proxy support changes)
libsoup only handles the proxy configuration by itself if you use libsoup-gnome IIRC. But yes, everything would be much better if it used libproxy or the GLib proxy support
The proxy can be specified on "proxy" property from the applications pov.
Still the code is a bit weird.
1.) the "proxy" property is by default ""
2.) _init() initializes it from getenv("http_proxy")
3.) in _set_properties() we forbid to pass NULL
The only way the app can avoid the use of the anv-var is to unset it early.
Regarding comment #1. libsoup is *not* handling the environment and configured proxies itself. For that one has to use libsoup-gnome, get a SoupProxyResolverGNOME and pass that to libsoup.
...and now it handles the proxy configuration via GIO extensions. Is there anything still to be done here?
> ...and now it handles the proxy configuration via GIO extensions. Is there
> anything still to be done here?
Does that mean we should remove the getenv("http_proxy") stuff from souphttpsrc/sink then?
Assuming we require new enough GLib, we should not have any code around env or dconf, or configuration file. We should double check that the GProxyResolver is being used, and that forcing a proxy through property properly avoid it.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/33.