Merge pull request #38 from user234684/patch-1
use Tor to resolve domain names
This commit is contained in:
commit
13fef87f69
@ -61,7 +61,7 @@ class TorManager:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.old_tor_connection_pool = None
|
self.old_tor_connection_pool = None
|
||||||
self.tor_connection_pool = urllib3.contrib.socks.SOCKSProxyManager(
|
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')
|
cert_reqs = 'CERT_REQUIRED')
|
||||||
self.tor_pool_refresh_time = time.monotonic()
|
self.tor_pool_refresh_time = time.monotonic()
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class TorManager:
|
|||||||
self.old_tor_connection_pool = self.tor_connection_pool
|
self.old_tor_connection_pool = self.tor_connection_pool
|
||||||
|
|
||||||
self.tor_connection_pool = urllib3.contrib.socks.SOCKSProxyManager(
|
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')
|
cert_reqs = 'CERT_REQUIRED')
|
||||||
self.tor_pool_refresh_time = time.monotonic()
|
self.tor_pool_refresh_time = time.monotonic()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user