Windscribe API and more servers filter options, fixes #197 (#282)

- Use Windscribe API to fetch servers information
- More data on servers about region, city and hostname
- Add optional server filters with `REGION`, `CITY` and `HOSTNAME` csv environment variables
This commit is contained in:
Quentin McGaw
2020-11-04 20:38:35 -05:00
committed by GitHub
parent 3b04677f8f
commit 31883f9adb
15 changed files with 430 additions and 203 deletions

View File

@@ -52,12 +52,15 @@ func (s *MullvadServer) String() string {
}
type WindscribeServer struct {
Region string `json:"region"`
IPs []net.IP `json:"ips"`
Region string `json:"region"`
City string `json:"city"`
Hostname string `json:"hostname"`
IP net.IP `json:"ip"`
}
func (s *WindscribeServer) String() string {
return fmt.Sprintf("{Region: %q, IPs: %s}", s.Region, goStringifyIPs(s.IPs))
return fmt.Sprintf("{Region: %q, City: %q, Hostname: %q, IP: %s}",
s.Region, s.City, s.Hostname, goStringifyIP(s.IP))
}
type SurfsharkServer struct {