Architecture Overview
Applicable version: technical preview. P2P reachability, OpenWrt hardware, non-zero
SO_MARK, long-running load, WAN/netem, and public NAT traversal are not universal support claims.
frp-tun adopts a Dual-Plane design that strictly decouples end-to-end encryption from carrier transport:
- Isolation & Policy Routing Layer: Installs guard blackhole routes before configuring interfaces to eliminate unencrypted packet leaks during failover or recovery;
- WireGuard Overlay Plane: Encrypts datagrams at local loopback UDP ports before packets reach user-space carriers;
- Bridge Pipeline: Pumps datagrams between WireGuard loopback sockets and active carriers, multiplexing probe frames via
ProbeMux; - Carrier Underlay Plane: Prioritizes direct P2P (XTCP/QUIC) connections and seamlessly fails over to STCP relays under supervisor control.