OpenConnect vs WireGuard: Which VPN Protocol Should You Use?
Published 7 min read
Open the protocol menu in a VPN app and you'll usually find a few names you've never heard of. Two of the most common are OpenConnect and WireGuard. Both encrypt your connection, but they're built in very different ways, and that changes how they behave on your phone day to day.
Short version: WireGuard is usually faster and handles switching networks better. OpenConnect connects more reliably on networks that only let normal web traffic through. The rest of this guide explains why, so you can pick the right one for where you are.
What is a VPN protocol?
A VPN protocol is the set of rules your device and the VPN server use to set up an encrypted tunnel and send your data through it. It decides how the two sides prove who they are, which encryption is used, and how data packets travel. The protocol affects speed, battery use and how well the connection holds up when your network changes. It doesn't change what a VPN is for: keeping your traffic private on networks you don't control.
What is OpenConnect?
OpenConnect started in 2008 as an open-source client for Cisco's AnyConnect VPN, which companies use to connect employees to office networks. It has since grown into a full open-source VPN setup, with its own server called ocserv.
OpenConnect is built on TLS, the same technology that secures websites when you see the padlock in your browser. It works in two layers:
- A TLS connection over TCP handles signing in and keeps the session in control. It usually runs on port 443, the same port websites use for HTTPS.
- A DTLS channel over UDP carries your actual data. DTLS is TLS adapted for UDP, which is faster for things like video and calls. If UDP doesn't work on a network, OpenConnect sends everything through the TCP connection instead.
Because it uses TLS, OpenConnect gets the benefit of one of the most studied and widely deployed security protocols on the internet. It also supports many ways of signing in, such as passwords, certificates and one-time codes, which is why businesses like it.
What is WireGuard?
WireGuard is a much newer protocol, designed by Jason A. Donenfeld and added to the Linux kernel in 2020. Its goal was to be simpler than older VPN protocols. The core code is around 4,000 lines, small enough for security researchers to review in full.
WireGuard makes a few strong choices:
- Fixed, modern cryptography. It always uses the same set of algorithms (Curve25519, ChaCha20-Poly1305 and BLAKE2s, among others), so there's no negotiation and no risk of falling back to a weak cipher.
- UDP only. All traffic goes over UDP, which keeps it fast. There's no built-in TCP mode.
- Devices are identified by keys, not network addresses. Each device has a public key. If your phone moves from Wi-Fi to mobile data, the tunnel simply continues from the new address.
- Quiet when idle. WireGuard doesn't send traffic when you aren't using the connection, unless it's set up to.
OpenConnect vs WireGuard at a glance
| OpenConnect | WireGuard | |
|---|---|---|
| Built on | TLS and DTLS | Its own design (Noise framework) |
| Transport | UDP for data, with TCP fallback | UDP only |
| Usual port | 443 (same as HTTPS) | No fixed port; often 51820 |
| Encryption | Negotiated through TLS (e.g. AES-GCM, ChaCha20) | Fixed: ChaCha20-Poly1305 |
| Speed | Good over UDP; slower on TCP fallback | Usually the faster of the two |
| Switching networks | Reconnects, which can take a moment | Continues almost instantly |
| Battery use | Moderate | Generally lower |
| Code size | Larger; relies on TLS libraries | Small and easy to audit |
| Best for | Strict networks that only allow web traffic | Everyday use, streaming, gaming, calls |
Speed and latency
WireGuard is usually faster. Its handshake takes a single round trip, it uses efficient encryption, and it runs over UDP all the time. On a phone, you'll notice this as quicker connections and lower ping, which matters for gaming and video calls.
OpenConnect is also quick when its UDP data channel is working. The difference shows up when it has to fall back to TCP. Sending your traffic through a TCP tunnel means two layers of TCP are each trying to fix lost packets, and on a poor connection that can make things noticeably slower. If you're on a stable network that allows UDP, the gap between the two is smaller.
Security
Both are strong choices when set up properly, just with different approaches.
- OpenConnect relies on TLS, which has decades of research and real-world use behind it. The flip side is that TLS is large and flexible, so security depends on using up-to-date versions and good settings.
- WireGuard keeps things small and fixed. Fewer moving parts means fewer places for bugs to hide, and its design has been formally analyzed by researchers. If one of its algorithms is ever found weak, the fix is a new protocol version rather than a settings change.
One privacy point worth knowing: by design, a WireGuard server keeps each device's assigned internal address and the last IP address it connected from in memory. VPN providers handle this in their own ways, so it's one of the details to look at when you compare services.
No protocol makes you anonymous on its own. A VPN protects your connection from people on the same network and from your internet provider. It doesn't stop websites from knowing you if you sign in to them.
On your phone: battery and switching networks
This is where WireGuard shines. Because devices are recognized by their keys, walking out of a café and switching from Wi-Fi to 4G or 5G doesn't break the tunnel. And because WireGuard stays quiet when you're not using it, it's generally easier on your battery.
OpenConnect keeps a session open and has to re-establish its connections when your network changes. It handles this well, but you may see a short pause while it reconnects.
Connecting on strict networks
Some public networks, like certain hotel and airport Wi-Fi, only allow normal web traffic and block other ports or UDP. This is where OpenConnect has the edge. It can run entirely over TCP port 443, the same way websites do, so it usually connects on networks like these.
WireGuard only uses UDP. On a network that doesn't allow UDP, it can't connect at all, and you'd need to switch protocols.
Which one should you use?
- Choose WireGuard for everyday use: browsing, streaming, gaming and calls, especially on mobile where you move between networks. It's fast and light on battery.
- Choose OpenConnect when WireGuard won't connect, usually on public Wi-Fi that only allows web traffic.
- Not sure? Let your VPN app pick for you, and only change protocols if you have trouble connecting.
Using OpenConnect and WireGuard in Hello VPN
Hello VPN supports both protocols, along with IKEv2 and others. Its Auto option picks a protocol for you. If a network gives you trouble, you can choose one yourself in the app's protocol settings. Try a different option and see which one connects best where you are.
New to VPNs? Our answers to 10 common VPN questions cover the basics, and the history of VPN explains how we got from early tunneling protocols to modern ones like WireGuard.
Frequently asked questions
Is WireGuard better than OpenConnect?
For most people on a phone, yes: it's usually faster, uses less battery and handles network changes smoothly. OpenConnect is the better pick on networks that only allow web traffic, where WireGuard can't connect.
Does WireGuard use UDP or TCP?
UDP only. WireGuard has no built-in TCP mode, which is part of why it's fast, and also why it can't connect on networks that don't allow UDP.
Does OpenConnect use TCP or UDP?
Both. It signs in and controls the session over TCP (usually port 443) and sends your data over UDP using DTLS. If UDP isn't available, it sends everything over TCP.
Is OpenConnect secure?
Yes, when it's kept up to date and configured properly. It uses TLS, the same widely studied technology that protects websites.
Is WireGuard safe?
Yes. It uses modern cryptography, has a small codebase that's easy to review, and has been analyzed by security researchers. Like any protocol, it protects your connection, not what you do once you sign in to a website.
“WireGuard” is a registered trademark of Jason A. Donenfeld.