mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +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), '
|
log.error('Cannot use socks proxy (SocksiPy not installed), '
|
||||||
'using direct connection instead.')
|
'using direct connection instead.')
|
||||||
socks_proxy = ''
|
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:
|
else:
|
||||||
try:
|
try:
|
||||||
address = utils.net.getAddressFromHostname(
|
address = utils.net.getAddressFromHostname(
|
||||||
|
Loading…
Reference in New Issue
Block a user