network: remove resolver monkey-patch as no local hostname lookups are performed when
enabling SOCKS5 proxy.
This commit is contained in:
@@ -1268,7 +1268,7 @@ def make_aiohttp_session(proxy: Optional[dict], headers=None, timeout=None):
|
||||
port=int(proxy['port']),
|
||||
username=proxy.get('user', None),
|
||||
password=proxy.get('password', None),
|
||||
rdns=True,
|
||||
rdns=True, # needed to prevent DNS leaks over proxy
|
||||
ssl=ssl_context,
|
||||
)
|
||||
else:
|
||||
@@ -1885,6 +1885,8 @@ class NetworkRetryManager(Generic[_NetAddrType]):
|
||||
|
||||
|
||||
class MySocksProxy(aiorpcx.SOCKSProxy):
|
||||
# note: proxy will not leak DNS as create_connection()
|
||||
# sets (local DNS) resolve=False by default
|
||||
|
||||
async def open_connection(self, host=None, port=None, **kwargs):
|
||||
loop = asyncio.get_running_loop()
|
||||
|
||||
Reference in New Issue
Block a user