Expand description
Phantom Protocol transport internals.
The protocol layer beneath the public crate::api surface. PhantomUDP — a
QUIC-class reliable transport over raw UDP — is the production transport;
TCP / WebSocket / WASI / Embedded / TLS-mimicry byte-pipes also plug in via
SessionTransport. Key properties:
- Multi-streaming (independent streams, no head-of-line blocking)
- 0-RTT connection establishment (resumption + early-data)
- Seamless single-path connection migration (session survives IP changes)
- Adaptive fallback tiers (
Turbo → Reliable → Stealth, seefallback)
NOTE: multipath bandwidth aggregation / multi-homing was deliberately rejected
— migration moves one active path at a time, it does not bond paths. The
scheduler module is consequently vestigial.
Re-exports§
pub use fallback::FallbackStateMachine;stdpub use fallback::TransportMode;stdpub use scheduler::Scheduler;stdpub use session::Session;stdpub use stream::Stream;stdpub use types::*;std
Modules§
- api
std - Phantom Protocol — legacy transport-config / builder surface.
- bandwidth_
estimator std - BBR-like Bandwidth Estimator
- buffer_
pool std - Pre-allocated Buffer Pool
- compression
std - Production Adaptive Compression
- device_
profile std - Device Profile System
- fallback
std - Phantom Protocol - Fallback State Machine
- fragmentation
std - UDP fragmentation and reassembly with anti-DoS bounds.
- framing
stdand non-WebAssembly - Zero-Copy TCP Framing Pipeline
- handshake
std - Unified Phantom Protocol Handshake
- legs
- Transport Legs Module
- liveness
std - Path-liveness decision logic (Phase 4 / P4.3).
- multiplexer
std - Stream Demultiplexer
- pacer
std - Token Bucket Pacer
- packet_
coalescer std - Packet Coalescer — UDP Datagram Batching
- packet_
coalescer_ codec std - Wire-format bridge for the packet coalescer (Phase 2.5).
- path
std - Connection-migration path-validation state (Phase 4.2).
- path_
validation_ codec std - Wire-format helpers for PATH_VALIDATION packets (Phase 4.2).
- phantom_
udp stdand non-WebAssembly - PhantomUDP datagram framing — the outer UDP envelope + fragmentation for the native reliable-UDP transport (the production transport; Phase 1 introduced it, Phase 4 added seamless single-path connection migration).
- reputation
std - Per-IP reputation tracking for adaptive PoW-difficulty escalation (DOS-2).
- sack
std - Selective-acknowledgement (SACK) range codec.
- scheduler
std - Phantom Protocol - Multi-Path Scheduler (vestigial)
- session
std - Phantom Protocol - Session Management
- session_
cache std - 0-RTT Session Resumption
- session_
transport - The
SessionTransportbyte-pipe abstraction — the boundary betweenPhantomSession’s background data pump and a concrete physical transport (TcpSessionTransport,WebSocketLeg,EmbeddedLeg, …). - shaping
std - Traffic shaping — anti-fingerprint size padding (WIRE v6, deliverable (c)).
- stream
std - Phantom Protocol - Stream Management
- types
std - Phantom Protocol - Types
- udp_
transport stdand non-WebAssembly - Low-level UDP socket / pacing helper.