From c8053dad54ead21c15698f7742fb3b91dde4c837 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 12 Jun 2021 21:03:15 +0200 Subject: [PATCH] Socket: Silence TLS warning for Tor hidden services. They are already end-to-end encrypted and don't need TLS. --- src/drivers/Socket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index 3aa177848..33e15dd68 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -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. '