Skip to content

Relay Overview

bilbycast-relay is a stateless QUIC relay server that enables IP tunneling between bilbycast-edge nodes behind NAT. It pairs ingress and egress edges by tunnel ID and forwards encrypted traffic between them — it cannot read tunnel payloads (end-to-end ChaCha20-Poly1305 encryption between edges).

  • Zero-config startup — Runs with no config file, self-signed TLS certificate auto-generated
  • QUIC/TLS 1.3 — All traffic encrypted in transit
  • End-to-end encryption — ChaCha20-Poly1305 between edges; relay sees only ciphertext
  • Optional API auth — Bearer token authentication for REST API
  • Optional tunnel auth — Per-tunnel HMAC-SHA256 bind tokens managed via manager
  • Manager integration — Optional WebSocket connection for centralized monitoring
  • Lock-free design — DashMap registries, AtomicU64 stats, zero Mutex usage
LayerMechanism
TransportTLS 1.3 via QUIC
End-to-endChaCha20-Poly1305 between edges
REST APIOptional Bearer token
Tunnel bindingOptional HMAC-SHA256 bind tokens
ALPNbilbycast-relay protocol enforced
EndpointDescription
GET /healthHealth check (always public)
GET /metricsPrometheus metrics
GET /api/v1/tunnelsList active tunnels
GET /api/v1/edgesList connected edges
GET /api/v1/statsBandwidth, throughput, peaks, uptime
Terminal window
# Zero-config start
cargo build --release
./target/release/bilbycast-relay
# With config
./target/release/bilbycast-relay -c relay.json

Default ports: QUIC on 0.0.0.0:4433, REST API on 0.0.0.0:4480.

See Architecture for the full design and connection lifecycle.