Files
amnezia-web-panel/static/css
hell b34db02ff7 fix(awg3): fall back to userspace on a pre-3.1 kernel module
awg-quick prefers the host kernel module and only falls back to
amneziawg-go when `ip link add ... type amneziawg` fails, i.e. when no
module is installed at all. On a host carrying an older module (the 1.0.x
line the Amnezia PPA still ships) the interface is created, `awg setconf`
then rejects the AWG 3.1 keys with a bare "Invalid argument", and
awg-quick deletes the interface again. The install reported success and
no tunnel existed (issue #113).

The container's amneziawg-go does speak the full 3.1 key set, so awg3 can
run in userspace on such hosts:

- patch awg-quick in the built image with a WG_FORCE_USERSPACE switch;
  without the variable set add_if behaves exactly as before, and a
  grep guard fails the build if upstream changes the line
- probe the module from the awg3 start script (creating a throwaway
  interface also loads a module that is on disk but not loaded yet) and
  force userspace when its major version is below 3; the decision is
  taken on every container start, so a later module upgrade returns the
  tunnel to the kernel datapath on its own
- report the downgrade in the install log, and mark such lines as
  warnings in the UI instead of green ticks
- verify the interface is actually up after the start script, so a
  rejected config surfaces as an error with the container log instead of
  a successful install

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 22:16:18 +07:00
..