Expand description
ant-quic: QUIC transport protocol with advanced NAT traversal for P2P networks
This library provides a clean, modular implementation of QUIC-native NAT traversal using raw public keys for authentication. It is designed to be minimal, focused, and highly testable, with exceptional cross-platform support.
The library is organized into the following main modules:
transport
: Core QUIC transport functionalitynat_traversal
: QUIC-native NAT traversal protocoldiscovery
: Platform-specific network interface discoverycrypto
: Raw public key authenticationapi
: High-level P2P networking API
Re-exports§
pub use high_level::Accept;
pub use high_level::Connecting;
pub use high_level::Connection as HighLevelConnection;
pub use high_level::Endpoint;
pub use high_level::RecvStream as HighLevelRecvStream;
pub use high_level::SendStream as HighLevelSendStream;
pub use crypto::raw_public_keys::key_utils::derive_peer_id_from_key_bytes;
pub use crypto::raw_public_keys::key_utils::derive_peer_id_from_public_key;
pub use crypto::raw_public_keys::key_utils::generate_ed25519_keypair;
pub use crypto::raw_public_keys::key_utils::public_key_from_bytes;
pub use crypto::raw_public_keys::key_utils::public_key_to_bytes;
pub use crypto::raw_public_keys::key_utils::verify_peer_id;
pub use candidate_discovery::CandidateDiscoveryManager;
pub use candidate_discovery::DiscoveryConfig;
pub use candidate_discovery::DiscoveryError;
pub use candidate_discovery::DiscoveryEvent;
pub use candidate_discovery::NetworkInterface;
pub use candidate_discovery::ValidatedCandidate;
pub use connection::Chunk;
pub use connection::Chunks;
pub use connection::ClosedStream;
pub use connection::Connection;
pub use connection::ConnectionError;
pub use connection::ConnectionStats;
pub use connection::Datagrams;
pub use connection::Event;
pub use connection::FinishError;
pub use connection::ReadError;
pub use connection::ReadableError;
pub use connection::RecvStream;
pub use connection::SendDatagramError;
pub use connection::SendStream;
pub use connection::StreamEvent;
pub use connection::Streams;
pub use connection::WriteError;
pub use connection::Written;
pub use endpoint::AcceptError;
pub use endpoint::ConnectError;
pub use endpoint::ConnectionHandle;
pub use endpoint::DatagramEvent;
pub use endpoint::Endpoint as LowLevelEndpoint;
pub use endpoint::Incoming;
pub use nat_traversal_api::BootstrapNode;
pub use nat_traversal_api::CandidateAddress;
pub use nat_traversal_api::EndpointRole;
pub use nat_traversal_api::NatTraversalConfig;
pub use nat_traversal_api::NatTraversalEndpoint;
pub use nat_traversal_api::NatTraversalError;
pub use nat_traversal_api::NatTraversalEvent;
pub use nat_traversal_api::NatTraversalStatistics;
pub use nat_traversal_api::PeerId;
pub use quic_node::NodeStats as QuicNodeStats;
pub use quic_node::QuicNodeConfig;
pub use quic_node::QuicP2PNode;
pub use shared::ConnectionId;
pub use shared::EcnCodepoint;
pub use shared::EndpointEvent;
pub use transport_error::Code as TransportErrorCode;
pub use transport_error::Error as TransportError;
pub use cid_generator::RandomConnectionIdGenerator;
pub use config::AckFrequencyConfig;
pub use config::ClientConfig;
pub use config::EndpointConfig;
pub use config::MtuDiscoveryConfig;
pub use config::ServerConfig;
pub use config::TransportConfig;
Modules§
- api
- High-level API for QUIC operations High-Level NAT Traversal API
- auth
- Peer authentication system Authentication module for P2P connections using Ed25519 keys
- candidate_
discovery - Network candidate discovery and management Candidate Discovery System for QUIC NAT Traversal
- chat
- Secure chat protocol implementation Chat protocol implementation for QUIC streams
- cid_
generator - Connection ID generation strategies
- coding
- Coding related traits.
- compliance_
validator - IETF compliance validation tools
- config
- Configuration structures and validation
- connection
- QUIC connection state machine and management
- crypto
- Cryptographic operations and raw public key support Traits and implementations for the QUIC cryptography protocol
- discovery
- Platform-specific network interface discovery Network Interface Discovery
- endpoint
- QUIC endpoint for accepting and initiating connections
- frame
- QUIC frame types and encoding/decoding
- high_
level - High-level async API for QUIC
- logging
- Structured logging and diagnostics
- nat_
traversal - NAT traversal protocol implementation NAT Traversal Protocol Implementation
- nat_
traversal_ api - High-level NAT traversal API High-level NAT Traversal API for Autonomi P2P Networks
- optimization
- Performance optimization utilities Performance optimization modules for ant-quic
- packet
- QUIC packet structures and processing
- quic_
node - High-level QUIC P2P node implementation QUIC-based P2P node with NAT traversal
- shared
- Shared types and utilities
- stats_
dashboard - Real-time statistics dashboard Connection Statistics Dashboard
- terminal_
ui - Terminal user interface components Terminal UI formatting and display helpers for ant-quic
- tracing
- Zero-cost tracing and event logging system Zero-cost tracing system for P2P network debugging
- transport
- Transport-level protocol implementation Core QUIC transport layer
- transport_
error - Transport error types and codes
- transport_
parameters - QUIC connection transport parameters
Macros§
- if_
trace - Conditional code block that only compiles with trace feature
- trace_
candidate_ discovered - Trace a NAT traversal candidate discovered
- trace_
conn_ established - Trace a connection established event
- trace_
event - Primary trace event macro - compiles to nothing when disabled
- trace_
hole_ punching_ started - Trace hole punching started
- trace_
observed_ address_ received - Trace an observed address received
- trace_
observed_ address_ sent - Trace an observed address event
- trace_
packet_ received - Trace a packet received event
- trace_
packet_ sent - Trace a packet sent event
- trace_
stream_ opened - Trace a stream opened event
Structs§
- Simple
Connection Establishment Manager - Simplified connection establishment manager
- Simple
Establishment Config - Simplified configuration
- Stream
Id - Identifier for a stream within a particular connection
- Transmit
- An outgoing packet
- VarInt
- An integer less than 2^62
- VarInt
Bounds Exceeded - Error returned when constructing a
VarInt
from a value >= 2^62
Enums§
- Candidate
Source - How an address candidate was discovered
- Candidate
State - Current state of a candidate address
- Dir
- Whether a stream communicates data in both directions or only from the initiator
- NatTraversal
Role - Role in NAT traversal coordination
- Side
- Whether an endpoint was the initiator of a connection
- Simple
Connection Event - Simplified events
Constants§
- DEFAULT_
SUPPORTED_ VERSIONS - The QUIC protocol version implemented.