Mullvad servers do not have a default port
- Refers to #218 - Checks for custom port value depending on protocol - Remove default port from server constants - Use 443 and 1194 ports respectively for tcp and udp
This commit is contained in:
@@ -42,8 +42,13 @@ func (m *mullvad) GetOpenVPNConnections(selection models.ServerSelection) (conne
|
||||
return nil, fmt.Errorf("no server found for country %q, city %q and ISP %q", selection.Country, selection.City, selection.ISP)
|
||||
}
|
||||
|
||||
var defaultPort uint16 = 1194
|
||||
if selection.Protocol == constants.TCP {
|
||||
defaultPort = 443
|
||||
}
|
||||
|
||||
for _, server := range servers {
|
||||
port := server.DefaultPort
|
||||
port := defaultPort
|
||||
if selection.CustomPort > 0 {
|
||||
port = selection.CustomPort
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user