mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-14 09:55:01 +03:00
805f94a00c
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.
12 lines
133 B
Go
12 lines
133 B
Go
package amneziawgnet
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
wildcardBindHost = "127.0.0.1"
|
|
os.Exit(m.Run())
|
|
}
|