The relay's TLS certificate is now derived from the persisted Ed25519 seed via HKDF, so the same seed produces the same cert and the same TLS fingerprint across restarts. This fixes the "Server Key Changed" warnings on every relay restart. Implementation: HKDF-SHA256(seed, "wzp-tls-ed25519") → Ed25519 signing key → PKCS8 DER → rcgen KeyPair → self-signed cert. Also adds tls_fingerprint() helper (SHA-256 of DER cert, hex with colons) and prints it on startup. This is the prerequisite for relay federation (peers verify each other by TLS fingerprint). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
//! WarzonePhone Transport Layer
|
|
//!
|
|
//! QUIC-based transport using quinn with:
|
|
//! - DATAGRAM frames for unreliable media packets
|
|
//! - Reliable streams for signaling messages
|
|
//! - Path quality monitoring (EWMA loss, RTT, bandwidth estimation)
|
|
//! - Connection lifecycle management
|
|
//!
|
|
//! ## Architecture
|
|
//!
|
|
//! - `config` — QUIC configuration tuned for lossy VoIP links
|
|
//! - `datagram` — DATAGRAM frame serialization and MTU management
|
|
//! - `reliable` — Length-prefixed JSON framing over reliable QUIC streams
|
|
//! - `path_monitor` — EWMA-based PathQuality estimation
|
|
//! - `quic` — `QuinnTransport` implementing the `MediaTransport` trait
|
|
//! - `connection` — Connection lifecycle (create endpoint, connect, accept)
|
|
|
|
pub mod config;
|
|
pub mod connection;
|
|
pub mod datagram;
|
|
pub mod path_monitor;
|
|
pub mod quic;
|
|
pub mod reliable;
|
|
|
|
pub use config::{client_config, server_config, server_config_from_seed, tls_fingerprint};
|
|
pub use connection::{accept, connect, create_endpoint};
|
|
pub use path_monitor::PathMonitor;
|
|
pub use quic::QuinnTransport;
|
|
pub use wzp_proto::{MediaTransport, PathQuality, TransportError};
|