mirror of
https://github.com/amnezia-vpn/amneziawg-tools.git
synced 2026-10-13 21:34:42 +00:00
[PR #77] Feature/awg 3.1 freebsd #77
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-tools#77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-tools/pull/77
Author: @vgrebenschikov
Created: 9/27/2026
Status: 🔄 Open
Base:
master← Head:feature/awg-3.1-freebsd📝 Commits (2)
25e5260feat: support AmneziaWG 3.1 on FreeBSD and incremental AllowedIPs426b0a1minor formatting fixes📊 Changes
5 files changed (+222 additions, -68 deletions)
View changed files
📝
src/config.c(+27 -0)📝
src/containers.h(+5 -0)📝
src/ipc-freebsd.h(+180 -61)📝
src/show.c(+7 -7)📝
src/uapi/freebsd/dev/wg/if_wg.h(+3 -0)📄 Description
feat: support AmneziaWG 3.1 on FreeBSD and incremental AllowedIPs
Wire up the FreeBSD ioctl/nvlist IPC to the kernel's AWG version so
userspace can talk to both AWG 2.x and AWG 3.x kmods without breaking
older interfaces.
New AWG 3.1 device parameters (get/set via nvlist; rejected with EOPNOTSUPP on an AWG 2 kmod):
- header-protection-key
- content-padding-addition
- rekey-after-time
- rekey-timeout
- reject-after-time
- keepalive-timeout
- max-handshake-attempts
- random-trailers
- disable-cookies
On AWG 3.1, H1–H4 are exchanged as numbers (u32 ranges). AWG 2 still
uses binary strings. PersistentKeepalive is a range on AWG 3.1 and a
single u16 on older kernels. Kernel Hx=0 is mapped to the default
WireGuard message types expected by shared UI code.
AllowedIPs on FreeBSD can be changed incrementally: a leading '+' adds
a prefix without replacing the peer's list, and '-' removes one
(WGALLOWEDIP_REMOVE_ME).
Junk strings from the kernel are accepted only when NUL-terminated and within the FreeBSD size limit.
Also fix
awg show max-handshake-attempts(typo / underscore in usage) and print empty I1–I5 instead of crashing on a NULL pointer.Examples:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.