3x-ui/internal
Sanaei 6ee74f2032
fix(amneziawgnet): wait for the client netstack goroutines before closing its device
TestPortForwardRoundTripTCPAndUDP flakes in the race job: closing the test's
client WireGuard device races the goroutines still writing into its netstack.

amneziawg-go's device.Close() calls tun.Close() before it stops the routine
draining the tun, and netTun.Close() closes the unbuffered incomingPacket
channel that WriteNotify sends on. A goroutine still inside a netstack write
when the deferred clientDev.Close() runs therefore closes and sends on the same
channel -- reported as a data race, and on a bad interleaving a "send on closed
channel" panic.

The TCP echo listener, its per-connection copies and the UDP echo all write into
clientNet, and teardown only closed the two listeners before the device: nothing
waited for the goroutines themselves. A WaitGroup deferred right after
clientDev.Close() supplies the missing edge, since LIFO then puts the wait
between the listener closes and the device close.

Confirmed by flooding the existing UDP echo goroutine under GOMAXPROCS=1 and 2,
which failed 3/6 and 2/6 runs with the stack CI reported and 0/12 with the fix.
2026-09-09 09:37:12 +02:00
..
amneziawg fix(amneziawg): account for S4 junk in the default tunnel MTU (#6376) 2026-09-08 16:55:32 +02:00
amneziawgnet fix(amneziawgnet): wait for the client netstack goroutines before closing its device 2026-09-09 09:37:12 +02:00
config v3.7.0 2026-08-24 15:07:15 +02:00
crypto/nodetoken feat(pia): add PIA login-and-add WireGuard outbounds (#6272) 2026-08-22 23:11:06 +02:00
database fix(mtproto): use hosts for public share links (#6369) 2026-09-08 15:36:57 +02:00
eventbus chore: refresh dependencies, fix Linux tool tasks, modernize Go idioms 2026-07-25 16:08:09 +02:00
logger fix(inbounds): apply runtime changes after the DB commit (#5768) 2026-07-08 22:12:28 +02:00
mtproto fix(mtproto): synchronize child-process lifecycle (#6141) 2026-07-29 20:56:26 +02:00
pia chore(build): bump Go toolchain to 1.27.0 2026-08-23 21:57:03 +02:00
sub feat(xray): update xray-core to v26.9.9 and follow the udpHop move 2026-09-09 01:53:00 +02:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util feat(xray): update xray-core to v26.9.9 and follow the udpHop move 2026-09-09 01:53:00 +02:00
web fix(settings): show the SMTP failure reason instead of a raw i18n key 2026-09-09 00:51:44 +02:00
xray docs(api): align OpenAPI with runtime contracts (#6409) 2026-09-04 15:23:41 +02:00