aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser234684 <74376318+user234684@users.noreply.github.com>2020-11-12 18:55:43 +0000
committerGitHub <noreply@github.com>2020-11-12 18:55:43 +0000
commit770b77ea51fe87b75641193d6e1642b7b682c9b4 (patch)
treee0302eeb1975de89879d89c47f0a3fc4de3b520e
parent0589cfb8f76455ac76df91fca89ccf65e8f9beca (diff)
downloadyt-local-770b77ea51fe87b75641193d6e1642b7b682c9b4.tar.lz
yt-local-770b77ea51fe87b75641193d6e1642b7b682c9b4.tar.xz
yt-local-770b77ea51fe87b75641193d6e1642b7b682c9b4.zip
use Tor to resolve domain names
-rw-r--r--youtube/util.py4
1 files changed, 2 insertions, 2 deletions
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()