The short answer: AmneziaWG is WireGuard with the outward shape of its packets changed. Inside, everything is the same — the same keys, the same handshake, the same encryption. On the wire, the connection stops looking like WireGuard — and that single difference is the decisive one. Below: what exactly changes, what stays the same, and what it costs.
Why WireGuard is recognisable from the first packet
WireGuard is built to be economical: it has only four message types, and the type is written in the first byte of every packet — 1, 2, 3 or 4. The service packets also have constant sizes: the packet that opens a connection is always the same length. That pair of markers is enough to identify the protocol without decrypting a single byte: first byte equals one, length matches — it is WireGuard.
For equipment that inspects traffic on an operator's network this is a gift. It does not need to break the encryption — the shape of the packet is enough. What happens next is a matter of policy: pass, slow down, or drop. This is why “my VPN just stopped working on this network” is such a common story: what stopped working is not the encryption, it is the recognisability.
What AmneziaWG changes
AmneziaWG is a fork of WireGuard by the Amnezia team. It leaves the protocol as it is and adds a masking layer on top. What happens when a connection starts:
- Junk packets before the handshake. The client sends several datagrams of random length with random contents. They carry no payload at all — their job is to make sure a new flow does not begin with a recognisable packet.
- Random types instead of 1, 2, 3, 4. The numbers that denote the message type are replaced with values from ranges agreed in advance — a separate range per type. The check “first byte equals one” stops meaning anything.
- Variable length. Random padding is added to the service packets, so “the handshake is always the same size” stops being a marker as well.
- Signature packets. The first thing the network sees can be made to resemble the beginning of another, everyday protocol — for example the first packet of QUIC, the one a browser sends when opening an ordinary website.
All of this is connection parameters rather than a separate protocol: both sides agree on them, and they can be changed without rewriting either the client or the server.
What does NOT change
This is the part most often misunderstood, so plainly: obfuscation does not touch the cryptography. The same X25519 keys remain, the same Noise IK handshake, the same ChaCha20-Poly1305 cipher — everything WireGuard is respected for. Masking works on the outside of the envelope, not on the letter inside.
Which leads to a consequence worth keeping in mind: obfuscation does not make a connection “more secure”. It makes it less visible. Those are different properties, and they should not be conflated — including when a service promises “double encryption” where in fact only the shape of the packet has been changed.
What it costs
- Incompatibility with the standard client. An ordinary WireGuard app will not connect to an AmneziaWG server: it does not know the masking parameters and treats such packets as malformed. A client with AmneziaWG support is required — and vice versa.
- A little extra traffic. On an established connection this is a few dozen bytes per packet; most of the overhead sits at the start — the junk datagrams go out once.
- The parameters must match. If the values on the client and the server diverge, the connection will not come up at all. That is why the server hands them out instead of a person typing them in.
- It is not a “set once” thing. Masking is a contest, not a configuration: the set of markers by which a protocol is recognised changes over time.
How this works at Mayak
We run AmneziaWG 3.1 on every exit. The app does not invent the masking parameters and no person types them in: the server hands them out together with the connection settings, a separate set per line. That lets us change the shape of a connection centrally when it stops getting through on some network, without asking anyone to reconfigure anything.
Masking alone, however, is not enough. There are networks where even it does not get through — and then the app switches to another way of reaching the server: through an intermediate entry point, or through an ordinary secure web connection. How that ladder works is described in “One tap, three paths”.
Short answers
Is AmneziaWG the same thing as WireGuard? Cryptographically, yes: the same X25519 keys, the same Noise IK handshake, the same ChaCha20-Poly1305 encryption. Only the way packets look on the wire differs.
Does obfuscation weaken the encryption? No. It changes the shape of the packet on the outside and leaves the cryptography inside untouched; the junk packets carry no payload at all.
Can a standard WireGuard client connect? No: both sides must apply the same obfuscation parameters, and a standard client knows nothing about them.
Is it slower? On an established connection the difference is small — a few dozen bytes of padding per packet. Most of the cost sits at the start of the connection.
Why is this needed if WireGuard already encrypts the traffic? Encryption hides the contents, not the fact that the connection is WireGuard. Obfuscation removes the markers by which the protocol is identified without reading anything.
In short: WireGuard makes sure your traffic cannot be read. AmneziaWG adds that it cannot be identified. On difficult networks the first without the second sometimes does not work at all.
WireGuard is a registered trademark of Jason A. Donenfeld. Mayak Networks is not affiliated with or endorsed by WireGuard LLC. AmneziaWG is a project by the Amnezia team, distributed under an open-source licence.