Do not start TLS in onion connections
This commit is contained in:
parent
8105453861
commit
b5259d72c1
|
@ -79,9 +79,11 @@ class ConnectionBase(threading.Thread):
|
|||
self.s.settimeout(0)
|
||||
if not self.server:
|
||||
if self.network == 'ip':
|
||||
version_kwargs = (
|
||||
{'services': 1} if self.host.endswith('.onion') else {})
|
||||
self.send_queue.put(message.Version(
|
||||
('127.0.0.1' if shared.socks_proxy else self.host),
|
||||
self.port))
|
||||
self.port, **version_kwargs))
|
||||
else:
|
||||
self.send_queue.put(message.Version('127.0.0.1', 7656))
|
||||
while True:
|
||||
|
@ -260,8 +262,11 @@ class ConnectionBase(threading.Thread):
|
|||
'Established Bitmessage protocol connection to %s:%s',
|
||||
self.host_print, self.port)
|
||||
self.on_connection_fully_established_scheduled = False
|
||||
if self.remote_version.services & 2 and self.network == 'ip':
|
||||
self._do_tls_handshake() # NODE_SSL
|
||||
if ( # NODE_SSL
|
||||
self.remote_version.services & 2 and self.network == 'ip'
|
||||
and not self.host.endswith('.onion')
|
||||
):
|
||||
self._do_tls_handshake()
|
||||
|
||||
addr = {
|
||||
structure.NetAddr(c.remote_version.services, c.host, c.port)
|
||||
|
|
Loading…
Reference in New Issue
Block a user