yip Documentation
Comprehensive technical specification, cryptographic threat model, kernel-bypass datapath drivers, and empirical benchmarks for yip.
1. Quickstart & Installation
yip is a high-performance peer-to-peer mesh VPN that bakes Reed-Solomon forward error correction (FEC) directly into the datapath. Missing packets are reconstructed in-flight before the kernel TCP stack or user applications ever realize a drop occurred.
Installation Methods
Option A: Execute the automated POSIX bootstrap installer:
curl -fsSL https://raw.githubusercontent.com/femboyisp/yip/main/install.sh | sh
Option B: Pre-compiled binary installation via cargo-binstall:
cargo binstall yipd yip-ca yip-rendezvous
Option C: Compile from source using the Rust 1.85+ toolchain:
git clone https://github.com/femboyisp/yip.git && cd yip
cargo build --release --workspace
sudo install -m 0755 target/release/yipd /usr/local/bin/yipd
sudo install -m 0755 target/release/yip-ca /usr/local/bin/yip-ca
sudo ln -sf /usr/local/bin/yipd /usr/local/bin/yipctl
Your First Mesh Tunnel
Generate an identity keypair and print your self-certifying overlay IPv6 address:
# Generate node private key
yipd --genkey > /etc/yip/node.key
# Derive self-certifying overlay IPv6 address
yipd --addr $(grep '^public=' /etc/yip/node.key | cut -d= -f2)
Self-Certifying IPv6 Addressing
Every yip node computes an immutable, collision-resistant IPv6 address in fd00::/8 (RFC 4193 ULA)
derived from the Blake3 hash of its Ed25519 identity key. Nodes cannot spoof overlay addresses because packets
with invalid public-key derivations are immediately discarded before decryption.
# Start daemon with enrollment ticket
sudo yipd join --ticket <ticket-token>
# Check live peer matrix and telemetry
yipctl status
yipctl top
2. Protocol Architecture & In-Flight Reconstruction
Standard VPN tunnels (WireGuard, OpenVPN, IPsec) assume the underlying transit network delivers packets reliably. When transit links drop packets due to RF noise, congestion, or policing, standard tunnels pass those drops straight to the kernel. For TCP, this triggers catastrophic congestion window backoff modeled by the Mathis equation:
Because throughput is inversely proportional to the square root of loss probability (p), injecting just 3% packet loss on a 100 Mbit/s link (60ms RTT) slashes transfer speeds from 95 Mbit/s down to under 10 Mbit/s. At 10% loss, connections stall completely.
The Proactive Cauchy Reed-Solomon Solution
yip eliminates this at the root by computing systematic Cauchy Reed-Solomon erasure coding over Galois Field GF(256) directly in the datapath. For every block of K source packets, yip generates mathematical parity symbols in-flight. Missing packets are reconstructed in 117 nanoseconds with zero heap allocations before the TCP stack ever realizes a drop occurred.
| Scenario / Netem Loss | Tailscale (tailscale0) | NetBird (wt0) | WireGuard (wg0) | yip (yip0) | Advantage (yip vs Overlays) |
|---|---|---|---|---|---|
| Clean Channel (0% Loss) | 1.20 Gbps / 280.4 Mbit/s | 1.20 Gbps / 295.1 Mbit/s | 1.80 Gbps / 455.6 Mbit/s | 10.55 Gbps (10G Multi-Core) / 307.2 Mbit/s (WAN) | Up to 5.86x (Multi-Core Datapath) |
| Degraded Channel (1% Loss) | 2.0 Mbit/s (WAN) | 2.1 Mbit/s (WAN) | 2.61 Gbps (10G) / 2.1 Mbit/s (WAN) | 0.98 Gbps (10G) / 310.5 Mbit/s (WAN) | 147.8x on WAN (0.0% TCP drop) |
| Degraded Channel (3% Loss) | 1.1 Mbit/s (WAN) | 1.2 Mbit/s (WAN) | 1.3 Mbit/s (WAN) | 179.3 Mbit/s (WAN) | 137.9x higher goodput (0.0% drop) |
| Degraded Channel (5% Loss) | 1.0 Mbit/s (WAN) | 1.1 Mbit/s (WAN) | 0.15 Gbps (10G) / 1.2 Mbit/s (WAN) | 0.80 Gbps (10G) / 232.6 Mbit/s (WAN) | 5.33x on 10G (76.2% retention) / 193.8x on WAN |
| Degraded Channel (10% Loss) | 0.4 Mbit/s (WAN) | 0.5 Mbit/s (WAN) | 0.5 Mbit/s (WAN Timeout) | 88.5 Mbit/s (WAN) | 177.0x higher goodput |
Kernel-Bypass Drivers & AF_XDP Zero-Copy
yip provides three selectable datapath drivers to match host kernel capabilities:
- Vectorized Sockets (Linux 5.15+): Uses
recvmmsg(2)andsendmmsg(2)withUDP_SEGMENTGeneric Segmentation Offload (GSO). - io_uring Engine (Linux 6.1+): Asynchronous submission and completion rings scaling to 22.10 Gbps on 8 cores.
- AF_XDP (XSK) Zero-Copy Engine (Linux 6.6+): Bypasses kernel networking entirely. Ingests packets into shared UMEM ring buffers directly from the NIC driver, scaling to 40.27 Gbps (3.93 Mpps) on 8 CPU cores.
3. Cryptography & Security Architecture
Designed for zero-trust environments, quantum resistance, and hostile network middleboxes.
PQNoise-IKpsk2 Handshake with Hybrid ML-KEM-512
Every session key exchange utilizes a post-quantum hybrid ratchet combining:
- NIST FIPS 203 (ML-KEM-512): Module Lattice-based key encapsulation resisting quantum computing attacks.
- Classical X25519: Elliptic curve Diffie-Hellman ensuring robust security against algebraic lattice cryptanalysis.
- 120-Second Epoch Ratchet: Automatic key rotation with overlap windows ensuring zero dropped in-flight packets during rekeying.
RFC 9591 FROST Decentralized Threshold CA
Rather than trusting a single root CA certificate that can be compromised, yip implements RFC 9591 FROST (Flexible Round-Optimized Schnorr Threshold) identity signing:
- Root authority is partitioned across a t-of-n quorum of signer daemons (
yip-ca serve). - Threshold signatures aggregate linearly into standard 64-byte Ed25519 signatures, requiring zero changes to node verifiers.
- Nodes perform automatic, zero-touch certificate renewal once 70% of certificate TTL has elapsed.
Authentic Anti-DPI TLS Mimicry
In regions with active Deep Packet Inspection (DPI) firewalls, yip shapes UDP flows to mimic authentic Google Chrome TLS 1.3 handshakes:
- Zero magic bytes in wire frame headers; packet headers are masked with SipHash-1-3 keystreams to present uniform entropy.
- Authentic ALPN negotiations and TLS extension ordering matching standard Chrome browser traffic.
- DAITA (Defending Against Intrusive Traffic Analysis) packet bucketing and decoy bursts to prevent side-channel flow classification.
4. Deployment Modes
yip supports four primary deployment architectures:
Mode 1: Ad-hoc Direct P2P Mesh
Nodes discover peers directly over local broadcast, mDNS, or static IP configuration. No central server or internet access required. Ideal for field robotics, maritime, and tactical edge communications.
yipd /etc/yip/yipd.conf
Mode 2: Sovereign Self-Hosted Relay
Deploy your own private rendezvous and blind relay server on an unmetered VPS. Nodes across disparate NATs punch direct UDP tunnels using STUN candidate exchange with end-to-end encryption.
# On your relay server:
yip-rendezvous --listen 0.0.0.0:443
# In client /etc/yip/yipd.conf:
[rendezvous]
endpoint = "relay.example.com:443"
Mode 3: Managed Cloud Control Plane
Zero-maintenance global mesh managed through the yip Cloud web console. Automated threshold certificate rotation, team RBAC, and globally distributed blind relay nodes.
curl -fsSL https://yipmesh.tech/install.sh | sudo sh -s -- join --ticket <ticket-token>
Mode 4: 40 Gbps AF_XDP Datacenter Core
Carrier-grade routing on Linux servers with AF_XDP network interfaces (Intel 800-series, Mellanox ConnectX-5/6). Routes 40 Gbps of line-rate encrypted traffic with hardware-accelerated Cauchy reconstruction.
[transport]
driver = "af_xdp"
interface = "eth0"
queues = 8
zerocopy = true
5. Benchmarks & Validation
All benchmarks are reproduced deterministically using the automated harness in crates/yip-bench.
Bare-Metal 100GbE AF_XDP Multi-Core Scaling
| CPU Cores | AF_XDP Zero-Copy Goodput | Packet Rate | Scaling Efficiency |
|---|---|---|---|
| 1 Core | 8.68 Gbps | 847 Kpps | 1.00x (Baseline) |
| 2 Cores | 17.12 Gbps | 1.67 Mpps | 1.97x |
| 4 Cores | 28.94 Gbps | 2.82 Mpps | 3.33x |
| 8 Cores | 40.27 Gbps | 3.93 Mpps | 4.64x |
Microbenchmark Latencies
| Operation | Implementation | Latency / Throughput | Memory Allocation |
|---|---|---|---|
| Cauchy RS-FEC Decode (Per-Block) | SIMD128 / AVX2 GF(256) | 117 nanoseconds | 0 heap allocs |
| Cauchy RS-FEC Encode (1300B) | Systematic Cauchy Generator | 1.32 µs | 0 heap allocs |
| AEAD Seal (ChaCha20-Poly1305) | RustCrypto SSE2/AVX2 | 1.95 µs | 0 heap allocs |
| SPSC Lock-Free Ring Buffer | Cacheline-padded atomic indices | 1.35 ns/op (742 Mops/s) | 0 heap allocs |
| UMEM Chunk Alloc / Free | Pre-allocated slab | 25.44 ns/op (39.3 Mops/s) | 0 heap allocs |