[PR #30] feat(wireguard): wire up AmneziaWG 3.1 outbound configuration and UAPI support #30

Open
opened 2026-11-07 17:59:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-xray-core/pull/30
Author: @Gallbladderz
Created: 11/5/2026
Status: 🔄 Open

Base: master ← Head: feat/amneziawg-3.1


📝 Commits (1)

  • b6e423f feat(wireguard): wire up AmneziaWG 3.1 outbound configuration and UAPI support

📊 Changes

8 files changed (+265 additions, -91 deletions)

View changed files

📝 go.mod (+1 -1)
📝 go.sum (+2 -2)
📝 infra/conf/wireguard.go (+128 -14)
📝 proxy/wireguard/bind.go (+3 -2)
📝 proxy/wireguard/client.go (+61 -47)
📝 proxy/wireguard/config.go (+29 -0)
📝 proxy/wireguard/config.pb.go (+39 -24)
📝 proxy/wireguard/config.proto (+2 -1)

📄 Description

Right now amneziawg-go/v3 is already in go.mod, but the JSON config parser, protobuf definitions, and UAPI builder don't actually expose or pass any of the AWG options.

I bumped amneziawg-go/v3 to v3.1.20260828 and wired up the AWG 3.1 options (jc/jmin/jmax, s1-s4, h1-h4, i1-i5, header_protection_key, padding, timeouts, etc.) into the JSON config and protobufs so client outbounds work properly out of the box (tested with v2rayNG).

Also fixed two things that broke AWG in practice:

  1. Added a preservePackets flag in bind.go when Amnezia options are set, so Xray's WARP reserved-bytes logic doesn't overwrite bytes 1..3 of obfuscated packets.
  2. Synced blockup device reads in client.go to wait until IpcSet finishes configuring the device before reading packets.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-xray-core/pull/30 **Author:** [@Gallbladderz](https://github.com/Gallbladderz) **Created:** 11/5/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `feat/amneziawg-3.1` --- ### 📝 Commits (1) - [`b6e423f`](https://github.com/amnezia-vpn/amnezia-xray-core/commit/b6e423f917ee415fde9f45e88a41c4762267c5be) feat(wireguard): wire up AmneziaWG 3.1 outbound configuration and UAPI support ### 📊 Changes **8 files changed** (+265 additions, -91 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -2) 📝 `infra/conf/wireguard.go` (+128 -14) 📝 `proxy/wireguard/bind.go` (+3 -2) 📝 `proxy/wireguard/client.go` (+61 -47) 📝 `proxy/wireguard/config.go` (+29 -0) 📝 `proxy/wireguard/config.pb.go` (+39 -24) 📝 `proxy/wireguard/config.proto` (+2 -1) </details> ### 📄 Description Right now amneziawg-go/v3 is already in go.mod, but the JSON config parser, protobuf definitions, and UAPI builder don't actually expose or pass any of the AWG options. I bumped amneziawg-go/v3 to v3.1.20260828 and wired up the AWG 3.1 options (jc/jmin/jmax, s1-s4, h1-h4, i1-i5, header_protection_key, padding, timeouts, etc.) into the JSON config and protobufs so client outbounds work properly out of the box (tested with v2rayNG). Also fixed two things that broke AWG in practice: 1. Added a preservePackets flag in bind.go when Amnezia options are set, so Xray's WARP reserved-bytes logic doesn't overwrite bytes 1..3 of obfuscated packets. 2. Synced blockup device reads in client.go to wait until IpcSet finishes configuring the device before reading packets. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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/amnezia-xray-core#30
No description provided.