Trait CoverTrafficGeneration
pub trait CoverTrafficGeneration {
// Required method
fn build(&self) -> Pin<Box<dyn Stream<Item = DestinationRouting> + Send>>;
}Expand description
A trait for types that can generate cover traffic routes for the HOPR network.
Implementors of this trait are responsible for producing an infinite stream
of DestinationRouting values, each representing a route for a cover (non-user) traffic.
Cover traffic is essential for privacy and network health, as it helps to obscure real user
traffic and maintain plausible deniability for network participants.
§Requirements
- The stream produced by
buildshould not terminate under normal operation, as the termination will lead to the cessation of cover traffic generation. - Route selection should be randomized or follow a strategy that maximizes privacy and/or network utility.
Required Methods§
fn build(&self) -> Pin<Box<dyn Stream<Item = DestinationRouting> + Send>>
fn build(&self) -> Pin<Box<dyn Stream<Item = DestinationRouting> + Send>>
Builds a stream of routes to be used for cover traffic.
The stream should be neverending for continual cover traffic generation.