diff --git a/src/helper_bootstrap.py b/src/helper_bootstrap.py index d0de8622..fbb1a81b 100644 --- a/src/helper_bootstrap.py +++ b/src/helper_bootstrap.py @@ -52,6 +52,8 @@ def dns(): except: logger.error('bootstrap8444.bitmessage.org DNS bootstrapping failed.') elif shared.config.get('bitmessagesettings', 'socksproxytype') == 'SOCKS5': + shared.knownNodes[1][shared.Peer('quzwelsuziwqgpt2.onion', 8444)] = int(time.time()) + logger.debug("Adding quzwelsuziwqgpt2.onion:8444 to knownNodes.") for port in [8080, 8444]: logger.debug("Resolving %i through SOCKS...", port) address_family = socket.AF_INET diff --git a/src/shared.py b/src/shared.py index 249bd562..d5f8bad7 100644 --- a/src/shared.py +++ b/src/shared.py @@ -143,7 +143,9 @@ def isInSqlInventory(hash): return queryreturn != [] def encodeHost(host): - if host.find(':') == -1: + if host.find('.onion') > -1: + return '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF\x7F\x00\x00\x01' + elif host.find(':') == -1: return '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFF' + \ socket.inet_aton(host) else: