pub trait ActiveProbeHandler<AE: AsyncExecutor + 'static>: Send + Sync {
// Required methods
fn start<'life0, 'async_trait>(
&'life0 mut self,
manager: Weak<dyn ProbeFlowSender>,
settings: Arc<Settings<AE>>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process<'life0, 'async_trait>(
&'life0 mut self,
packet: DynamicByteBuffer,
source: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler for packets the flow manager could not identify (active probing protection).
The flow manager calls [start] once at startup, then calls [process] for every packet
whose tailer decryption or verification failed, and — on the server — for every
non-handshake, non-decoy packet from an unregistered user.
Required Methods§
Sourcefn start<'life0, 'async_trait>(
&'life0 mut self,
manager: Weak<dyn ProbeFlowSender>,
settings: Arc<Settings<AE>>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
manager: Weak<dyn ProbeFlowSender>,
settings: Arc<Settings<AE>>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called once when the flow manager starts.
manager provides a raw-socket send path; settings carries runtime configuration.
Sourcefn process<'life0, 'async_trait>(
&'life0 mut self,
packet: DynamicByteBuffer,
source: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 mut self,
packet: DynamicByteBuffer,
source: Option<SocketAddr>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called for each unidentified packet.
source is the UDP sender address — Some on the server, None on the client (the
peer address is fixed for a connected socket and need not be threaded through).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".