From d472b71a91b1c22a163625bde43e6d9aaede0c9c Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Thu, 4 Jul 2024 02:47:52 +0300 Subject: [PATCH] Don't advertise own peer if run with --no-incoming or reported IP is 127.0.0.1 --- minode/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/minode/connection.py b/minode/connection.py index d2ecc12..a0f02eb 100644 --- a/minode/connection.py +++ b/minode/connection.py @@ -411,7 +411,10 @@ class ConnectionBase(threading.Thread): shared.node_pool.add((self.host, self.port)) elif self.network == 'i2p': shared.i2p_node_pool.add((self.host, 'i2p')) - if self.network == 'ip': + if ( + self.network == 'ip' and shared.listen_for_connections + and version.host != '127.0.0.1' + ): shared.address_advertise_queue.put(structure.NetAddr( shared.services, version.host, shared.listening_port)) if self.server: