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:

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

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

  1. Set up the server: AmneziaWG server installs our amneziawg-go fork and the awg tools 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.
  2. Install the app: on iPhone from TestFlight, on Android by building it from the source; see Installation. Our tests ran the code of commit 0a699819 on both phones, and on Android also the release APK of 8afe7ca8, which follows it; on iPhone use TestFlight build 40 (commit 17233158) or later, the first with this code.
  3. Add an AmneziaWG profile: Setting up the app.
  4. Every setting of the server and of a phone's file, and what it does: Configuration Reference.
  5. 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.