Most VPN apps let you pick a "protocol", and the choice matters more than people think. It decides how fast your connection is, how much battery and data it uses, and, in countries that filter the internet, whether it connects at all. This guide compares the three protocols you are most likely to meet today: OpenVPN, WireGuard and AmneziaWG. No marketing, just how each one works and when it is the right tool.
The short answer
- On an open network (home, office, most countries): use WireGuard. It is the fastest and simplest of the three.
- On a network that blocks or throttles VPNs: use AmneziaWG. It keeps WireGuard's speed but disguises the traffic pattern that filters look for.
- When only TCP or port 443 gets through (some hotel or corporate networks): OpenVPN over TCP is still a useful fallback, even though it is slower.
OpenVPN: the old workhorse
OpenVPN has been around since 2001. It builds its tunnel on top of TLS, the same technology that protects HTTPS websites, and it uses the OpenSSL library for encryption. That gives it a long track record and a huge amount of configuration options: you can choose ciphers, authentication methods, compression, ports, and whether it runs over UDP or TCP.
That flexibility is both its strength and its weakness:
- Strengths: it can run over TCP on port 443, which looks similar to ordinary web traffic at first glance; it is supported by almost every router, firewall and operating system; and it has been audited many times over two decades.
- Weaknesses: the code base is large (tens of thousands of lines, plus OpenSSL), it runs in user space so every packet is copied between the kernel and the app, and its handshake is slow. On a phone you notice it as slower reconnects when you switch between Wi-Fi and mobile data, and as more battery drain.
OpenVPN over TCP has an extra problem known as "TCP meltdown": when you tunnel TCP traffic inside a TCP tunnel and packets are lost, both layers retry at the same time and throughput can collapse. That is why OpenVPN over UDP is faster, and why TCP mode is best kept as a fallback.
WireGuard: small, fast and modern
WireGuard was designed by Jason A. Donenfeld and was merged into the Linux kernel in version 5.6 in 2020. Its design goal was the opposite of OpenVPN: as little code and as few options as possible. The core is roughly 4,000 lines of code, small enough for one person to review.
Instead of letting you choose ciphers, WireGuard uses one fixed, modern set:
- Curve25519 for key exchange,
- ChaCha20-Poly1305 for encrypting and authenticating data,
- BLAKE2s for hashing.
There is nothing to misconfigure: if both sides run WireGuard, they use strong cryptography. If one of these algorithms is ever broken, the whole protocol gets a new version instead of a new option.
In daily use WireGuard has three practical advantages:
- Speed. It runs inside the kernel on Linux and Android, and its handshake is a single round trip. Connections come up in well under a second.
- Roaming. A WireGuard peer is identified by its key, not its IP address. When your phone switches from Wi-Fi to 4G, the tunnel simply keeps going from the new address.
- Battery and data. When nothing is being sent, WireGuard is silent. It only sends small keepalive packets if you turn that option on.
The weakness is the flip side of its simplicity: WireGuard only runs over UDP, and its packets have a very recognizable shape. The first message of every handshake is exactly 148 bytes long and starts with a fixed type number. A network filter does not need to decrypt anything to say "this is WireGuard" and drop it.
AmneziaWG: WireGuard that is harder to spot
AmneziaWG is a fork of WireGuard made by the Amnezia project, an open-source VPN team. It keeps WireGuard's cryptography and speed, and changes only what an observer can see from outside: the size and headers of packets, especially during the handshake.
A typical AmneziaWG config has a few extra lines that ordinary WireGuard does not understand:
Jc,Jmin,Jmax: how many "junk" packets of random content and random size to send before the handshake, so the conversation no longer starts with the familiar WireGuard pattern.S1,S2: random padding added to the handshake packets, so they are no longer exactly 148 and 92 bytes.H1toH4: custom values for the message type headers, replacing WireGuard's well-known 1, 2, 3 and 4.
The client and the server must use the same values. That is why an AmneziaWG config only works in an app that supports AmneziaWG (the AmneziaWG app or the AmneziaVPN app), and not in the plain WireGuard app. If all these values are set to zero, AmneziaWG behaves exactly like WireGuard.
What AmneziaWG does not change is the encryption. Your traffic is protected by the same Curve25519 and ChaCha20-Poly1305 as in WireGuard. The extra lines are camouflage, not extra security.
Side-by-side comparison
| OpenVPN | WireGuard | AmneziaWG | |
|---|---|---|---|
| Transport | UDP or TCP | UDP only | UDP only |
| Speed | Moderate | Very fast | Very fast |
| Connect / reconnect time | Seconds | Under a second | Under a second |
| Battery use on phones | Higher | Low | Low |
| Easy to detect by filters | Yes, unless wrapped in TLS tricks | Yes, very | Much harder |
| Code size | Large | Very small | Small (WireGuard plus changes) |
| Works in the plain WireGuard app | No | Yes | No, needs an Amnezia app |
Which one should you pick?
You live somewhere without internet filtering
Use WireGuard. It is fast, light on battery, and supported everywhere. AmneziaWG would work too, but its camouflage adds nothing for you.
Your network blocks or slows down VPNs
If WireGuard connects for a few seconds and then stops, or never completes a handshake, the network is probably recognizing it. Switch to AmneziaWG. In our experience this is the single change that fixes the most "VPN does not connect" reports from users inside filtered networks. Our guide on how VPN blocking works explains why.
Only web traffic gets through
Some captive Wi-Fi networks and strict company firewalls allow only TCP to ports 80 and 443. Neither WireGuard nor AmneziaWG can work there, because both need UDP. OpenVPN in TCP mode on port 443 is the fallback, accepting that it will be slower.
Common myths
- "OpenVPN is more secure because it is older." Age means more review, but also more legacy options. A well-configured OpenVPN and WireGuard are both secure; WireGuard simply removes the chance to configure it badly.
- "AmneziaWG is less secure than WireGuard." The cryptography is the same. The extra parameters only change packet sizes and headers.
- "A faster protocol uses more data." No. Protocol overhead is a few percent at most; what uses data is what you do online. See how much data a VPN uses.
How NebulaVPN uses these protocols
NebulaVPN gives every user a WireGuard-family config. The Tehran server only accepts AmneziaWG, because it is used from inside and outside Iran where plain WireGuard is often blocked; you can import that config into the AmneziaVPN or AmneziaWG app (see the download guide). If you are curious what each line of the config does, read the WireGuard config file explained.