NebulaVPN · Guides

WireGuard vs OpenVPN vs AmneziaWG: which VPN protocol should you use?

Updated: 6 min read

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

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:

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:

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:

  1. 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.
  2. 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.
  3. 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:

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

OpenVPNWireGuardAmneziaWG
TransportUDP or TCPUDP onlyUDP only
SpeedModerateVery fastVery fast
Connect / reconnect timeSecondsUnder a secondUnder a second
Battery use on phonesHigherLowLow
Easy to detect by filtersYes, unless wrapped in TLS tricksYes, veryMuch harder
Code sizeLargeVery smallSmall (WireGuard plus changes)
Works in the plain WireGuard appNoYesNo, 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

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.

More guides