From 756f85c9f0f1cc63ead23a7b402d650de5d94683 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Tue, 8 Nov 2016 08:49:43 +0100 Subject: [PATCH] Don't connect to yourself when hidden service --- src/class_outgoingSynSender.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/class_outgoingSynSender.py b/src/class_outgoingSynSender.py index 898f655a..5bef66c6 100644 --- a/src/class_outgoingSynSender.py +++ b/src/class_outgoingSynSender.py @@ -47,6 +47,9 @@ class outgoingSynSender(threading.Thread, StoppableThread): shared.knownNodesLock.release() if shared.config.get('bitmessagesettings', 'socksproxytype') != 'none': if peer.host.find(".onion") == -1: + # don't connect to self + if peer.host == shared.config.get('bitmessagesettings', 'onionhostname') and peer.port == shared.config.getint("bitmessagesettings", "onionport"): + continue priority /= 10 # hidden services have 10x priority over plain net elif peer.host.find(".onion") != -1: # onion address and so proxy continue