Filtering outgoing connections #5836
Replies: 1 comment 1 reply
-
Yes, that's most likely because of the identify behavior. If the peers have been connected before, they exchange all of their listening addresses via the identify protocol, which then caches the addresses it receives. IMO for identify it would make sense to filter loopback addresses from the list of addresses that are shared. We could make the filtering an config option so that in case that someone runs multiple nodes locally they can still enable it. cc @dariusc93 @jxs wdyt? Another protocol that also shares loopback addresses for dialing is MDNS, but there is already an ongoing discussion to change that #5790. |
Beta Was this translation helpful? Give feedback.
-
We are observing our bootstrap and relay nodes creating a large volume of requests to themselves attempting to dial other peers.
It appears this is caused by the swarm querying each behaviour for a list of multiaddress candidates for the remote peer, and one or more of those behaviours includes the loopback address in the list of multiaddresses to attempt to dial.
We can't seem to find a hook to filter the list of addresses that the swarm will attempt to dial after collecting all of the candidates from behaviours to remove these loopback addresses.
Is there a way to filter outgoing dial attempts for addresses that are clearly incorrect from the dialer's perspective?
Beta Was this translation helpful? Give feedback.
All reactions