Skip to main content

Module transport

Module transport 

Source
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, see fallback)

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;std
pub use fallback::TransportMode;std
pub use scheduler::Scheduler;std
pub use session::Session;std
pub use stream::Stream;std
pub use types::*;std

Modules§

apistd
Phantom Protocol — legacy transport-config / builder surface.
bandwidth_estimatorstd
BBR-like Bandwidth Estimator
buffer_poolstd
Pre-allocated Buffer Pool
compressionstd
Production Adaptive Compression
device_profilestd
Device Profile System
fallbackstd
Phantom Protocol - Fallback State Machine
fragmentationstd
UDP fragmentation and reassembly with anti-DoS bounds.
framingstd and non-WebAssembly
Zero-Copy TCP Framing Pipeline
handshakestd
Unified Phantom Protocol Handshake
legs
Transport Legs Module
livenessstd
Path-liveness decision logic (Phase 4 / P4.3).
multiplexerstd
Stream Demultiplexer
pacerstd
Token Bucket Pacer
packet_coalescerstd
Packet Coalescer — UDP Datagram Batching
packet_coalescer_codecstd
Wire-format bridge for the packet coalescer (Phase 2.5).
pathstd
Connection-migration path-validation state (Phase 4.2).
path_validation_codecstd
Wire-format helpers for PATH_VALIDATION packets (Phase 4.2).
phantom_udpstd and 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).
reputationstd
Per-IP reputation tracking for adaptive PoW-difficulty escalation (DOS-2).
sackstd
Selective-acknowledgement (SACK) range codec.
schedulerstd
Phantom Protocol - Multi-Path Scheduler (vestigial)
sessionstd
Phantom Protocol - Session Management
session_cachestd
0-RTT Session Resumption
session_transport
The SessionTransport byte-pipe abstraction — the boundary between PhantomSession’s background data pump and a concrete physical transport (TcpSessionTransport, WebSocketLeg, EmbeddedLeg, …).
shapingstd
Traffic shaping — anti-fingerprint size padding (WIRE v6, deliverable (c)).
streamstd
Phantom Protocol - Stream Management
typesstd
Phantom Protocol - Types
udp_transportstd and non-WebAssembly
Low-level UDP socket / pacing helper.