mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-02 19:25:05 +03:00
6f37433d43
The race job failed TestEnsureRebuildsWhenS4ChangesTheDerivedMTU with "bind 127.0.0.1:58720: address already in use". The package hardcoded WireGuard and port-forward ports 58712-58922, all inside Linux's ephemeral range (32768-60999), so any concurrent :0 socket could already hold one; several were also reused across tests (58713 x3, 58715, 58717, 58720). Tests that never dial the server now use ListenPort 0; tests that need the number take an OS-assigned one via freeUDPPort / freeTCPUDPPort (the latter for port forwards, which bind TCP and UDP on the same port).