After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783012 - souphttpsrc: doesn't support socks5 proxy
souphttpsrc: doesn't support socks5 proxy
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-23 19:02 UTC by Nick
Modified: 2017-06-29 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
souphttpsrc: Allow any type of proxy (1.09 KB, patch)
2017-06-29 19:24 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Nick 2017-05-23 19:02:30 UTC
If you try the following:
gst-launch-1.0 souphttpsrc location="http://example.com" proxy="socks5://localhost:8888" ! fakesink

The output is:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0: Could not resolve server name.
Additional debug info:
gstsouphttpsrc.c(1270): gst_soup_http_src_parse_status (): /GstPipeline:pipeline0/GstSoupHTTPSrc:souphttpsrc0:
Error resolving “socks5”: Name or service not known (2), URL: http://example.com, Redirect to: (NULL)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...


The problem is that gstreamer checks if the proxy starts with http:// and if not, prepends it.  It probably should just check for some scheme (includes a ://) and only prepend if not.
Comment 1 Sebastian Dröge (slomo) 2017-05-25 09:41:11 UTC
Do you want to provide a patch? With the GstUri API you can parse the URI, or just check if it's valid, and only otherwise prepend http://
Comment 2 Nick 2017-05-29 17:15:30 UTC
I'll see if I can find some time to make a patch, but I'm not sure when that will be.
Comment 3 Nicolas Dufresne (ndufresne) 2017-06-29 19:24:34 UTC
Created attachment 354707 [details] [review]
souphttpsrc: Allow any type of proxy

Currently we only allowed HTTP proxy. Don't filter for the scheme, just check
if it looks like an URI. Soup will warn if the URI is invalid or if
proxy protocol is not supported. This enables using SOCKS 4/5 which is
directly implemented into GIO.
Comment 4 Nicolas Dufresne (ndufresne) 2017-06-29 19:26:50 UTC
Thanks for reporting.

Attachment 354707 [details] pushed as 52eb761 - souphttpsrc: Allow any type of proxy