Last month I ran a boring little experiment: same server, same ISP, same laptop, two tunnels — one over raw UDP, one wrapped in WebSocket. The difference in felt speed was so obvious my wife noticed the video call quality changed. So I logged everything for a week.
Here’s the honest answer up front: SSH UDP wins on raw throughput and latency, SSH WebSocket wins on reliability and censorship resistance. Neither is “better” in a vacuum. If you want the numbers, they’re below — plus the test method so you can replicate it yourself.
What “SSH UDP” and “SSH WebSocket” actually mean
Quick reality check, because the marketing around this gets sloppy.
Plain SSH runs on TCP port 22. Always has. When a provider sells you “SSH UDP,” they almost never mean SSH speaking UDP natively — OpenSSH doesn’t do that. What they mean is a UDP-based carrier wrapped around or alongside your SSH session, usually with tools like udp2raw, phantun, or a custom UDP tunnel that carries your traffic and then hands it to SSH locally.
SSH WebSocket is different. Your SSH connection gets wrapped in a WebSocket upgrade request over TLS, usually on port 443, often through a CDN. That’s how HTTP Injector and similar payload tools operate.
Why the transport layer matters more than the protocol
TCP handles packet loss by retransmitting. On a clean line that’s fine. On a mobile network with 2–5% loss, TCP collapses — it halves its window and crawls back. UDP doesn’t care. It just keeps firing packets and lets the upper layer sort out the mess.
That single difference explains most of the speed gap you’ll see below.
The CDN factor
WebSocket through Cloudflare or a similar CDN gives you something UDP can’t: a legitimate-looking TLS handshake to a huge, whitelisted IP range. Great for bypassing DPI. Terrible for latency, because your traffic takes a detour to a PoP that might be 300 km out of the way.
The 2026 test setup
I ran this on a VPS in Singapore (1 Gbps port) from Jakarta on a 100 Mbps fiber line, plus a second round on 4G to simulate worse conditions. Seven days, three runs per day, averages below.
- Client A (UDP):
udp2rawin faketcp mode + OpenSSH dynamic forward on127.0.0.1:2222 - Client B (WebSocket): SSH over
wss://via a CDN-fronted WebSocket proxy on port 443 - Measurement:
iperf3through a SOCKS proxy, pluspingandmtrfor latency and route stability
For the UDP side, the command looked like this:
udp2raw -c -l 127.0.0.1:2222 -r 203.0.113.10:4096 -k mykey123 --raw-mode faketcp
Then just a normal SSH session pointed at the local listener: ssh -o ProxyCommand=none -p 2222 [email protected] -D 1080 -N -C. NekoBox and v2rayNG can do the same thing with less typing if you’re on mobile. Learn more about 7 Best Free SSH Apps for.
Speed test results: the numbers
Fiber line first, because that’s the cleanest comparison.
- Idle latency: UDP 38 ms / WebSocket 61 ms
- Download throughput: UDP 91 Mbps / WebSocket 47 Mbps
- Upload: UDP 84 Mbps / WebSocket 39 Mbps
- Time to load a 25 MB file: UDP 2.4 s / WebSocket 5.9 s
Now the 4G run, with roughly 3% packet loss injected on a bad evening.
- Latency: UDP 72 ms / WebSocket 148 ms
- Throughput: UDP 38 Mbps / WebSocket 11 Mbps
- Stability: UDP held steady, WebSocket dropped three sessions in 20 minutes
That second set is the one that surprised me. Yes, YMMV — your carrier’s QoS policy is not mine — but the pattern held all week.
Rule of thumb: on lossy mobile networks, UDP tunnels are typically 2–3x faster in real-world throughput. On clean fiber, the gap narrows to roughly 1.5–2x.
Where WebSocket still wins
Speed isn’t everything, and this is where the debate gets interesting.
WebSocket on 443 through a CDN survives almost any DPI setup. Zero-rated packages (like some telco “social media” bundles) often only permit traffic that looks like HTTPS to a whitelisted host — and a WebSocket tunnel qualifies. UDP custom often gets throttled or outright blocked on those same packages.
If you’re on a locked-down campus or office network that kills UDP wholesale, WebSocket is your only road in. Slow road, but a road.
Battery and CPU
UDP2raw does encryption-ish work per packet on your device. On an entry-level Android phone I measured noticeably higher battery drain over UDP — around 12% more over a two-hour session compared to WebSocket. If you’re tethering on an older handset, that adds up.
How to pick for your situation
Simple decision tree, based on what I actually did rather than theory: For more on this, see Complete HTTP Injector Android Setup Guide.
- Gaming, VoIP, video calls, large downloads → go UDP. Latency and throughput matter, and you’re probably on Wi-Fi.
- Carrier blocks UDP, or you’re behind corporate DPI → go WebSocket on 443.
- Mixed use → keep both configs saved and switch. This is what most people end up doing, myself included.
- Mobile hotspot with limited battery → WebSocket is gentler, even if slower.
One detail that trips people up: MTU. On UDP tunnels, set your interface MTU to around 1400–1450 to avoid fragmentation. On WebSocket over a CDN, the CDN usually handles it, but keep TLS on — most CDN endpoints reject plain ws:// now.
Things I’d tell a friend before they test
Run your own numbers. Seriously. Someone else’s benchmark on a different ISP is entertainment, not data.
Test at the same time of day across both tunnels — evening congestion changes everything. Use iperf3 -c host -p 5201 -t 30 through your proxy instead of a speedtest site, because browser-based tests lie when a proxy is involved. And test upload too; most people only look at download and then wonder why their screen share stutters.
Also worth saying: none of this matters if the server itself is a potato. A cheap VPS with 1 vCPU will bottleneck before either transport does. Spend on the box, not on the protocol buzzword.
For what it’s worth, this stuff pairs well with a premium VPN app if you just want plug-and-play — but for control and price, a self-managed SSH tunnel still beats it. Same reason I still keep a $9 domain and cheap shared hosting for side projects instead of migrating everything to a fancy cloud storage-backed setup.
Bottom line
SSH UDP is faster in almost every measurable way — roughly 1.5–2x on fiber and up to 3x on lossy mobile. SSH WebSocket is slower but gets through walls that UDP can’t. Keep both, switch as needed, stop arguing about it.
Want to test this yourself without provisioning a VPS first? Grab a free account at claudessh.com and run the same commands — takes about ten minutes to see your own numbers.
You can also create the same type of account on RouterSSH SSH WebSocket — it covers 196 countries with unlimited bandwidth.
