This patch upgrades if_wg to support DPI-bypassing techniques, while remaining compatible with the standard WireGuard protocol.
Features:
- Optional junk packets before handshake:
- jc - number of junk packets to send before handshake (range: 1–128, recommended: 3–10)
- jmin - minimum size of junk packets, jmin: < jmax (recomended ~ 50)
- jmax - maximum size of junk packets, jmax: ≤ 1280 (recomended ~ 1000)
These packets are ignored by both standard WireGuard and the Amnezia-WG extension.
- Optional junk preamble in handshake packets:
- s1 - size of junk to prepend to the handshake initiation packet
- s2 - size of junk to prepend to the handshake response packet
both values must match on both ends; recommended: 15–150, range: 0–1280; s1 ≠ s2
- Optional custom packet type identifiers:
- h1, h2, h3, h4 – unique 32-bit values (range: 0x5–0xFFFFFFFF) used as custom markers for initiation, response, cookie, and data packets, respectively.
All values must be distinct (h1 ≠ h2 ≠ h3 ≠ h4) and identical on both ends.
- h1, h2, h3, h4 – unique 32-bit values (range: 0x5–0xFFFFFFFF) used as custom markers for initiation, response, cookie, and data packets, respectively.
When no parameters are specified, behavior remains identical to standard if_wg.
For more details, refer to the Amnezia-WG documentation:
https://docs.amnezia.org/documentation/amnezia-wg/