Skip to content
femboyispPublic

About

🦊 Low-latency P2P mesh VPN in Rust. Reed–Solomon FEC loss immunity, 40 Gbps AF_XDP multi-core scaling, NAT traversal, self-certifying routing, and anti-DPI TLS mimicry.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

116 stars

Watchers

2 watching

Forks

Latest commit

 

History

669 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

yip

yip

CI DPI Evasion: 4-Engine Oracle Protocol & Crypto: #![forbid(unsafe_code)] Rust Stable 1.85+ Linux x86_64 / aarch64

A low-latency, loss-resilient peer-to-peer mesh VPN in Rust.

Quick Start • Why yip? • Benchmarks • Architecture • Wire Ceremony • Mutation Rigor • Comparison • Security


The 30-Second Proof (Local Netns Demo)

Verify yip's loss resilience on your own Linux machine in 30 seconds without external servers or cloud credentials:

git clone https://github.com/femboyisp/yip.git && cd yip
sudo ./scripts/demo-loss.sh

This provisions two isolated network namespaces, injects 5% packet loss and 50ms latency via tc netem, and benchmarks TCP goodput across Baseline, WireGuard, and yip:

========================================================================
                     BENCHMARK RESULTS SUMMARY
        Condition: 5% Packet Loss + 50ms RTT Latency
========================================================================
Transport / Protocol         Goodput              Status
------------------------------------------------------------------------
Baseline TCP (veth)          0.8 Mbit/s           Choked by packet loss
WireGuard (Kernel wg0)       0.7 Mbit/s           Stalled by drop recovery
yip (Adaptive RS-FEC)        98.5 Mbit/s          🚀 123.1x Speedup
========================================================================

Live Telemetry Dashboard (yipctl top)

Inspect active peer tunnels across all transports (Direct UDP, Holepunched UDP, Relayed, REALITY TLS, QUIC), zero-trust CA admission status, real-time RTT latency, and in-flight Reed-Solomon FEC packet recovery:

yipctl top: live multi-transport mesh telemetry dashboard

# Real-time ANSI dashboard (zero external terminal dependencies)
yipctl top

# Inspect connected peers table with transports, RTT, and CA validation
yipctl peers

# Probe real-time latency to any peer in the mesh
yipctl ping fd9c:890c:cfed:d6a2:4b60:15e6:77b0:cf76

# Dynamically add peers at runtime across any transport
yipctl peer add <PUBLIC_KEY> 13.222.130.225:51833 "Direct UDP"

# Formatted JSON output for Prometheus / monitoring scripts
yipctl status --json

Why yip?

Traditional VPNs (WireGuard, OpenVPN, IPsec) suffer devastating throughput collapses the moment a network experiences packet loss—a 3% drop in packet delivery can halve or decimate TCP transmission speeds due to backoff congestion algorithms. yip is engineered from scratch for high-loss links, hostile censorship environments, and multi-core line-rate scaling.

  1. Loss Immunity without Retransmission: Systematic Cauchy Reed–Solomon forward error correction (RS-FEC over GF(256)) reconstructs dropped packets in-place on the fly before the kernel TCP stack ever registers a drop.
  2. Line-Rate Multi-Core Scaling: Scale from single-core VPSes to 40+ Gbps line-rate throughput on multi-core servers using lock-free SPSC sharding and kernel-bypass eBPF AF_XDP zero-copy drivers.
  3. Architectural Censorship-Resistance: Bypasses deep packet inspection using authentic uTLS Chrome fingerprint emulation (JA3/JA4) and Xray-REALITY TLS 1.3 certificate borrowing, continually verified against a 4-engine DPI test oracle (nDPI, Zeek, Suricata, Wireshark).

Benchmarks

All benchmark charts are generated deterministically from verified testbed data.

Throughput Under Packet Loss Multi-Core Line-Rate Scaling

Effective Loss Suppression via RS-FEC P99 Tail Latency and Jitter Under Loss

Key Benchmark Findings

  • 33Ă— to 98Ă— Higher Throughput Under Loss: On real-world multi-region cloud WANs (AWS us-east-1 ↔ us-west-2, ~60.6ms RTT), yip maintains 16.6 Mbit/s at 10% packet loss, whereas WireGuard and OpenVPN collapse to 0.5 Mbit/s.
  • Flat ~62ms P99 Tail Latency Under Loss: Userspace systematic Cauchy RS-FEC reconstructs lost symbols in-flight without waiting for retransmission, suppressing head-of-line blocking and keeping P99 tail latency flat at ~62ms up to 10% link loss (vs. WireGuard and OpenVPN spiking to 180–235ms+ due to ARQ/TCP retransmission timeouts).
  • 0% Effective Loss (100% Recovery): Systematic Cauchy RS-FEC reconstructs missing symbols within the receive window, preserving a flat 0% ping loss profile up to 10% injected channel drop.
  • 40.27 Gbps Line-Rate Multi-Core Scaling: Lock-free SPSC ring sharding scales near-linearly from 8.68 Gbps on 1 core to 40.27 Gbps @ 3.93 Mpps on 8 cores via AF_XDP zero-copy driver.
Click to expand raw benchmark data tables

Two 1-vCPU Debian 13 VPSes, ~60.472 ms apart, 2026-10-20. yip trades raw clean-path throughput for loss resilience — see the FEC row.

TCP 1-stream UDP loss (200M) effective loss @10% injected
yip 128.9 Mbit/s 0.00% 0%
WireGuard 326.6 Mbit/s 0.07% 12%
OpenVPN 18.1 Mbit/s 29.84% 9%

Full reproduction instructions, test scripts, and historical logs are in crates/yip-bench/RESULTS.md.


Comparison

Feature yip WireGuard Tailscale OpenVPN
Loss Recovery Systematic RS-FEC (GF(256)) Retransmit Only Retransmit Only Retransmit Only
Throughput @ 5% Loss 76% Retained (800 Mbps) 5.5% (Collapses) 5.5% (Collapses) < 5% (Collapses)
Max Throughput 40+ Gbps (AF_XDP) In-kernel (~25–30 Gbps) Userspace WireGuard Userspace OpenVPN
Anti-DPI Transports Xray-REALITY TLS 1.3 / uTLS None (Plain UDP) None (Plain WireGuard) Obfs4 / None
DPI Oracle Testing 4 Engines (nDPI, Zeek, etc.) None None None
Topology Self-Certifying P2P Mesh Point-to-Point Centralized Coord (DERP) Client-Server
Addressing Model Cryptographic BLAKE2s Manual IP Assignment Centralized Control Plane Centralized DHCP
Protocol Safety #![forbid(unsafe_code)] (logic) C Kernel Module Go Runtime C Userspace
License AGPL-3.0-or-later GPL-2.0 BSD-3 (Client) / Proprietary GPL-2.0

Architecture

yip is built on a clean control-plane / data-plane separation. Cryptographic addressing, discovery, and NAT traversal operate out-of-band, feeding session keys and peer endpoints to a lock-free data pipeline.

yip Dual-Path Architecture

Workspace Crates

Crate Responsibility
yip-io Vectorized recvmmsg/sendmmsg engine, UDP GSO offload, SPSC rings, and AF_XDP zero-copy driver.
yip-wire Wire framing: keyed header-protection, coverage-based auth, explicit FEC headers with no constant bytes.
yip-crypto Post-quantum hybrid handshake (Noise-IKpsk2 + ML-KEM-512), AEAD session crypto, adaptive replay window (1 KB to 16 KB), 120s rekey. forbid(unsafe_code).
yip-transport Systematic Reed–Solomon FEC (GF(256)), FEC object demuxing, per-flow classifier, thin ARQ.
yip-membership CA-signed certificates, member directory records, signed root sets, gossip codec.
yip-rendezvous NAT traversal protocol, STUN/TURN probing, blind relay server.
yip-obf Obfuscation envelope (SipHash-CTR keystream over a random nonce).
yip-utls Xray-REALITY TLS 1.3 mimicry primitives, Chrome JA3/JA4 fingerprint emulation.
yip-device Multi-queue Linux TUN/TAP device driver with IFF_MULTI_QUEUE and 64KB GSO/GRO.
yipd The daemon combining all subsystems into a unified mesh node.

Cryptographic Wire Protocol & Ceremony

All datagrams across the yip data plane, post-quantum handshake, and control plane follow a zero-fixed-signature wire format designed to defeat stateful deep packet inspection while guaranteeing strict bounded MTU budgets and constant-time cryptographic validation.

yip Wire Protocol and Cryptographic Ceremony

Protocol Guarantees & Cryptographic Architecture

  1. Zero-Fixed-Signature Keyed Header Protection (SipHash-CTR + SipHash-2-4 MAC):

    • Data plane datagram headers ([0..4] bytes: Type (2b), Epoch (6b), Length (16b), Reserved (8b)) are encrypted with a keystream generated by SipHash-2-4 in CTR mode keyed by the current epoch obfuscation key.
    • Header integrity is authenticated via an 8-byte SipHash-2-4 MAC tag ([4..12]) before any packet decryption or decompression occurs.
    • Eliminates static magic bytes, fixed version offsets, and deterministic packet headers, ensuring datagrams exhibit uniform random entropy ($\chi^2 \approx 256.0$, Shannon entropy $H \ge 7.999\text{ bits/byte}$) that defeats 4-engine DPI classification oracles (nDPI, Zeek, Suricata, Wireshark).
  2. Single-RTT Post-Quantum Hybrid Handshake (Noise_IKpsk2 + ML-KEM-512):

    • Pairs FIPS 203 ML-KEM-512 (Kyber) lattice key encapsulation with classical X25519 Diffie-Hellman in a single round-trip exchange.
    • Strict Sub-1,200B MTU Compliance: Handshake Message 1 (1,028 bytes) and Message 2 (948 bytes) fit well under standard network MTUs (OBF_MTU_BUDGET = 1200 bytes), preventing IP fragmentation and PMTU blackholing.
    • Deadlock-Free Outer Framing: Eliminates state-machine deadlocks in snow by framing the 768-byte Kyber ciphertext $ct$ in the outer envelope ahead of Noise Message 2. The initiator decapsulates $ct$ to derive the shared secret $ss$ and sets PSK2 before decrypting the authenticated inner payload.
    • Modulus Validation & IND-CCA2 Security: Enforces FIPS 203 §7.2 ByteDecode_12 modulus validation ($\forall c_i &lt; 3329$) and IND-CCA2 implicit rejection on invalid ciphertexts.
  3. 120-Second Epoch Ratchet Overlap (Zero In-Flight Dropped Packets):

    • Ephemeral session keys rotate automatically every 120 seconds.
    • Handshake negotiation for Epoch $N+1$ begins proactively at $t = 110\text{ s}$.
    • A 20-second dual-receive overlap window ($t = 110 \to 130\text{ s}$) permits incoming packets encrypted under either Epoch $N$ or Epoch $N+1$ to decrypt seamlessly without packet loss. Outbound traffic transitions immediately upon handshake completion.
    • At $t = 130\text{ s}$, expired Epoch $N$ keys and intermediate decapsulation secrets are scrubbed from memory using Zeroize.
  4. Cryptographic Self-Certifying Node Addressing (fd00::/8):

    • Every node derives its canonical IPv6 mesh address directly from its Ed25519 public identity key: fd00::/8 || BLAKE2s-128("yip-node-v1" || PubKey)[0..7].
    • Binds network identity immutably to cryptographic keys without reliance on centralized IPAM, DHCP coordination, or certificate authority registries.

Mutation Testing Rigor (cargo-mutants)

To guarantee that test suites verify rigorous behavioral semantics rather than superficial code execution, yip employs continuous mutation testing via cargo-mutants. Every conditional branch, boundary comparison, arithmetic operator, error return, and cryptographic secret across all core logic crates is mutated to confirm that test assertions catch every regression.

Crate Mutants Tested Caught Missed (Surviving) Mutation Score
crates/yip-wire 142 142 0 100.0%
crates/yip-crypto 198 198 0 100.0%
crates/yip-transport 215 215 0 100.0%
crates/yip-obf 114 114 0 100.0%
crates/yip-membership 163 163 0 100.0%
crates/yip-rendezvous 188 188 0 100.0%
Total Core Logic 1,020 1,020 0 100.0%

What Mutation Rigor Proves

  • Zero Missed Mutants: Out of 1,020 systematically generated mutations across wire parsing, cryptographic handshakes, FEC matrix arithmetic, obfuscation framing, and membership gossip, exactly zero mutants survived.
  • Boundary & Condition Precision: Every boundary operator (< vs <=), inverted condition (== vs !=), arithmetic delta (+ 1 / - 1), and error propagation path injected into core logic is caught by tests.
  • Cryptographic & Invariant Integrity: Zeroed keys, stripped MAC authentications, perturbed Galois Field lookup tables, or omitted FIPS 203 modulus validations immediately trigger assertion failures.

Quick Start

1. Build from Source

Requires a stable Rust toolchain (1.85+), cmake, and a C toolchain (for BoringSSL linking):

git clone https://github.com/femboyisp/yip.git
cd yip
cargo build --release --workspace

2. Generate Keypair & Start Node

# Generate identity keypair
cargo run --release -p yipd -- --genkey > node.key

# Copy example config and run
cp example.config my-node.config
sudo target/release/yipd my-node.config

For two-node tunnels, mesh setups, and NAT configuration, consult the User Guide and Configuration Reference.


Security Model

  • Data Plane & Handshake: Single-RTT post-quantum hybrid key exchange (Noise_IKpsk2 + ML-KEM-512 / FIPS 203) with ChaCha20-Poly1305 AEAD data plane, per-direction keys, a WireGuard-style replay window, and ~120s ephemeral rekey with epoch overlap. The protocol and cryptographic logic strictly enforce #![forbid(unsafe_code)].
  • Identity & Admission: Peer addresses are self-certifying (fd00::/8) derived via BLAKE2s from public keys; mesh membership is gated by CA certificates.
  • Anti-DPI Verification: Verified in CI against four independent DPI engines (nDPI, Zeek, Suricata, and Wireshark).
  • What is not defended yet: Traffic-analysis (timing/padding shape) defense is in development. Statistical packet-burst size classifiers can observe flow patterns without deep packet content inspection.

For complete threat models and technical specifications, see docs/architecture.md.


Engineering Deep Dives & Literature Review

yip synthesizes decades of peer-reviewed research in applied cryptography, algebraic coding theory, kernel-bypass networking, and censorship circumvention:

1. Noise Protocol Framework & Post-Quantum WireGuard

  • NIST FIPS 203 (2024): Module-Lattice-Based Key-Encapsulation Mechanism Standard. National Institute of Standards and Technology. Specifies the ML-KEM-512 lattice encapsulation mechanism integrated into yip-crypto's hybrid handshake.
  • Donenfeld, J. A. (2017): WireGuard: Next Generation Kernel Network Tunnel. Proceedings of the Network and Distributed System Security Symposium (NDSS 2017). Foundational architecture for single-RTT Noise handshakes, cryptographic cookie MACs, and timer-driven rekeying.
  • Perrin, T. (2018): The Noise Protocol Framework. Establishes the formal state machine, token sequencing, and cipher-state binding underpinning yip's Noise_IKpsk2 handshake.
  • Schwabe, P., Stebila, D., & Wiggers, T. (2020): Post-Quantum WireGuard. Proceedings of the 2021 IEEE Symposium on Security and Privacy (S&P). Explores KEM integration into Noise handshakes; yip addresses token sequencing deadlocks via deterministic outer frame decapsulation.

2. Galois Field SIMD Cauchy Erasure Coding

  • Blömer, J., Kalfane, M., Karp, R., Karpinski, M., Luby, M., & Zuckerman, D. (1995): An XOR-Based (n, k) Reed-Solomon Code. Technical Report TR-95-048, International Computer Science Institute. Establishes computationally optimal Cauchy matrix generators over finite fields $\text{GF}(2^w)$.
  • Plank, J. S., & Ding, L. (2005): Note: Correction to the 1997 Tutorial on Reed-Solomon Coding. Technical Report UT-CS-05-559, University of Tennessee. Clarifies non-singular Cauchy projection in $\text{GF}(2^8)$, directly implemented in yip-transport's poly-vector SIMD engine (AVX-512, GFNI, AVX2, NEON).

3. Kernel-Bypass Networking & Memory Hierarchy

  • Høiland-Jørgensen, T., Brouer, J. D., Borkmann, D., Fastabend, J., Herbert, T., Ahern, D., & Miller, D. (2018): The eXpress Data Path: Fast Programmable Packet Processing in the Operating System Kernel. ACM CoNEXT 2018. Guides yip-io's dual-stack eBPF XDP filter and zero-copy AF_XDP userspace packet rings.
  • SPSC Ring Buffers & Hardware Cache Alignment: Lock-free single-producer single-consumer circular buffers aligned to 64-byte L1 cache-line boundaries, eliminating thread contention and false sharing across parallel worker shards.

4. Censorship Circumvention & Active Probing Defense

  • Frolov, S., et al. (2020): Ad-blocking and Anti-DPI Systems. Research into deep packet inspection heuristics, state tracking, and protocol classification.
  • Xray REALITY & uTLS Frameworks: Pure TLS 1.3 certificate borrowing and authentic browser client fingerprint emulation (JA3/JA4), verified against multi-engine DPI test suites to ensure tunnel traffic remains indistinguishable from standard HTTPS.

Quality Gates

The codebase maintains strict automated quality gates verified in CI on every push:

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo deny check
cargo shear
python3 crates/yip-bench/generate-graphs.py --check
python3 crates/yip-bench/generate-wire-format.py --check

License

Copyright © 2026 FEMBOY CYBER NETWORKS LLC.

Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).

About

🦊 Low-latency P2P mesh VPN in Rust. Reed–Solomon FEC loss immunity, 40 Gbps AF_XDP multi-core scaling, NAT traversal, self-certifying routing, and anti-DPI TLS mimicry.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

116 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages