mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6611] [MERGED] fix(amneziawg): stop AAAA fallback on v4-only tunnels and expose I2–I5 #6377
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6377
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/MHSanaei/3x-ui/pull/6611
Author: @mrchatam
Created: 9/19/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @MHSanaei
Base:
main← Head:fix/awg-outbound-ipv6-dns-i2-i5📝 Commits (3)
9f9edb3fix(amneziawg): stop AAAA fallback on v4-only tunnels and expose I2–I52c93762ci: retrigger frontend after npm registry maintenance9ea6b95style(amneziawg): keep the tunnel DNS family comments to two lines📊 Changes
4 files changed (+147 additions, -8 deletions)
View changed files
📝
frontend/src/pages/xray/outbounds/protocols/amneziawg.tsx(+4 -0)📝
internal/amneziawgnet/dns.go(+29 -8)➕
internal/amneziawgnet/dns_family_test.go(+107 -0)📝
internal/amneziawgnet/egress.go(+7 -0)📄 Description
Summary
Fixes intermittent AmneziaWG outbound probe/connect failures on IPv4-only tunnels, and surfaces the missing I2–I5 obfuscation fields in the outbound form.
DNS / AAAA (primary):
exchangeTunnelDNSWithFallbackused to query A then fall back to AAAA whenever A failed, even when the device had no IPv6 local address. The netstack only installs an IPv6 default route when the outboundaddresslist includes IPv6, so the AAAA answer was unroutable (network is unreachable). The family-agnostic 60s DNS cache then kept poisoning probes. This change queries only families the tunnel can dial (dnsQueryTypesFor), and rejects undialable literal IPs early in SOCKS CONNECT / UDP dial paths.UI: Outbound AmneziaWG form already had I1–I5 in the Zod schema and wire adapter but only rendered
i1. Render I2–I5 to match the inbound form and schema.Fixes #6570
Changes
internal/amneziawgnet/dns.go—dnsQueryTypesFor/tunnelSupportsAddr; gateexchangeTunnelDNSWithFallbackinternal/amneziawgnet/egress.go— reject wrong-family literal IPs inresolveTunnelViaand UDPgetOrDialinternal/amneziawgnet/dns_family_test.go— unit tests for query types, family checks, and literal rejectionfrontend/.../outbounds/protocols/amneziawg.tsx— expose I2–I5 fieldsTest plan
go test ./internal/amneziawgnet/ -count=1npm run format:checkinfrontend/(oxfmt)dial tunnel [2001:…]:443: network is unreachable🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.