Socket: Silence TLS warning for Tor hidden services.

They are already end-to-end encrypted and don't need TLS.
This commit is contained in:
Valentin Lorentz 2021-06-12 21:03:15 +02:00
parent 69c948bd5f
commit c8053dad54

View File

@ -318,7 +318,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
# address is a hostname, eg. because we're using a SOCKS
# proxy
is_loopback = False
if not is_loopback:
if not is_loopback and not address.endswith('.onion'):
drivers.log.warning(('Connection to network %s '
'does not use SSL/TLS, which makes it vulnerable to '
'man-in-the-middle attacks and passive eavesdropping. '