This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Description
Some hosting company thinks we're attacking them. Substrate should provide some way of blocking outgoing connection attempts to certain subnets that are passed through the CLI.
This needs to be done at the libp2p level, so that for example even Kademlia queries don't get performed. In other words, this is not at the PSM level.
I think the best way to do that is to wrap around the Behaviour struct and tweak the addresses_of_peer method, and filter out multiaddresses that match the subnets we're blocking. addresses_of_peer is only ever used to establish outbound connections.