Filter Privado servers by hostnames only

This commit is contained in:
Quentin McGaw
2020-11-09 23:17:22 +00:00
parent f1e4b9937b
commit 40ed070f21
12 changed files with 222 additions and 289 deletions

View File

@@ -27,7 +27,7 @@ type ServerSelection struct {
Countries []string `json:"countries"` // Mullvad, PureVPN
Cities []string `json:"cities"` // Mullvad, PureVPN, Windscribe
Hostnames []string `json:"hostnames"` // Windscribe
Hostnames []string `json:"hostnames"` // Windscribe, Privado
// Mullvad
ISPs []string `json:"isps"`

View File

@@ -108,14 +108,13 @@ func (s *PurevpnServer) String() string {
}
type PrivadoServer struct {
IP net.IP `json:"ip"`
City string `json:"city"`
Number uint16 `json:"number"`
IP net.IP `json:"ip"`
Hostname string `json:"hostname"`
}
func (s *PrivadoServer) String() string {
return fmt.Sprintf("{City: %q, Number: %d, IP: %s}",
s.City, s.Number, goStringifyIP(s.IP))
return fmt.Sprintf("{Hostname: %q, IP: %s}",
s.Hostname, goStringifyIP(s.IP))
}
func goStringifyIP(ip net.IP) string {