1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use BoxStream;
pub use ;
/// Enum representation of different types of [`DestinationRouting`] the
/// [`ProbingTrafficGeneration::build`] is able to generate.
///
/// [`ProbeRouting::Neighbor`] corresponds to an in-protocol neighbor
/// discovery relying on neighbor cooperation.
/// [`ProbeRouting::Looping`] represents a unidirectional probe transparent
/// to the relayer, starting and ending in the emitter.
/// A trait for types that can produce a stream of probing traffic routes.
///
/// The basic assumption is that the implementor will provide the logic
/// to choose suitable route candidates for cover traffic based on a
/// custom algorithm.
///
/// The implementor should ensure that the produced routes are indefinite,
/// since the exhaustion of the stream might result in termination of the
/// cover traffic generation.
/// 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 `build` should 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.