Open CeruleanSky opened 8 years ago
Please try this branch: https://github.com/yan12125/youtube-dl/tree/unquote-socks-credentials. It should correctly restore encoded values before passing to SOCKS servers.
@yan12125 Your patch works well. The uri scheme now behaves how it should and I was able to authenticate, at least for socks5 and download the video. Thank you.
I'll still leave this open in case somebody wants to move out the username/password into their own command line parameters to make it easier for other end users.
Thanks for helping testing! The fix will be included in the next version.
To developers: --proxy-user
and --proxy-pass
is useful, but it seems not easy to implement without Python's undocumented API _parse_proxy()
.
What is the purpose of your issue?
Description of your issue, suggested solution and other information
http proxy authentication works fine with this URI scheme, https has always failed, maybe it can be fixed also or made into another issue ticket.
Socks5 support seems to fail when trying to authenticate. I've included the verbose output. Also I suggest due to many usernames being email addresses taking the username/password parameters into their own command line switches. Otherwise users have to know that they need to encode their characters and be familiar with URI specification to use a username and password. Also decoding URIs can come with issues especially in experimental implementations.
This was done in a windows command prompt and I saved the parameters to a batch file so sometimes the % need additional escaping(%%40 for @ in a batch file, %40 from the command line). when composing the URIs
The suggestion is that the username and password be moved out to their own parameters, such as --proxy-user --proxy-pass
This way http,https,and socks5 proxies with passwords can be sure to work even with lots of @ signs, etc, and users don't have to guess which characters are allowed and are not, less likely to have to deal with shell + URI escaping rules(though if % is still used, that is another issue), and having to deal with both.