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:
@@ -11,7 +11,7 @@ func (f *Fastestvpn) GetOpenVPNConnection(selection configuration.ServerSelectio
|
||||
connection models.OpenVPNConnection, err error) {
|
||||
const port = 4443
|
||||
protocol := constants.UDP
|
||||
if selection.TCP {
|
||||
if selection.OpenVPN.TCP {
|
||||
protocol = constants.TCP
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ func (f *Fastestvpn) filterServers(selection configuration.ServerSelection) (
|
||||
case
|
||||
utils.FilterByPossibilities(server.Country, selection.Countries),
|
||||
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