Back to blog

AmneziaWG 2.0: How a WireGuard Fork Learned to Fool Deep Packet Inspection

2026-03-257 min read
AmneziaWGWireGuardObfuscationDPIRussia

WireGuard changed the VPN landscape in 2020. With only ~4,000 lines of code, ChaCha20-Poly1305 cryptography, and connection speeds under 1 second, it quickly became the protocol of choice for modern VPN services. But in 2025, a problem emerged: WireGuard is too easy to detect.

The Detection Problem

In Russia, WireGuard now has roughly a 12% success rate. In Iran, connections suffer 98% packet loss. China, Egypt, UAE, Turkey, Belarus, Kazakhstan, Myanmar, and Pakistan have all deployed DPI systems capable of identifying WireGuard traffic by its fixed UDP packet headers and consistent handshake patterns.

The issue is not encryption — WireGuard's cryptography remains unbreakable. The issue is traffic appearance. When every handshake packet looks identical, pattern-matching systems learn to spot it instantly.

Enter AmneziaWG 2.0

AmneziaWG is a fork of WireGuard created by the Amnezia VPN team. Version 2.0, released in March 2026, represents a fundamental leap in obfuscation technology. Unlike older tools that simply tunnel WireGuard through another protocol (adding latency and complexity), AmneziaWG modifies the transport layer directly while preserving WireGuard's core cryptography and performance.

Custom Protocol Signatures (I1–I5)

Before the real WireGuard handshake begins, AmneziaWG 2.0 sends decoy packets that mimic other protocols. Parameters I1 through I5 define the content of up to 5 decoy packets using a flexible tag system:

  • <b 0xHEX> — insert specific bytes
  • <r N> — N cryptographically random bytes
  • <rc N> — N random alphanumeric characters
  • <t> — current UNIX timestamp
  • <c> — packet counter

For example, a CPS configuration might start with bytes resembling a QUIC Initial packet header, followed by random data and a timestamp. A DPI box classifies this as the beginning of a normal QUIC session. The server ignores these decoy packets entirely — it simply waits for the real handshake that follows.

Junk Trains (Jc, Jmin, Jmax)

Before each legitimate handshake, the client fires off Jc junk packets with random sizes between Jmin and Jmax bytes. This pure noise blurs the timing and size profile of the connection startup, making statistical detection significantly harder.

Ranged Headers (H1–H4)

In AmneziaWG 1.x, certain header values were fixed constants — another fingerprint. Version 2.0 replaces them with ranges, randomizing values per packet. Padding parameters for init, response, cookie, and data packets are also fully configurable.

The Result: Every Server Speaks Its Own Dialect

Because every AmneziaWG 2.0 server ends up with a unique parameter set, there is no universal DPI signature that catches all traffic. Each server speaks its own dialect. Block one configuration, and a thousand others remain untouched.

Performance vs. Competitors

ProtocolSpeedDPI ResistanceSetup Complexity
WireGuardFastestLowEasy
OpenVPN + obfs4Slow (-25%)MediumHard
ShadowsocksFastMediumEasy
VLESS + RealityFastVery HighHard
AmneziaWG 2.0FastVery HighMedium

Bottom Line

AmneziaWG 2.0 fills a critical gap: it is a full VPN tunnel with WireGuard-level performance and built-in DPI protection, all in one package. For users in high-censorship environments who refuse to trade speed for stealth, it may be the best option available today.