From 770b77ea51fe87b75641193d6e1642b7b682c9b4 Mon Sep 17 00:00:00 2001 From: user234684 <74376318+user234684@users.noreply.github.com> Date: Thu, 12 Nov 2020 18:55:43 +0000 Subject: use Tor to resolve domain names --- youtube/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube/util.py') diff --git a/youtube/util.py b/youtube/util.py index 7bf03db..fe34d0b 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -61,7 +61,7 @@ class TorManager: def __init__(self): self.old_tor_connection_pool = None self.tor_connection_pool = urllib3.contrib.socks.SOCKSProxyManager( - 'socks5://127.0.0.1:' + str(settings.tor_port) + '/', + 'socks5h://127.0.0.1:' + str(settings.tor_port) + '/', cert_reqs = 'CERT_REQUIRED') self.tor_pool_refresh_time = time.monotonic() @@ -76,7 +76,7 @@ class TorManager: self.old_tor_connection_pool = self.tor_connection_pool self.tor_connection_pool = urllib3.contrib.socks.SOCKSProxyManager( - 'socks5://127.0.0.1:' + str(settings.tor_port) + '/', + 'socks5h://127.0.0.1:' + str(settings.tor_port) + '/', cert_reqs = 'CERT_REQUIRED') self.tor_pool_refresh_time = time.monotonic() -- cgit v1.2.3