fix(protonvpn): remove duplicate entry IPs

This commit is contained in:
Quentin McGaw
2022-06-09 22:11:40 +00:00
parent 7f32b43895
commit 11b55abff3
2 changed files with 117 additions and 1045 deletions

View File

@@ -14,7 +14,10 @@ func (its ipToServer) add(country, region, city, name, hostname string,
key := entryIP.String() key := entryIP.String()
server, ok := its[key] server, ok := its[key]
if !ok { if ok {
return
}
server.VPN = vpn.OpenVPN server.VPN = vpn.OpenVPN
server.Country = country server.Country = country
server.Region = region server.Region = region
@@ -24,10 +27,6 @@ func (its ipToServer) add(country, region, city, name, hostname string,
server.UDP = true server.UDP = true
server.TCP = true server.TCP = true
server.IPs = []net.IP{entryIP} server.IPs = []net.IP{entryIP}
} else {
server.IPs = append(server.IPs, entryIP)
}
its[key] = server its[key] = server
} }

File diff suppressed because it is too large Load Diff