Skip to main content

Module decoy

Module decoy 

Source
Expand description

Decoy traffic communication modes for flow obfuscation.

The runtime trait DecoyProvider (made object-safe via async-trait) drives the three callbacks: start, feed_input, and feed_output. The construction trait DecoyCommunicationMode extends it with new() and is the target of decoy_factory.

A DecoyFactory is a type-erased Arc<dyn Fn(…) -> Box<dyn DecoyProvider>> so that different flows or users can hold different concrete provider types at runtime. Use decoy_factory::<T, AE, DP>() to wrap a concrete type, or random_decoy_factory() for the default behavior (random selection per invocation).

Structs§

DerivedValue
Read-only, Send + Sync, live projection of a [SharedValue]’s published value.
HeavyDecoyProvider
Heavy mode implements sending large decoy packets at a low cadence (background-heartbeat shape).
NoisyDecoyProvider
Noisy mode implements sending smaller decoy packets in bursts often.
PacketFlags
Packet type flags for the tailer FG field. Normally only one flag should be set, but a health check packet can be embedded into a data packet (shadowride).
SimpleDecoyProvider
Simple mode does not spawn any coroutines and does not send any packets.
SmoothDecoyProvider
Smooth mode implements sending few average decoy packets during quiet periods.
SparseDecoyProvider
Sparse mode implements sending average decoy packets sparsely distributed in time.
Tailer
Tailer view (16 + TYPHOON_ID_LENGTH bytes total). Zero-copy view into a DynamicByteBuffer containing tailer metadata. All field access reads directly from the underlying buffer.

Traits§

DecoyCommunicationMode
Construction contract for decoy providers. Extends DecoyProvider so that any DecoyCommunicationMode can be stored as Box<dyn DecoyProvider>.
DecoyFlowSender
Object-safe interface used by decoy providers to dispatch generated packets. Implemented explicitly by each flow manager — ClientFlowManager forwards to its FlowManager::send_packet, ServerFlowManager forwards to its inherent send_packet.
DecoyProvider
Object-safe runtime interface for decoy traffic. Used as Arc<dyn DecoyProvider> in flow managers — no external lock wraps it, so implementations must manage their own mutable state via interior mutability (e.g. Arc<RwLock<_>>, as every built-in provider does). All async methods are boxed automatically by async_trait.
IdentityType

Functions§

decoy_factory
Lift a concrete DecoyCommunicationMode type into a DecoyFactory.
random_decoy_factory
Factory that randomly selects one of the five built-in decoy providers per invocation, weighted by the DECOY_PROVIDER_WEIGHT_* settings.

Type Aliases§

DecoyFactory
A factory that constructs a Box<dyn DecoyProvider> for a given identity source and flow manager.