Carry WireGuard traffic across networks that permit TCP while restricting raw UDP—without a proxy, relay, or userspace encapsulation hop.
WGTCP
TCP transport patch for WireGuard
Up to +21.1%.
519.3 Mb/s TCP-WG versus 428.9 Mb/s UDP-WG in the measured x64 56 ms bulk-transfer cell.
Zero formal meltdowns across 122 valid post-repair executions under the campaign's predeclared three-part definition.
Same WireGuard keys, Noise protocol, peer identities, AllowedIPs, rekeying, and authentication. WGTCP changes the carrier—not the cryptography.
Opensource
Tested across x64 and ARM64
Faster in measured workloads
WGTCP adds an opt-in TCP path beneath the existing WireGuard encryption layer. It beat UDP-WG in several measured clean-path workloads while adding reliable reach across UDP-blocking networks.
Bulk TCP
519.3 Mb/s through TCP-WG versus 428.9 Mb/s through UDP-WG in the measured cell.
Requests
152.55 versus 131.14 requests per second in the measured x64 cell.
Lower mean CPU
51.2% mean CPU through WGTCP versus 61.3% through UDP-WG in the measured cell. Clean-LAN bulk transfer also used 6.7–10.9% less mean CPU across x64 and ARM64.
Valid runs
Zero formal meltdowns under the campaign's predeclared three-part definition. Read the report for limits and exceptions.
Across the test matrix
Four application workloads across clean and lossy paths. Each cell is the mean of three end-to-end runs; architecture is labeled where relevant. Bar lengths compare WGTCP with UDP-WG only within that row.
Four-stream TCP goodput
Cross-continent file-transfer workload · Mbps received.
Multiplexed web requests
5,000 objects · 50 TLS connections × 10 streams · requests/s.
Sequential HTTPS
200 GETs · new TLS 1.3 connection per request · requests/s.
Lower measured latency
1,000 ICMP probes alongside a pre-warmed SSH session · mean inner RTT · lower is better.
Results are measured comparisons, not universal guarantees. Path latency, packet loss, workload, queueing, concurrency, architecture, and kernel configuration affect outcomes. Important: clean x64 bulk-TCP runs at approximately 195–227 ms favored UDP-WG by 14–23%; benchmark the path you intend to operate.
What changes—and what does not
WireGuard crypto.
TCP transport.
Handshakes, keepalives, and encrypted data are framed inside a long-lived per-peer TCP stream. WireGuard authentication remains authoritative. UDP mode is unchanged and remains the default.
TCP mode requires WGTCP at both endpoints and does not make a TCP interface interoperable with an unmodified UDP-only peer.
IPv6
ready
UDP SOCKET
FRAME → TCP STREAM
Build it, install it, or inspect the change
Get the source, binaries, or the patch
Source
The complete kernel, tools, UAPI, tests, documentation, performance evidence, and packaging tree.
Get .zip ↓Get .tar.gz ↓Binaries
Prebuilt Ubuntu 24.04 packages for the exact 6.8.0-136-generic kernel. Verify the ABI, architecture, and checksums first.
AMD64 ↓ARM64 ↓The patch
One reviewable patch containing the WGTCP transport changes for developers who want the delta directly.
Get WGTCP.patch ↓Checksums ↗