GNOME Bugzilla – Bug 783012
souphttpsrc: doesn't support socks5 proxy
Last modified: 2017-06-29 19:28:18 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.
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://
I'll see if I can find some time to make a patch, but I'm not sure when that will be.
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.
Thanks for reporting. Attachment 354707 [details] pushed as 52eb761 - souphttpsrc: Allow any type of proxy