Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
SOCKS proxy mechanism does not support IPv6 #15368
Comments
|
Temporary workaround: diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 386897a85..8743c901b 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1048,7 +1048,7 @@ def make_socks_conn_class(base_class, socks_proxy):
class SocksConnection(base_class):
def connect(self):
- self.sock = sockssocket()
+ self.sock = sockssocket(socket.AF_INET6)
self.sock.setproxy(*proxy_args)
if type(self.timeout) in (int, float):
self.sock.settimeout(self.timeout)Note to myself: use socket.create_connection() instead of socket.socket.connect(). The former detects IPv4/IPv6 automatically. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.01.18. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Description of your issue, suggested solution and other information
Does not work with proxy hostnames which resolve to IPv6 only.
Does not work with bare IPv6 specified (in brackets) instead of the hostname either. The error then becomes