mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 12:30:11 +02:00
Maint: remove NordVPN SERVER_NAME filter
- Filter was not effective - Is to be deprecated in v4 anyway - Bump NordVPN server model version to `3` - Remove `Name` field from NordVPN server model
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ ENV VPNSP=pia \
|
||||
OPENVPN_CLIENTKEY_SECRETFILE=/run/secrets/openvpn_clientkey \
|
||||
# # Nordvpn only:
|
||||
SERVER_NUMBER= \
|
||||
# # NordVPN and ProtonVPN only:
|
||||
# # PIA and ProtonVPN only:
|
||||
SERVER_NAME= \
|
||||
# # ProtonVPN only:
|
||||
FREE_ONLY= \
|
||||
|
||||
@@ -27,11 +27,6 @@ func (settings *Provider) readNordvpn(r reader) (err error) {
|
||||
return fmt.Errorf("environment variable SERVER_HOSTNAME: %w", err)
|
||||
}
|
||||
|
||||
settings.ServerSelection.Names, err = r.env.CSVInside("SERVER_NAME", constants.NordvpnHostnameChoices(servers))
|
||||
if err != nil {
|
||||
return fmt.Errorf("environment variable SERVER_NAME: %w", err)
|
||||
}
|
||||
|
||||
settings.ServerSelection.Numbers, err = readNordVPNServerNumbers(r.env)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -25,11 +25,3 @@ func NordvpnHostnameChoices(servers []models.NordvpnServer) (choices []string) {
|
||||
}
|
||||
return makeUnique(choices)
|
||||
}
|
||||
|
||||
func NordvpnNameChoices(servers []models.NordvpnServer) (choices []string) {
|
||||
choices = make([]string, len(servers))
|
||||
for i := range servers {
|
||||
choices[i] = servers[i].Name
|
||||
}
|
||||
return makeUnique(choices)
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ type MullvadServer struct {
|
||||
type NordvpnServer struct { //nolint:maligned
|
||||
Region string `json:"region"`
|
||||
Hostname string `json:"hostname"`
|
||||
Name string `json:"name"`
|
||||
Number uint16 `json:"number"`
|
||||
IP net.IP `json:"ip"`
|
||||
TCP bool `json:"tcp"`
|
||||
|
||||
@@ -21,7 +21,6 @@ func (n *Nordvpn) filterServers(selection configuration.ServerSelection) (
|
||||
case
|
||||
utils.FilterByPossibilities(server.Region, selection.Regions),
|
||||
utils.FilterByPossibilities(server.Hostname, selection.Hostnames),
|
||||
utils.FilterByPossibilities(server.Name, selection.Names),
|
||||
utils.FilterByPossibilities(serverNumber, selectedNumbers),
|
||||
utils.FilterByProtocol(selection, server.TCP, server.UDP):
|
||||
default:
|
||||
|
||||
@@ -81,7 +81,7 @@ func Test_versions(t *testing.T) {
|
||||
"Nordvpn": {
|
||||
model: models.NordvpnServer{},
|
||||
version: allServers.Nordvpn.Version,
|
||||
digest: "a3b5d609",
|
||||
digest: "a8043704",
|
||||
},
|
||||
"Privado": {
|
||||
model: models.PrivadoServer{},
|
||||
|
||||
+1
-5144
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,6 @@ func GetServers(ctx context.Context, client *http.Client, minServers int) (
|
||||
server := models.NordvpnServer{
|
||||
Region: jsonServer.Country,
|
||||
Hostname: jsonServer.Domain,
|
||||
Name: jsonServer.Name,
|
||||
Number: number,
|
||||
IP: ip,
|
||||
TCP: jsonServer.Features.TCP,
|
||||
|
||||
Reference in New Issue
Block a user