Servers updater (#232)
* Support for all VPN providers * Update all VPN providers servers information * Remove old tooling binaries
This commit is contained in:
@@ -35,22 +35,38 @@ type WindscribeServer struct {
|
||||
IPs []net.IP `json:"ips"`
|
||||
}
|
||||
|
||||
func (s *WindscribeServer) String() string {
|
||||
return fmt.Sprintf("{Region: %q, IPs: %s}", s.Region, goStringifyIPs(s.IPs))
|
||||
}
|
||||
|
||||
type SurfsharkServer struct {
|
||||
Region string `json:"region"`
|
||||
IPs []net.IP `json:"ips"`
|
||||
}
|
||||
|
||||
func (s *SurfsharkServer) String() string {
|
||||
return fmt.Sprintf("{Region: %q, IPs: %s}", s.Region, goStringifyIPs(s.IPs))
|
||||
}
|
||||
|
||||
type CyberghostServer struct {
|
||||
Region string `json:"region"`
|
||||
Group string `json:"group"`
|
||||
IPs []net.IP `json:"ips"`
|
||||
}
|
||||
|
||||
func (s *CyberghostServer) String() string {
|
||||
return fmt.Sprintf("{Region: %q, Group: %q, IPs: %s}", s.Region, s.Group, goStringifyIPs(s.IPs))
|
||||
}
|
||||
|
||||
type VyprvpnServer struct {
|
||||
Region string `json:"region"`
|
||||
IPs []net.IP `json:"ips"`
|
||||
}
|
||||
|
||||
func (s *VyprvpnServer) String() string {
|
||||
return fmt.Sprintf("{Region: %q, IPs: %s}", s.Region, goStringifyIPs(s.IPs))
|
||||
}
|
||||
|
||||
type NordvpnServer struct { //nolint:maligned
|
||||
Region string `json:"region"`
|
||||
Number uint16 `json:"number"`
|
||||
@@ -59,6 +75,11 @@ type NordvpnServer struct { //nolint:maligned
|
||||
UDP bool `json:"udp"`
|
||||
}
|
||||
|
||||
func (s *NordvpnServer) String() string {
|
||||
return fmt.Sprintf("{Region: %q, Number: %d, TCP: %t, UDP: %t, IP: %s}",
|
||||
s.Region, s.Number, s.TCP, s.UDP, goStringifyIP(s.IP))
|
||||
}
|
||||
|
||||
type PurevpnServer struct {
|
||||
Region string `json:"region"`
|
||||
Country string `json:"country"`
|
||||
@@ -66,6 +87,11 @@ type PurevpnServer struct {
|
||||
IPs []net.IP `json:"ips"`
|
||||
}
|
||||
|
||||
func (s *PurevpnServer) String() string {
|
||||
return fmt.Sprintf("{Region: %q, Country: %q, City: %q, IPs: %s}",
|
||||
s.Region, s.Country, s.City, goStringifyIPs(s.IPs))
|
||||
}
|
||||
|
||||
func goStringifyIP(ip net.IP) string {
|
||||
s := fmt.Sprintf("%#v", ip)
|
||||
s = strings.TrimSuffix(strings.TrimPrefix(s, "net.IP{"), "}")
|
||||
|
||||
Reference in New Issue
Block a user