Zero-loss cross-region packet relay network.
Adaptive FEC, encrypted UDP tunnels, real-time latency-mesh routing, and QUIC 0-RTT edge termination. Written in Rust.
Relays packets between globally distributed PoP (Point of Presence) nodes with:
- Zero packet loss up to 10% link loss adaptive Reed-Solomon FEC absorbs all loss with zero throughput impact
- Zero relay overhead measured loss exactly matches simulated network loss, the relay adds nothing
- Optimal routing via real-time latency mesh with Dijkstra shortest-path (not BGP)
- Instant connections via QUIC 0-RTT + TCP splitting at edge
- Always-encrypted tunnels with ChaCha20-Poly1305
Tested on London ↔ Sydney (273ms RTT) over Vultr shared VPS, one of the longest internet routes on Earth, on budget infrastructure.
| Link Loss | Throughput vs Baseline | Status |
|---|---|---|
| 0% | 100% | Baseline |
| 5% | 100% | Perfect recovery |
| 10% | 99% | Perfect recovery |
| 20% | 87% | Matches theoretical prediction within 1% |
| 22% | 83% | Graceful degradation |
| 25%+ | FAIL | QUIC control plane limit (see below) |
| Link Loss | Relay Added Loss |
|---|---|
| 1% | 0% |
| 5% | 0% |
| 10% | 0% |
| 20% | 0% |
The relay introduces zero additional packet loss at any tested loss level. Encryption, header routing, and tunnel forwarding add no measurable overhead.
- ~140 Mbps throughput cap: Vultr VPS NIC/bandwidth allocation, not the relay. On bare metal or higher-tier VPS, throughput scales with the NIC.
- 25%+ loss failure: At 25% unidirectional loss over 273ms RTT, each QUIC round-trip faces ~44% compound loss. No QUIC implementation (Quinn, quiche, msquic) survives this. This is a physical link constraint, not a relay limitation. On shorter routes or better infrastructure, the operational ceiling is higher.
- Real-world context: Internet backbone loss between major cities is typically 0.01–2%. This relay handles that range with zero visible loss. Even 10–20% loss (damaged undersea cable territory) still delivers 87%+ throughput.
Full benchmark methodology and raw data: BENCHMARK-RESULTS.md
cargo build --releaseCopy the example config and edit for your nodes:
cp config.example.toml config.tomlnode_id = "us-east-01"
region = "us-east"
[listen]
relay_addr = "0.0.0.0:4433"
tcp_addr = "0.0.0.0:8443"
quic_addr = "0.0.0.0:4434"
admin_addr = "127.0.0.1:9090"
[[peers]]
node_id = "eu-west-01"
region = "eu-west"
addr = "1.2.3.4:4433"
shared_key = "base64-encoded-32-byte-key"Generate a shared key:
openssl rand -base64 32./target/release/entrouter-line --config config.tomlThe admin API is available at http://127.0.0.1:9090:
GET /healthliveness checkGET /statuspeer connections, latency matrix, routing table
User → [QUIC 0-RTT] → Edge PoP → [UDP + FEC + ChaCha20 Tunnel] → Edge PoP → Origin
src/
├── main.rs # Entry point
├── config.rs # Node & peer configuration
├── relay/ # Core relay engine
│ ├── tunnel.rs # Encrypted UDP tunnels
│ ├── fec.rs # Adaptive Forward Error Correction
│ ├── forwarder.rs # Packet forwarding & routing
│ ├── crypto.rs # ChaCha20-Poly1305 encryption
│ └── wire.rs # Binary wire protocol
├── mesh/ # Routing mesh
│ ├── probe.rs # Latency probing
│ ├── router.rs # Dijkstra shortest-path routing
│ └── latency_matrix.rs
└── edge/ # Edge termination
├── tcp_split.rs # TCP connection splitting
└── quic_acceptor.rs # QUIC 0-RTT acceptor
cargo build --releaseIssues and pull requests welcome. If you're reporting a bug, include:
- Your config (redact keys)
- OS and Rust version
- Steps to reproduce
- Relevant logs
MIT — see LICENSE