AmneziaWG
How the AmneziaWG protocol works in V2RayTun — a DPI-resistant modification of WireGuard with jitter-based obfuscation.
What Is AmneziaWG?
AmneziaWG is a modified version of the WireGuard protocol designed to evade Deep Packet Inspection (DPI). It adds jitter parameters to the handshake and data packets, making traffic patterns unrecognizable to network filters that block standard WireGuard.
Kernel Module
AmneziaWG requires the amneziawg-dkms kernel module on the node server. V2RayTun's node installer attempts to install it automatically. If it fails, install manually:
apt install -y linux-headers-$(uname -r)
apt install -y amneziawg-dkmsVerify the module is loaded:
modprobe amneziawg
lsmod | grep amneziawgJitter Parameters
The obfuscation relies on a set of parameters that alter packet structure:
| Parameter | Description | Typical Value |
|---|---|---|
Jc | Jitter packet count | 4 |
Jmin | Minimum junk size (bytes) | 40 |
Jmax | Maximum junk size (bytes) | 70 |
S1 | Init packet magic header | 0 |
S2 | Response packet magic header | 0 |
H1 | Handshake init header | 1 |
H2 | Handshake response header | 2 |
H3 | Cookie reply header | 3 |
H4 | Transport data header | 4 |
V2RayTun generates these values automatically per node. You can adjust them in the panel under the node's AmneziaWG settings.
Configuration in V2RayTun
AmneziaWG is enabled per node. When active, V2RayTun:
- Generates a WireGuard key pair for the node.
- Assigns a private subnet (default
10.8.0.0/24). - Creates per-user peer configurations with unique keys.
Default port: 51820/UDP.
URI Format
awg://PRIVATE_KEY@ip:51820/?publickey=SERVER_PUBLIC_KEY&address=10.8.0.2/32&mtu=1420&presharedkey=PSK&dns=1.1.1.1&jc=4&jmin=40&jmax=70&s1=0&s2=0&h1=1&h2=2&h3=3&h4=4#NAME| Parameter | Meaning |
|---|---|
PRIVATE_KEY | Client's private key |
publickey | Server's public key |
address | Client tunnel IP |
mtu | Maximum transmission unit |
presharedkey | Pre-shared key for extra security |
dns | DNS server for the tunnel |
jc, jmin, jmax | Jitter parameters |
s1, s2, h1–h4 | Packet header modifications |
Compatible Client
| Platform | Client |
|---|---|
| Android | AmneziaVPN |
| iOS | AmneziaVPN |
| Windows | AmneziaVPN |
| macOS | AmneziaVPN |
| Linux | AmneziaVPN / CLI |
AmneziaVPN is the primary client. Import the subscription URL or the individual AWG config to connect.