diff options
author | James Taylor <28744867+user234683@users.noreply.github.com> | 2020-11-12 12:20:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 12:20:21 -0800 |
commit | 13fef87f69d8fd6b95d25f24398e9a347abe7229 (patch) | |
tree | e0302eeb1975de89879d89c47f0a3fc4de3b520e /youtube/util.py | |
parent | 0589cfb8f76455ac76df91fca89ccf65e8f9beca (diff) | |
parent | 770b77ea51fe87b75641193d6e1642b7b682c9b4 (diff) | |
download | yt-local-13fef87f69d8fd6b95d25f24398e9a347abe7229.tar.lz yt-local-13fef87f69d8fd6b95d25f24398e9a347abe7229.tar.xz yt-local-13fef87f69d8fd6b95d25f24398e9a347abe7229.zip |
Merge pull request #38 from user234684/patch-1
use Tor to resolve domain names
Diffstat (limited to 'youtube/util.py')
-rw-r--r-- | youtube/util.py | 4 |
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() |