Maint: use OPENVPN_PORT instead of PORT

with retro-compatibility
This commit is contained in:
Quentin McGaw (desktop)
2021-09-18 16:09:21 +00:00
parent e2e218c74b
commit b8356b60a6
8 changed files with 89 additions and 54 deletions

View File

@@ -50,8 +50,11 @@ func (settings *OpenVPNSelection) readIVPN(r reader) (err error) {
return err
}
settings.CustomPort, err = readOpenVPNCustomPort(r.env, settings.TCP,
[]uint16{80, 443, 1443}, []uint16{53, 1194, 2049, 2050})
settings.CustomPort, err = readOpenVPNCustomPort(r, openvpnPortValidation{
tcp: settings.TCP,
allowedTCP: []uint16{80, 443, 1443},
allowedUDP: []uint16{53, 1194, 2049, 2050},
})
if err != nil {
return err
}