pub struct TrafficShapingConfig {
pub padding: PaddingPolicy,
pub jitter_ms: u32,
pub cover_interval_ms: u32,
}std only.Expand description
Anti-fingerprint traffic-shaping configuration (WIRE v6, direction #4). Set on
an established session via PhantomSession::set_traffic_shaping. All
shaping is opt-in — the default (and the field defaults here) is no shaping,
so a session pays nothing unless an embedder enables it.
Currently carries the size-padding policy (deliverable (c)); the timing-jitter (d) and cover-traffic (e) knobs will be added as further fields in later phases. Padding hides the datagram size; it costs bounded (≈ ≤12% worst-case) extra bandwidth.
Fields§
§padding: PaddingPolicySize-padding policy. PaddingPolicy::None (default) = no padding;
PaddingPolicy::Padme = pad each packet up to a PADÉ bucket.
jitter_ms: u32Send-timing jitter ceiling in milliseconds (deliverable (d)). 0 (default)
= no jitter; otherwise each packet waits a uniform random [0, jitter_ms]
ms before it is sent, so the inter-packet timing no longer tracks the
application’s writes — at a cost of up to jitter_ms of added latency.
cover_interval_ms: u32Cover-traffic floor interval in milliseconds (deliverable (e)). 0
(default) = no cover traffic; otherwise the session maintains a minimum
outbound packet rate of 1000 / cover_interval_ms packets/sec, emitting an
encrypted dummy (COVER) packet whenever no packet has gone out for
cover_interval_ms — hiding idle/active patterns and volume, at a steady
bandwidth cost. A typical value is 100–500 ms (10–2 packets/sec).
Trait Implementations§
Source§impl Clone for TrafficShapingConfig
impl Clone for TrafficShapingConfig
Source§fn clone(&self) -> TrafficShapingConfig
fn clone(&self) -> TrafficShapingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for TrafficShapingConfig
impl<UT> ConvertError<UT> for TrafficShapingConfig
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
impl Copy for TrafficShapingConfig
Source§impl Debug for TrafficShapingConfig
impl Debug for TrafficShapingConfig
Source§impl Default for TrafficShapingConfig
impl Default for TrafficShapingConfig
Source§fn default() -> TrafficShapingConfig
fn default() -> TrafficShapingConfig
impl Eq for TrafficShapingConfig
Source§impl<UT> FfiConverter<UT> for TrafficShapingConfig
impl<UT> FfiConverter<UT> for TrafficShapingConfig
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl<UT> Lift<UT> for TrafficShapingConfig
impl<UT> Lift<UT> for TrafficShapingConfig
Source§impl<UT> LiftRef<UT> for TrafficShapingConfig
impl<UT> LiftRef<UT> for TrafficShapingConfig
Source§impl<UT> LiftReturn<UT> for TrafficShapingConfig
impl<UT> LiftReturn<UT> for TrafficShapingConfig
Source§type ReturnType = <TrafficShapingConfig as Lift<UT>>::FfiType
type ReturnType = <TrafficShapingConfig as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
Source§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Source§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Source§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for TrafficShapingConfig
impl<UT> Lower<UT> for TrafficShapingConfig
type FfiType = <TrafficShapingConfig as FfiConverter<UT>>::FfiType
fn lower(obj: Self) -> Self::FfiType
fn write(obj: Self, buf: &mut Vec<u8>)
Source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Source§impl<UT> LowerError<UT> for TrafficShapingConfig
impl<UT> LowerError<UT> for TrafficShapingConfig
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for TrafficShapingConfig
impl<UT> LowerReturn<UT> for TrafficShapingConfig
Source§type ReturnType = <TrafficShapingConfig as Lower<UT>>::FfiType
type ReturnType = <TrafficShapingConfig as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl PartialEq for TrafficShapingConfig
impl PartialEq for TrafficShapingConfig
Source§fn eq(&self, other: &TrafficShapingConfig) -> bool
fn eq(&self, other: &TrafficShapingConfig) -> bool
self and other values to be equal, and is used by ==.