Skip TLS also for incoming connections using tor
This commit is contained in:
parent
29c60a9317
commit
e03b11d66e
|
@ -265,6 +265,7 @@ class ConnectionBase(threading.Thread):
|
||||||
if ( # NODE_SSL
|
if ( # NODE_SSL
|
||||||
self.remote_version.services & 2 and self.network == 'ip'
|
self.remote_version.services & 2 and self.network == 'ip'
|
||||||
and not self.host.endswith('.onion')
|
and not self.host.endswith('.onion')
|
||||||
|
and not (self.server and shared.tor)
|
||||||
):
|
):
|
||||||
self._do_tls_handshake()
|
self._do_tls_handshake()
|
||||||
|
|
||||||
|
@ -415,7 +416,9 @@ class ConnectionBase(threading.Thread):
|
||||||
shared.services, version.host, shared.listening_port))
|
shared.services, version.host, shared.listening_port))
|
||||||
if self.server:
|
if self.server:
|
||||||
if self.network == 'ip':
|
if self.network == 'ip':
|
||||||
self.send_queue.put(message.Version(self.host, self.port))
|
version_kwargs = {'services': 1} if shared.tor else {}
|
||||||
|
self.send_queue.put(message.Version(
|
||||||
|
self.host, self.port, **version_kwargs))
|
||||||
else:
|
else:
|
||||||
self.send_queue.put(message.Version('127.0.0.1', 7656))
|
self.send_queue.put(message.Version('127.0.0.1', 7656))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user