[PR #3] [MERGED] fix: harden AWG and prepare the fork for releases #2

Closed
opened 2026-10-13 20:01:14 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-box/pull/3
Author: @vkamn
Created: 8/24/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @FrogRocky

Base: frog/awg-go-v0.2.19 ← Head: fix/awg-reconnection


📝 Commits (10+)

  • fd56d07 fix: fixed awg reconnection
  • d97ef8c feat: add awg3.1 support
  • 9a5b9dd ci: bootstrap Amnezia fork checks and workflow guards
  • 8b2741c Merge Amnezia CI bootstrap into AWG integration
  • 8278c7f fix: make AWG reconnection and shutdown reliable
  • 1310630 ci: group AWG test names before binding in jq
  • 6244d78 test: align integration module with the current fork
  • 605e640 build: add Amnezia CLI and mobile entry points
  • f8a179d ci: verify supported builds and independent consumers
  • 0d3ccd8 release: gate immutable source tags on exact CI evidence

📊 Changes

41 files changed (+3558 additions, -253 deletions)

View changed files

➕ .github/workflows/amnezia-ci.yml (+275 -0)
➕ .github/workflows/amnezia-release.yml (+180 -0)
📝 .github/workflows/build.yml (+6 -5)
📝 .github/workflows/docker.yml (+2 -0)
📝 .github/workflows/lint.yml (+1 -0)
📝 .github/workflows/linux.yml (+3 -0)
📝 .github/workflows/stale.yml (+1 -0)
➕ Makefile.amnezia (+52 -0)
📝 README.md (+17 -1)
📝 cmd/internal/build_libbox/main.go (+170 -54)
➕ cmd/internal/build_libbox/main_integration_test.go (+232 -0)
➕ cmd/internal/build_libbox/main_test.go (+90 -0)
➕ cmd/internal/read_amnezia_version/main.go (+75 -0)
➕ cmd/internal/read_amnezia_version/main_integration_test.go (+139 -0)
➕ cmd/internal/read_amnezia_version/main_test.go (+33 -0)
➕ docs/amnezia/build.md (+112 -0)
➕ docs/amnezia/consumer.md (+91 -0)
➕ docs/amnezia/maintenance.md (+85 -0)
➕ docs/amnezia/release.md (+192 -0)
📝 go.mod (+2 -2)

...and 21 more files

📄 Description

AWG could retain a closed bind after reconnection or leave resources open during early/failed startup and shutdown. This change closes the owned socket/TUN/core resources consistently and updates AWG to v3.1.20260828, including its under-load cookie behavior.

It also makes this fork usable from the dev/master release lines while preserving the sing-box v1.12.12 baseline and upstream merge history:

  • Add Makefile.amnezia with checkout-local version detection, AWG CLI/mobile profiles, and explicit mobile output without implicit sibling-client writes.
  • Verify independent consumers through remote Go replacement and a recursively cloned Git submodule with local replacement; retain github.com/sagernet/sing-box as the module path.
  • Run module consistency, vet/race tests, AWG regression checks, Linux/macOS/Windows CLI builds, Android AAR/Apple XCFramework packaging, and both consumer checks in Amnezia CI. PR tests use the merge result; the Go remote-replace check uses the published head because Go cannot resolve GitHub's temporary merge refs.
  • Add immutable source-tag preflight/release tooling and maintenance/build/consumer documentation. Synchronize the separate integration test module in its own commit; CI compiles it without claiming to run the Docker suite.

Validation: local AWG race tests and real-core configuration/handshake cases pass; all three CLI targets include the expected AWG dependency. Android packaging produced all four ABIs, and Apple packaging produced iOS/tvOS arm64 and macOS arm64/x86_64. Clean remote-replace and submodule consumers build and validate AWG configuration. Final hosted checks must pass before merging this PR and each subsequent PR in the stack.

No newer sing-box release or dev-next commits are included. Application-level Android/iOS acceptance remains a consumer release check.


🔄 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-box/pull/3 **Author:** [@vkamn](https://github.com/vkamn) **Created:** 8/24/2026 **Status:** ✅ Merged **Merged:** 9/10/2026 **Merged by:** [@FrogRocky](https://github.com/FrogRocky) **Base:** `frog/awg-go-v0.2.19` ← **Head:** `fix/awg-reconnection` --- ### 📝 Commits (10+) - [`fd56d07`](https://github.com/amnezia-vpn/amnezia-box/commit/fd56d07c57f9610a69760ee045f57ad52e440bb0) fix: fixed awg reconnection - [`d97ef8c`](https://github.com/amnezia-vpn/amnezia-box/commit/d97ef8c4c4d163b80ddabe69d3d60befd53b7cec) feat: add awg3.1 support - [`9a5b9dd`](https://github.com/amnezia-vpn/amnezia-box/commit/9a5b9dd10bd8da0df49cca36dd9636c8b3ffe568) ci: bootstrap Amnezia fork checks and workflow guards - [`8b2741c`](https://github.com/amnezia-vpn/amnezia-box/commit/8b2741cc9ee3cabc65119c61406e84d9c2cb6301) Merge Amnezia CI bootstrap into AWG integration - [`8278c7f`](https://github.com/amnezia-vpn/amnezia-box/commit/8278c7fb2c79903ee50f4ceb36198568805ed8f3) fix: make AWG reconnection and shutdown reliable - [`1310630`](https://github.com/amnezia-vpn/amnezia-box/commit/13106303294e732b1fa1c1b9deea6407f88bb7c0) ci: group AWG test names before binding in jq - [`6244d78`](https://github.com/amnezia-vpn/amnezia-box/commit/6244d78ba31025fa8702ffce9efe7f3be419a3b8) test: align integration module with the current fork - [`605e640`](https://github.com/amnezia-vpn/amnezia-box/commit/605e640b4a4f51ea1991b04e1e5cf3a86dab4dcc) build: add Amnezia CLI and mobile entry points - [`f8a179d`](https://github.com/amnezia-vpn/amnezia-box/commit/f8a179dddbe49e778e4420454d9a849224195007) ci: verify supported builds and independent consumers - [`0d3ccd8`](https://github.com/amnezia-vpn/amnezia-box/commit/0d3ccd8ee187703240b409b8b8c0a9ebd7809843) release: gate immutable source tags on exact CI evidence ### 📊 Changes **41 files changed** (+3558 additions, -253 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/amnezia-ci.yml` (+275 -0) ➕ `.github/workflows/amnezia-release.yml` (+180 -0) 📝 `.github/workflows/build.yml` (+6 -5) 📝 `.github/workflows/docker.yml` (+2 -0) 📝 `.github/workflows/lint.yml` (+1 -0) 📝 `.github/workflows/linux.yml` (+3 -0) 📝 `.github/workflows/stale.yml` (+1 -0) ➕ `Makefile.amnezia` (+52 -0) 📝 `README.md` (+17 -1) 📝 `cmd/internal/build_libbox/main.go` (+170 -54) ➕ `cmd/internal/build_libbox/main_integration_test.go` (+232 -0) ➕ `cmd/internal/build_libbox/main_test.go` (+90 -0) ➕ `cmd/internal/read_amnezia_version/main.go` (+75 -0) ➕ `cmd/internal/read_amnezia_version/main_integration_test.go` (+139 -0) ➕ `cmd/internal/read_amnezia_version/main_test.go` (+33 -0) ➕ `docs/amnezia/build.md` (+112 -0) ➕ `docs/amnezia/consumer.md` (+91 -0) ➕ `docs/amnezia/maintenance.md` (+85 -0) ➕ `docs/amnezia/release.md` (+192 -0) 📝 `go.mod` (+2 -2) _...and 21 more files_ </details> ### 📄 Description AWG could retain a closed bind after reconnection or leave resources open during early/failed startup and shutdown. This change closes the owned socket/TUN/core resources consistently and updates AWG to `v3.1.20260828`, including its under-load cookie behavior. It also makes this fork usable from the `dev`/`master` release lines while preserving the sing-box v1.12.12 baseline and upstream merge history: - Add `Makefile.amnezia` with checkout-local version detection, AWG CLI/mobile profiles, and explicit mobile output without implicit sibling-client writes. - Verify independent consumers through remote Go replacement and a recursively cloned Git submodule with local replacement; retain `github.com/sagernet/sing-box` as the module path. - Run module consistency, vet/race tests, AWG regression checks, Linux/macOS/Windows CLI builds, Android AAR/Apple XCFramework packaging, and both consumer checks in Amnezia CI. PR tests use the merge result; the Go remote-replace check uses the published head because Go cannot resolve GitHub's temporary merge refs. - Add immutable source-tag preflight/release tooling and maintenance/build/consumer documentation. Synchronize the separate integration test module in its own commit; CI compiles it without claiming to run the Docker suite. Validation: local AWG race tests and real-core configuration/handshake cases pass; all three CLI targets include the expected AWG dependency. Android packaging produced all four ABIs, and Apple packaging produced iOS/tvOS arm64 and macOS arm64/x86_64. Clean remote-replace and submodule consumers build and validate AWG configuration. Final hosted checks must pass before merging this PR and each subsequent PR in the stack. No newer sing-box release or `dev-next` commits are included. Application-level Android/iOS acceptance remains a consumer release check. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 20:01:14 +00:00
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-box#2
No description provided.