Crate allow_block_list
Expand description
A libp2p module for managing allow and blocks lists to peers.
§Allow list example
#[derive(NetworkBehaviour)]
struct MyBehaviour {
allowed_peers: allow_block_list::Behaviour<AllowedPeers>,
}
let behaviour = MyBehaviour {
allowed_peers: allow_block_list::Behaviour::default(),
};
§Block list example
#[derive(NetworkBehaviour)]
struct MyBehaviour {
blocked_peers: allow_block_list::Behaviour<BlockedPeers>,
}
let behaviour = MyBehaviour {
blocked_peers: allow_block_list::Behaviour::default(),
};
Structs§
- The list of explicitly allowed peers.
- A
NetworkBehaviour
that can act as an allow or block list. - A connection to this peer was explicitly blocked and was thus
denied
. - The list of explicitly blocked peers.
- A connection to this peer is not explicitly allowed and was thus
denied
.