1 unstable release
new 0.4.2 | Dec 9, 2024 |
---|
#44 in #block
125KB
2.5K
SLoC
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(),
};
Dependencies
~9–16MB
~214K SLoC