Phase 1 of relay federation: 1. Signal messages: FederationRoomJoin/Leave/ParticipantUpdate added to SignalMessage enum for relay-to-relay room coordination. 2. Room changes: ParticipantOrigin (Local/Federated) tracking, loop prevention (federated media only forwards to local participants), ParticipantSender::Federation with 8-byte room-hash prefixed datagrams, merged participant lists (local + remote), new methods: join_federated(), update_federated_participants(), local_senders(), active_rooms(), local_participants(). 3. FederationManager: connects to configured peers via QUIC with SNI "_federation", reconnects with exponential backoff (5s-300s), exchanges FederationRoomJoin signals, runs recv loops for both signals and media datagrams, creates virtual participants in rooms. 4. Accept-side: _federation SNI handling in main.rs, unknown peer gets helpful "add to relay.toml" log message, recognized peers handed off to FederationManager. TODO: TLS fingerprint verification — currently outbound connections use client_config() which doesn't present a cert, so inbound verification fails. Need mutual TLS or URL-based peer matching. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
42 lines
1.2 KiB
TOML
42 lines
1.2 KiB
TOML
[package]
|
|
name = "wzp-relay"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "WarzonePhone relay daemon — ties codec, FEC, crypto, and transport together"
|
|
|
|
[dependencies]
|
|
wzp-proto = { workspace = true }
|
|
wzp-codec = { workspace = true }
|
|
wzp-fec = { workspace = true }
|
|
wzp-crypto = { workspace = true }
|
|
wzp-transport = { workspace = true }
|
|
tokio = { workspace = true }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
bytes = { workspace = true }
|
|
serde = { workspace = true }
|
|
toml = "0.8"
|
|
anyhow = "1"
|
|
reqwest = { version = "0.12", features = ["json"] }
|
|
serde_json = "1"
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
|
quinn = { workspace = true }
|
|
prometheus = "0.13"
|
|
axum = { version = "0.7", default-features = false, features = ["tokio", "http1", "ws"] }
|
|
tower-http = { version = "0.6", features = ["fs"] }
|
|
futures-util = "0.3"
|
|
dirs = "6"
|
|
sha2 = { workspace = true }
|
|
|
|
[[bin]]
|
|
name = "wzp-relay"
|
|
path = "src/main.rs"
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
|
|
wzp-transport = { workspace = true }
|
|
wzp-client = { workspace = true }
|