mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Socket: Disable resolution when using a SOCKS proxy
1. Avoids leaking DNS queries 2. necessary for onion services
This commit is contained in:
parent
cca1156b90
commit
3bedc86479
@ -269,6 +269,11 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
log.error('Cannot use socks proxy (SocksiPy not installed), '
|
||||
'using direct connection instead.')
|
||||
socks_proxy = ''
|
||||
if socks_proxy:
|
||||
# Do not try to resolve, let the SOCKS proxy do it.
|
||||
# (Avoids leaking DNS queries *and* is necessary for onion
|
||||
# services)
|
||||
address = self.currentServer.hostname
|
||||
else:
|
||||
try:
|
||||
address = utils.net.getAddressFromHostname(
|
||||
|
Loading…
Reference in New Issue
Block a user