Conversation
fdecefb to
64185ab
Compare
|
There is already opened PR #26972, what is different between this and that? |
64185ab to
4c2577d
Compare
|
Thanks for pointing that out. There are a few differences compared to #26972:
The intention of this PR is therefore not just to duplicate #26972, but to provide an updated AWG 3.1 integration while keeping the OpenWrt-specific code closely aligned with the existing WireGuard implementation. |
44a43d5 to
4c2577d
Compare
| config_get awg_random_trailers "${config}" "awg_random_trailers" | ||
| config_get awg_disable_cookies "${config}" "awg_disable_cookies" |
There was a problem hiding this comment.
config_get hands back the raw UCI string, so the perfectly valid UCI boolean spellings true/false/yes/no/enabled/disabled reach awg unchanged, and parse_bool in config.c:421-446 accepts only on/off or a digit — anything else makes syncconf exit non-zero, which aborts the whole interface setup, not just that one option. Use config_get_bool with an empty default so set values normalize to 0/1 while unset ones stay omitted.
| config_get awg_random_trailers "${config}" "awg_random_trailers" | |
| config_get awg_disable_cookies "${config}" "awg_disable_cookies" | |
| config_get_bool awg_random_trailers "${config}" "awg_random_trailers" "" | |
| config_get_bool awg_disable_cookies "${config}" "awg_disable_cookies" "" |
Generated by Claude Code
There was a problem hiding this comment.
| PKG_SOURCE_PROTO:=git | ||
| PKG_SOURCE_URL:=https://github.com/amnezia-vpn/amneziawg-tools.git | ||
| PKG_SOURCE_VERSION:=v$(PKG_VERSION) | ||
| PKG_MIRROR_HASH:=0c27841a3b4860c7fd085cd627c5b0f9c25653afdaef1e73fd3e350fb3445dab |
There was a problem hiding this comment.
PKG_SOURCE_PROTO:=git is meant as a last resort for upstreams with no release archive, but v3.1.20260812 is a real tag and the tree carries no submodules, so a plain tarball works here. Please switch to PKG_SOURCE/PKG_SOURCE_URL + PKG_HASH the way the rest of the feed fetches GitHub releases, e.g. libs/libyang/Makefile:14-16.
Generated by Claude Code
There was a problem hiding this comment.
| AmneziaWG is a novel VPN that runs inside the Linux Kernel and utilizes | ||
| state-of-the-art cryptography. It aims to be faster, simpler, leaner, and | ||
| more useful than IPSec, while avoiding the massive headache. It intends to | ||
| be considerably more performant than OpenVPN. AmneziaWG is designed as a | ||
| general purpose VPN for running on embedded interfaces and super computers | ||
| alike, fit for many different circumstances. It uses UDP. |
There was a problem hiding this comment.
nit: this paragraph is the WireGuard blurb with the name substituted, so it never mentions the configurable traffic obfuscation that the commit message and PR body give as the reason this package exists. Worth a sentence saying it is a WireGuard-derived protocol with DPI-evasion parameters, so menuconfig users can tell the two packages apart.
Generated by Claude Code
There was a problem hiding this comment.
4c2577d to
88e2566
Compare
88e2566 to
4e2cdbd
Compare
33d8311 to
b0f2cb9
Compare
|
I’d like to point out that wireguard-tools in master has already moved from shell scripts to ucode. It would be nice to do the same for amneziawg-tools, but I’d suggest treating this as a change request after the current changes are accepted. ps |
b0f2cb9 to
e23b5fb
Compare
AmneziaWG is a WireGuard-based VPN protocol with configurable traffic obfuscation features. This package provides the AmneziaWG userspace tools for OpenWrt. Signed-off-by: Karen Khachatryan <karen0734@gmail.com>
e23b5fb to
6456a8c
Compare
AmneziaWG OpenWrt integration — 2/3
This PR adds the
amneziawg-toolsuserspace package.It is the second part of a complete AmneziaWG integration for OpenWrt:
Depends on: #30492
Maintenance and provenance
I maintain the complete OpenWrt integration here:
https://github.com/karen07/amneziawg-openwrt-package
The repository is built around a generator:
https://github.com/karen07/amneziawg-openwrt-package/blob/main/generate.py
The goal is to avoid maintaining a large, manually diverging copy of the
corresponding WireGuard OpenWrt integration.
For
amneziawg-tools, the generator currently uses the OpenWrt 25.12WireGuard package as its baseline.
This is intentional: OpenWrt 25.12 is the stable WireGuard integration that
still uses the shell-based netifd protocol handler, which is also the
implementation currently used and tested by this AmneziaWG port.
OpenWrt master has since migrated the WireGuard protocol handler to ucode.
The AmneziaWG protocol helper in this submission remains shell-based.
Shell protocol handlers are still supported by netifd.
A future migration of the AmneziaWG protocol helper to the current ucode
WireGuard baseline can be handled separately without changing the upstream
AmneziaWG userspace tooling itself.
Reproducible generation
generate.pyis the source of truth for the generated packages.The generation process is split into deterministic stages:
These stages separate:
The important review boundary is
text -> full.At the
textstage, the package has already been mechanically transformedfrom WireGuard to AmneziaWG. The
fullstage then adds only theAmneziaWG-specific integration.
This makes the actual AmneziaWG delta directly reviewable instead of requiring
reviewers to inspect a large copied WireGuard implementation as a whole.
Example comparison:
WireGuard-derived baseline -> AmneziaWG-specific changes
For this PR, the relevant files in that comparison are under
amneziawg-tools/.The generator is maintenance and review tooling only. The generated files are
committed to Git, so OpenWrt does not depend on the generator at package build
time.
Upstream tracking
The AmneziaWG userspace source is pinned to an official upstream release tag:
https://github.com/amnezia-vpn/amneziawg-tools
The generator also provides:
to check whether a newer AmneziaWG kernel-module or tools release is
available.
I run this check manually on a regular basis, normally daily.
When a new upstream version is detected, it is not applied silently. The
version change must be reviewed explicitly before regeneration.
Build and testing workflow
I use this AmneziaWG OpenWrt integration myself.
The maintenance repository also contains GitHub Actions / OpenWrt SDK build
workflows for building the generated packages across OpenWrt
target/subtarget combinations.
The same repository can also be used to build and install the packages
directly on an OpenWrt device for local testing.
This is intended to be a maintained integration rather than a one-off
packaging attempt.
Previous submission
A previous
amneziawg-toolssubmission exists as #26972.I reviewed the feedback from that submission while preparing this version.
The reproducible generation approach is intended to make the package
provenance explicit and keep the WireGuard-derived part separate from the
actual AmneziaWG-specific changes.
PR series
kmod-amneziawgamneziawg-tools— this PRluci-proto-amneziawg— to be submitted