Fix --port

Former-commit-id: 7920295b8c
This commit is contained in:
Owen
2026-03-03 16:27:57 -08:00
parent 9a5dfd1bdb
commit 372aa726c1
2 changed files with 13 additions and 9 deletions
+2
View File
@@ -112,6 +112,8 @@ func NewWireGuardService(interfaceName string, port uint16, mtu int, host string
return nil, fmt.Errorf("failed to generate private key: %v", err)
}
logger.Debug("+++++++++++++++++++++++++++++++= the port is %d", port)
if port == 0 {
// Find an available port
portRandom, err := util.FindAvailableUDPPort(49152, 65535)