Skip to main content

Module api

Module api 

Source
Available on crate feature std only.
Expand description

Phantom Protocol — legacy transport-config / builder surface.

This module re-exports the low-level transport + crypto types and offers a TransportConfig / PhantomBuilder for constructing handshake handlers directly. It predates the unified PhantomUDP rewrite: several of its knobs (SchedulerMode, max_packet_size, stealth_mode) reflect the old multipath/KCP design and no longer steer the live data plane (the scheduler is vestigial — see SchedulerMode). It is retained for the handful of in-crate callers that build raw HandshakeClient / HandshakeServer instances.

The actual user-facing API is in crate::api: PhantomListener::bind / accept on the server, PhantomSession::connect_with_transport / connect_pinned on the client. New code should use those, not this module.

Re-exports§

pub use crate::transport::scheduler::Scheduler;
pub use crate::transport::session::CryptoState;
pub use crate::transport::session::Session;
pub use crate::transport::stream::Stream;
pub use crate::transport::types::LegType;
pub use crate::transport::types::PacketFlags;
pub use crate::transport::types::PacketHeader;
pub use crate::transport::types::SchedulerMode;
pub use crate::transport::types::SessionId;
pub use crate::transport::handshake::ClientHello;
pub use crate::transport::handshake::HandshakeClient;
pub use crate::transport::handshake::HandshakeError;
pub use crate::transport::handshake::HandshakeServer;
pub use crate::transport::handshake::ServerHello;
pub use crate::crypto::hybrid_kem::HybridCiphertext;
pub use crate::crypto::hybrid_kem::HybridKeyPackage;
pub use crate::crypto::hybrid_kem::HybridSecretKey;
pub use crate::crypto::hybrid_sign::HybridSignError;
pub use crate::crypto::hybrid_sign::HybridSignature;
pub use crate::crypto::hybrid_sign::HybridSigningKey;
pub use crate::crypto::hybrid_sign::HybridVerifyingKey;

Structs§

PhantomBuilder
Builder for establishing Phantom Protocol connections
TransportConfig
Configuration for Phantom Protocol transport