Files
3x-ui/internal/amneziawgnet/main_test.go
T
MHSanaei 805f94a00c chore(amneziawgnet): bind test sockets to loopback
Windows Firewall prompted on every run of amneziawgnet.test.exe, since
the tests opened AmneziaWG, outbound-client and port-forward sockets on
all interfaces and go test rebuilds the binary under a fresh temp path,
so a granted exception never sticks.

Route every "all interfaces" bind through wildcardBindHost, which is
empty in production (behaviour unchanged) and pinned to 127.0.0.1 by
the package TestMain.
2026-10-03 00:00:36 +02:00

12 lines
133 B
Go

package amneziawgnet
import (
"os"
"testing"
)
func TestMain(m *testing.M) {
wildcardBindHost = "127.0.0.1"
os.Exit(m.Run())
}