Skip to content

feat: update AmneziaWG to 3.1 - #3

Closed
cany748 wants to merge 2 commits into
amneziafrom
feat/awg-3.1-17100170029478477490
Closed

cany748 wants to merge 2 commits into
amneziafrom
feat/awg-3.1-17100170029478477490

Conversation

@cany748

@cany748 cany748 commented Aug 28, 2026

Copy link
Copy Markdown
Owner
  • Adds support for AmneziaWG 3.1 options (HeaderProtectionKey, ContentPaddingAddition, RekeyAfterTime, RekeyTimeout, RejectAfterTime, KeepaliveTimeout, MaxHandshakeAttempts, RandomTrailers, DisableCookies).
  • Introduces <FormNullSwitchField> for proper nullable boolean toggles.
  • Updates database schemas, migrations, types, templates, i18n locales, and wgHelper.ts to output these fields.

PR created automatically by Jules for task 17100170029478477490 started by @cany748

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Verified against the config parser of amneziawg-tools v3.1.20260812.

- validate HeaderProtectionKey as a 32 byte base64 key instead of an
  arbitrary string. Control characters were allowed, so a newline could
  inject additional lines into the generated configuration
- parse the range parameters as uint16 ranges (0-65535) instead of
  reusing the H1-H4 bounds (5 - 2^31-1), which rejected valid values
  such as MaxHandshakeAttempts = 1 and truncated large ones
- write RandomTrailers and DisableCookies as on/off. parse_bool only
  accepts on, off or a number, so true/false aborted awg setconf
- take HeaderProtectionKey and RandomTrailers from the interface, both
  have to be identical on either end of the tunnel, like S1-S4 and H1-H4
- require S1-S4 to be at least 12 while header protection is enabled,
  its cipher uses the first 12 bytes of every junk prefix as its nonce
- render the null state of a nullable switch explicitly and add the
  missing translations, the reset button rendered its own i18n key
- extract the config line building into server/utils/awg.ts and cover
  it with unit tests
- document the new parameters and their compatibility
@cany748 cany748 closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant