AmneziaWG
AmneziaWG is WireGuard with obfuscation: the same keys, handshake and encryption, with the packet sizes and headers that make WireGuard easy to recognize taken away. An AmneziaWG profile connects to an AmneziaWG server from a .conf file the server makes, or from keys and values entered by hand. SRP VPN Connect does this with the same engine on iPhone and Android, and the server these pages set up runs it too: our fork of amneziawg-go (github.com/bigmoveus/amneziawg-go, tag v3.1.20260828-srp.1), amneziawg-go's version of 28 August 2026 with a fix for data packets taken for handshake messages (Configuration Reference).
What AmneziaWG changes
WireGuard's packets have fixed sizes and start with a fixed type number (1 to 4), so a network can spot them at a glance. AmneziaWG changes that with settings that the server and the phone share, and some that only the phone has:
- S1 to S4 put random bytes in front of the handshake's messages and of every data packet, so their sizes are no longer WireGuard's; H1 to H4 replace the type numbers with values from ranges of the server's own. The server and the phone must have the same values.
- HeaderProtectionKey (AmneziaWG 3) encrypts what WireGuard leaves in the clear in each packet's header; RandomTrailers (3.1) adds random bytes at the end of each packet. Both must match the server too.
- Jc junk packets of Jmin to Jmax bytes, and the I1 to I5 packets made from a pattern, go before every handshake; content padding and randomized timings change the rest. These are the phone's own: the server does not need them.
A file without any of these settings is a plain WireGuard file, and an AmneziaWG profile connects with it to a server without obfuscation.
How an AmneziaWG connection works
- The keys. As in WireGuard, the server and each phone have a key pair, the server has each phone's public key as a peer, and a preshared key per phone can add a second secret.
- The handshake. The phone sends its junk and I packets, then the handshake, padded and with headers from the server's ranges. The server answers only a key it has as a peer, with the right preshared key and the same obfuscation values; to anything else it says nothing at all. The app counts as connected once the answer has come.
- The tunnel. The phone's traffic for the file's
AllowedIPs, usually all of its IPv4 traffic, goes through the tunnel, and the server passes it on to the internet with its own address. - Keeping it up. The handshake is renewed every 2 minutes while traffic flows, and the connection moves with the phone from network to network. When nothing comes back for 30 seconds while the phone sends, the app counts the server as gone: Auto Reconnect starts new handshakes, or the VPN ends with the reason. When the server answers its handshakes but none of the traffic, which happens when S3, S4 or H4 differ from the server's, the VPN ends with that reason.
Where to start
- Set up the server: AmneziaWG server installs our amneziawg-go fork and the
awgtools from the Amnezia packages on Ubuntu 24.04, with obfuscation values of the server's own, forwarding and NAT, and a file for each phone. - Install the app: on iPhone from TestFlight, on Android by building it from the source; see Installation. Our tests ran the code of commit
0a699819on both phones, and on Android also the release APK of8afe7ca8, which follows it; on iPhone use TestFlight build 40 (commit17233158) or later, the first with this code. - Add an AmneziaWG profile: Setting up the app.
- Every setting of the server and of a phone's file, and what it does: Configuration Reference.
- If it does not connect: Troubleshooting.
What was tested
Test results lists every case we ran against our AmneziaWG server, with its result on an iPhone and on an Android phone: transfers in both directions and 16 connections at once, UDP through the tunnel, each generation of AmneziaWG from 1.0 to 3.1 and a file without obfuscation, RandomTrailers with ranges in both directions, with and without a header protection key and also against AmneziaWG's kernel module, files with and without a preshared key, keepalive and MTU, keys and obfuscation values entered by hand, the Server and Port fields, obfuscation values that differ from the server's, damaged values and other refusals with their messages, sleep, a server that restarts, goes away or stops answering, Retry Times, network changes, idle sessions, the log levels, and the server as AmneziaWG server sets it up.