[GH-ISSUE #169] Where can I find the source code of the AmneziaWG 2.0 kernel module? #103

Open
opened 2026-10-13 21:06:34 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @Alkaidere on GitHub (Apr 27, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/169

Hi!
A few months ago I was testing AmneziaWG. At that time, its H parameters could only be fixed values instead of ranges, and there were no S3, S4, or I parameters. After testing for several days, I was very happy to find a tool that offered both strong performance and good resistance to blocking. However, it suddenly got blocked by DPI.
Recently, I learned that AmneziaWG had been updated to version 2.0, so I tried multiple ways to install it:

First, I tried the https://github.com/amnezia-vpn/amnezia-client project. My computer runs Ubuntu 22.04, so can't download Amnezia VPN APP version 4.8.12.9 or higher, which prevented me from deploying AmneziaWG 2.0 on my vps. Although I later solved the issue, I found that the AWG 2.0 installed on the VPS was running in Docker, which had a noticeable impact on performance.

Next, I tried https://github.com/amnezia-vpn/amneziawg-go. The project documentation clearly states support for the new parameters. After installation, it was indeed AmneziaWG 2.0, but being a userspace implementation, it also caused significant performance overhead.

Then I spent a lot of effort on https://github.com/amnezia-vpn/amneziawg-linux-kernel-module. The master branch of this repository still only supports the old parameters. Recently I tested #165 and after some repairs, this PR about AWG 2.0 seems to be functioning normally now.

And I came across this project: https://github.com/bivlked/amneziawg-installer. The kernel version of AmneziaWG installed by that script is also 2.0, but it's installed by adding a PPA(ppa:amnezia/ppa), Does this mean that the official AWG 2.0 kernel version is already available? If so, why hasn't it's source code been released in the amneziawg-linux-kernel-module repository? Will it be released later? Around when will it be?

Thanks a lot, have a good day!

Originally created by @Alkaidere on GitHub (Apr 27, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/169 Hi! A few months ago I was testing AmneziaWG. At that time, its H parameters could only be fixed values instead of ranges, and there were no S3, S4, or I parameters. After testing for several days, I was very happy to find a tool that offered both strong performance and good resistance to blocking. However, it suddenly got blocked by DPI. Recently, I learned that AmneziaWG had been updated to version 2.0, so I tried multiple ways to install it: First, I tried the https://github.com/amnezia-vpn/amnezia-client project. My computer runs Ubuntu 22.04, so can't download Amnezia VPN APP version 4.8.12.9 or higher, which prevented me from deploying AmneziaWG 2.0 on my vps. Although I later solved the issue, I found that the AWG 2.0 installed on the VPS was running in Docker, which had a noticeable impact on performance. Next, I tried https://github.com/amnezia-vpn/amneziawg-go. The project documentation clearly states support for the new parameters. After installation, it was indeed AmneziaWG 2.0, but being a userspace implementation, it also caused significant performance overhead. Then I spent a lot of effort on https://github.com/amnezia-vpn/amneziawg-linux-kernel-module. The master branch of this repository still only supports the old parameters. Recently I tested #165 and after some repairs, this PR about AWG 2.0 seems to be functioning normally now. And I came across this project: https://github.com/bivlked/amneziawg-installer. The kernel version of AmneziaWG installed by that script is also 2.0, but it's installed by adding a PPA(ppa:amnezia/ppa), Does this mean that the official AWG 2.0 kernel version is already available? If so, why hasn't it's source code been released in the amneziawg-linux-kernel-module repository? Will it be released later? Around when will it be? Thanks a lot, have a good day!
Author
Owner

@bivlked commented on GitHub (Apr 27, 2026):

@Alkaidere I answered the same question in our installer issue earlier today (cross-link below) — short version: master HEAD ac946a9 (= tag v1.0.20260329-2) already contains the AWG 2.0 implementation. The PPA amneziawg-dkms package is built from this exact tree.

Cross-ref: bivlked/amneziawg-installer#61

@ygurov / @pokamest — closing as answered seems fine if you agree.

<!-- gh-comment-id:4326890022 --> @bivlked commented on GitHub (Apr 27, 2026): @Alkaidere I answered the same question in our installer issue earlier today (cross-link below) — short version: master HEAD `ac946a9` (= tag `v1.0.20260329-2`) already contains the AWG 2.0 implementation. The PPA `amneziawg-dkms` package is built from this exact tree. Cross-ref: bivlked/amneziawg-installer#61 @ygurov / @pokamest — closing as answered seems fine if you agree.
Author
Owner

@coyotle commented on GitHub (Jun 2, 2026):

amneziawg-dkms installed from ppa has module version: 1.0.20251009. Is this correct information?

modinfo amneziawg
filename:       /lib/modules/6.8.0-87-generic/updates/dkms/amneziawg.ko.zst
intree:         Y
alias:          net-pf-16-proto-16-family-amneziawg
alias:          rtnl-link-amneziawg
version:        1.0.20251009
author:         Jason A. Donenfeld <Jason@zx2c4.com>, AmneziaVPN <admin@amnezia.org>
description:    AmneziaWG secure network tunnel
license:        GPL v2
srcversion:     67D966748286DD592637A74
depends:        libcurve25519-generic,udp_tunnel,ip6_udp_tunnel,libchacha20poly1305,curve25519-x86_64
retpoline:      Y
name:           amneziawg
vermagic:       6.8.0-87-generic SMP preempt mod_unload modversions
parm:           bogus_endpoints:int
parm:           bogus_endpoints_prefix:charp
parm:           bogus_endpoints_prefix6:charp
apt show amneziawg-dkms
Package: amneziawg-dkms
Version: 1.0.0-0~202603291904+ac946a9~ubuntu24.04.1
Priority: optional
Section: kernel
Source: amneziawg-linux-kmod
Maintainer: unidentified attacker <ua@amnezia.org>
Installed-Size: 1,852 kB
Depends: dkms (>= 2.1.0.0), perl:any
Recommends: amneziawg (>= 0.0.20191219), amneziawg-tools (>= 0.0.20191219)
Download-Size: 283 kB
APT-Manual-Installed: no
APT-Sources: https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu noble/main amd64 Packages
<!-- gh-comment-id:4603959565 --> @coyotle commented on GitHub (Jun 2, 2026): amneziawg-dkms installed from ppa has module `version: 1.0.20251009`. Is this correct information? ```sh modinfo amneziawg filename: /lib/modules/6.8.0-87-generic/updates/dkms/amneziawg.ko.zst intree: Y alias: net-pf-16-proto-16-family-amneziawg alias: rtnl-link-amneziawg version: 1.0.20251009 author: Jason A. Donenfeld <Jason@zx2c4.com>, AmneziaVPN <admin@amnezia.org> description: AmneziaWG secure network tunnel license: GPL v2 srcversion: 67D966748286DD592637A74 depends: libcurve25519-generic,udp_tunnel,ip6_udp_tunnel,libchacha20poly1305,curve25519-x86_64 retpoline: Y name: amneziawg vermagic: 6.8.0-87-generic SMP preempt mod_unload modversions parm: bogus_endpoints:int parm: bogus_endpoints_prefix:charp parm: bogus_endpoints_prefix6:charp ``` ``` apt show amneziawg-dkms Package: amneziawg-dkms Version: 1.0.0-0~202603291904+ac946a9~ubuntu24.04.1 Priority: optional Section: kernel Source: amneziawg-linux-kmod Maintainer: unidentified attacker <ua@amnezia.org> Installed-Size: 1,852 kB Depends: dkms (>= 2.1.0.0), perl:any Recommends: amneziawg (>= 0.0.20191219), amneziawg-tools (>= 0.0.20191219) Download-Size: 283 kB APT-Manual-Installed: no APT-Sources: https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu noble/main amd64 Packages ```
Author
Owner

@bivlked commented on GitHub (Aug 7, 2026):

Sorry, this sat for two months. The number is real, it is just not the protocol version. Your build does have AmneziaWG 2.0 in it.

Your own paste shows it. The amneziawg-dkms version 1.0.0-0~202603291904+ac946a9~ubuntu24.04.1 names commit ac946a9, and that tree already carries the 2.0 work:

  • src/device.h has struct magic_header headers[4], the ranged H1-H4 headers that 2.0 introduced;
  • src/netlink.c declares WGDEVICE_A_I1 through WGDEVICE_A_I5 and wires all five in both directions, set into wg->ispecs[...] and read back out.

The 1.0.20251009 that modinfo shows is a literal string from src/version.h, which src/main.c passes to MODULE_VERSION. Nothing derives it from the code:

#ifndef WIREGUARD_VERSION
#define WIREGUARD_VERSION "1.0.20251009"
#endif

That guard matters. src/Kbuild defines WIREGUARD_VERSION from a make variable whenever one is set, and src/Makefile sets it to 1.0.0, so that is what a plain make build puts in this field. DKMS sets nothing, because src/dkms.conf has no MAKE line, and that is why your package shows the header string instead.

Same thing one level up, in the package version itself: the leading 1.0.0 is packaging, it sits in src/dkms.conf as PACKAGE_VERSION, and it has not moved. The timestamp and the +<commit> suffix are the parts worth reading.

Checked today, 7 August 2026: src/version.h on master says 3.0.20260805, and the Launchpad API has noble publishing 1.0.0-0~202608051436+ce16310~ubuntu24.04.1, which is that same commit. So the string lines up with the code now, but only because someone keeps editing it by hand.

If you want the AmneziaWG 3.0 picture for self-hosted setups, including which values have to match on both ends, #207 covers it. I put my measurements there.

<!-- gh-comment-id:5220234593 --> @bivlked commented on GitHub (Aug 7, 2026): Sorry, this sat for two months. The number is real, it is just not the protocol version. Your build does have AmneziaWG 2.0 in it. Your own paste shows it. The `amneziawg-dkms` version `1.0.0-0~202603291904+ac946a9~ubuntu24.04.1` names commit `ac946a9`, and that tree already carries the 2.0 work: - `src/device.h` has `struct magic_header headers[4]`, the ranged `H1`-`H4` headers that 2.0 introduced; - `src/netlink.c` declares `WGDEVICE_A_I1` through `WGDEVICE_A_I5` and wires all five in both directions, set into `wg->ispecs[...]` and read back out. The `1.0.20251009` that `modinfo` shows is a literal string from `src/version.h`, which `src/main.c` passes to `MODULE_VERSION`. Nothing derives it from the code: ```c #ifndef WIREGUARD_VERSION #define WIREGUARD_VERSION "1.0.20251009" #endif ``` That guard matters. `src/Kbuild` defines `WIREGUARD_VERSION` from a make variable whenever one is set, and `src/Makefile` sets it to `1.0.0`, so that is what a plain `make` build puts in this field. DKMS sets nothing, because `src/dkms.conf` has no `MAKE` line, and that is why your package shows the header string instead. Same thing one level up, in the package version itself: the leading `1.0.0` is packaging, it sits in `src/dkms.conf` as `PACKAGE_VERSION`, and it has not moved. The timestamp and the `+<commit>` suffix are the parts worth reading. Checked today, 7 August 2026: `src/version.h` on master says `3.0.20260805`, and the Launchpad API has noble publishing `1.0.0-0~202608051436+ce16310~ubuntu24.04.1`, which is that same commit. So the string lines up with the code now, but only because someone keeps editing it by hand. If you want the AmneziaWG 3.0 picture for self-hosted setups, including which values have to match on both ends, #207 covers it. I put my measurements there.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#103
No description provided.