Don't add .onion if it is not needed
This commit is contained in:
parent
9088d931c9
commit
946fdbd06d
@ -20,6 +20,9 @@ def on_announce_rec(api, data=None):
|
||||
return
|
||||
|
||||
announced = announced.strip()
|
||||
announced += '.onion'
|
||||
if not announced.endswith('.onion'):
|
||||
announced += '.onion'
|
||||
|
||||
logger.info(f"Peer {announced} announced to us.", terminal=True)
|
||||
|
||||
data['callback'](TorPeer(socks_address, socks_port, announced))
|
||||
|
Loading…
Reference in New Issue
Block a user