Maint: configuration Openvpn selection structure
- Move network protocol from ServerSelection to OpenVPNSelection child - Move PIA encryption preset from ServerSelection to OpenVPNSelection child - Move custom port from ServerSelection to OpenVPNSelection child
This commit is contained in:
@@ -15,7 +15,7 @@ func (i *Ipvanish) GetOpenVPNConnection(selection configuration.ServerSelection)
|
||||
connection models.OpenVPNConnection, err error) {
|
||||
const port = 443
|
||||
const protocol = constants.UDP
|
||||
if selection.TCP {
|
||||
if selection.OpenVPN.TCP {
|
||||
return connection, ErrProtocolUnsupported
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ func (i *Ipvanish) filterServers(selection configuration.ServerSelection) (
|
||||
utils.FilterByPossibilities(server.Country, selection.Countries),
|
||||
utils.FilterByPossibilities(server.City, selection.Cities),
|
||||
utils.FilterByPossibilities(server.Hostname, selection.Hostnames),
|
||||
selection.TCP && !server.TCP,
|
||||
!selection.TCP && !server.UDP:
|
||||
selection.OpenVPN.TCP && !server.TCP,
|
||||
!selection.OpenVPN.TCP && !server.UDP:
|
||||
default:
|
||||
servers = append(servers, server)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user