chore(protonvpn): remove unused exit IPs field

This commit is contained in:
Quentin McGaw
2022-03-16 09:44:57 +00:00
parent c3a231e0ab
commit acdbe2163e
6 changed files with 1254 additions and 4531 deletions

View File

@@ -9,7 +9,7 @@ import (
type ipToServer map[string]models.ProtonvpnServer
func (its ipToServer) add(country, region, city, name, hostname string,
entryIP, exitIP net.IP) {
entryIP net.IP) {
key := entryIP.String()
server, ok := its[key]
@@ -20,9 +20,6 @@ func (its ipToServer) add(country, region, city, name, hostname string,
server.Name = name
server.Hostname = hostname
server.EntryIP = entryIP
server.ExitIPs = []net.IP{exitIP}
} else {
server.ExitIPs = append(server.ExitIPs, exitIP)
}
its[key] = server

View File

@@ -47,7 +47,6 @@ func GetServers(ctx context.Context, client *http.Client, minServers int) (
hostname := physicalServer.Domain
entryIP := physicalServer.EntryIP
exitIP := physicalServer.ExitIP
// Note: for multi-hop use the server name or hostname
// instead of the country
@@ -57,7 +56,7 @@ func GetServers(ctx context.Context, client *http.Client, minServers int) (
warnings = append(warnings, warning)
}
ipToServer.add(country, region, city, name, hostname, entryIP, exitIP)
ipToServer.add(country, region, city, name, hostname, entryIP)
}
}