pub struct SimpleDecoyProvider;Expand description
Simple mode does not spawn any coroutines and does not send any packets.
Trait Implementations§
Source§impl<T: IdentityType + Clone, AE: AsyncExecutor> DecoyCommunicationMode<T, AE> for SimpleDecoyProvider
impl<T: IdentityType + Clone, AE: AsyncExecutor> DecoyCommunicationMode<T, AE> for SimpleDecoyProvider
Source§fn new(
_manager: Weak<dyn DecoyFlowSender>,
_settings: Arc<Settings<AE>>,
_identity: DerivedValue<T>,
_counter: Arc<AtomicU32>,
_fallthrough_probability: Option<f64>,
) -> Self
fn new( _manager: Weak<dyn DecoyFlowSender>, _settings: Arc<Settings<AE>>, _identity: DerivedValue<T>, _counter: Arc<AtomicU32>, _fallthrough_probability: Option<f64>, ) -> Self
Create a new decoy provider;
counter is the per-session monotonic packet-number
counter shared with the session manager and the health-check provider; every emitted
decoy packet advances it. fallthrough_probability pins the per-flow fallthrough rate,
None samples from the settings keys.Source§impl DecoyProvider for SimpleDecoyProvider
impl DecoyProvider for SimpleDecoyProvider
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Short display name of this provider (e.g. “SparseDecoyProvider”).
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the background decoy generation timer.
Source§fn feed_input<'life0, 'async_trait>(
&'life0 self,
packet: DynamicByteBuffer,
_tailer_buf: DynamicByteBuffer,
) -> Pin<Box<dyn Future<Output = Option<DynamicByteBuffer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn feed_input<'life0, 'async_trait>(
&'life0 self,
packet: DynamicByteBuffer,
_tailer_buf: DynamicByteBuffer,
) -> Pin<Box<dyn Future<Output = Option<DynamicByteBuffer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process an incoming packet, updating internal rate tracking.
tailer_buf is the deobfuscated tailer for the packet (flags, packet number, etc.).Source§fn feed_output<'life0, 'async_trait>(
&'life0 self,
body: DynamicByteBuffer,
_tailer_buf: DynamicByteBuffer,
) -> Pin<Box<dyn Future<Output = Option<DynamicByteBuffer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn feed_output<'life0, 'async_trait>(
&'life0 self,
body: DynamicByteBuffer,
_tailer_buf: DynamicByteBuffer,
) -> Pin<Box<dyn Future<Output = Option<DynamicByteBuffer>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process an outgoing packet body and its plaintext tailer, updating internal rate tracking.
Returns the (possibly modified) body, or
None to suppress the packet entirely.Auto Trait Implementations§
impl Freeze for SimpleDecoyProvider
impl RefUnwindSafe for SimpleDecoyProvider
impl Send for SimpleDecoyProvider
impl Sync for SimpleDecoyProvider
impl Unpin for SimpleDecoyProvider
impl UnsafeUnpin for SimpleDecoyProvider
impl UnwindSafe for SimpleDecoyProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more