@@ -108,6 +108,21 @@ func (s *PrivatevpnServer) String() string {
|
||||
s.Country, s.City, s.Hostname, goStringifyIPs(s.IPs))
|
||||
}
|
||||
|
||||
type ProtonvpnServer struct {
|
||||
Country string `json:"country"`
|
||||
Region string `json:"region"`
|
||||
City string `json:"city"`
|
||||
Name string `json:"name"`
|
||||
Hostname string `json:"hostname"`
|
||||
EntryIP net.IP `json:"entry_ip"`
|
||||
ExitIP net.IP `json:"exit_ip"` // TODO verify it matches with public IP once connected
|
||||
}
|
||||
|
||||
func (s *ProtonvpnServer) String() string {
|
||||
return fmt.Sprintf("{Country: %q, Region: %q, City: %q, Name: %q, Hostname: %q, EntryIP: %s, ExitIP: %s}",
|
||||
s.Country, s.Region, s.City, s.Name, s.Hostname, goStringifyIP(s.EntryIP), goStringifyIP(s.ExitIP))
|
||||
}
|
||||
|
||||
type PurevpnServer struct {
|
||||
Country string `json:"country"`
|
||||
Region string `json:"region"`
|
||||
|
||||
@@ -10,6 +10,7 @@ type AllServers struct {
|
||||
Privado PrivadoServers `json:"privado"`
|
||||
Pia PiaServers `json:"pia"`
|
||||
Privatevpn PrivatevpnServers `json:"privatevpn"`
|
||||
Protonvpn ProtonvpnServers `json:"protonvpn"`
|
||||
Purevpn PurevpnServers `json:"purevpn"`
|
||||
Surfshark SurfsharkServers `json:"surfshark"`
|
||||
Torguard TorguardServers `json:"torguard"`
|
||||
@@ -26,6 +27,7 @@ func (a *AllServers) Count() int {
|
||||
len(a.Privado.Servers) +
|
||||
len(a.Pia.Servers) +
|
||||
len(a.Privatevpn.Servers) +
|
||||
len(a.Protonvpn.Servers) +
|
||||
len(a.Purevpn.Servers) +
|
||||
len(a.Surfshark.Servers) +
|
||||
len(a.Torguard.Servers) +
|
||||
@@ -73,6 +75,11 @@ type PrivatevpnServers struct {
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Servers []PrivatevpnServer `json:"servers"`
|
||||
}
|
||||
type ProtonvpnServers struct {
|
||||
Version uint16 `json:"version"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Servers []ProtonvpnServer `json:"servers"`
|
||||
}
|
||||
type PurevpnServers struct {
|
||||
Version uint16 `json:"version"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
|
||||
Reference in New Issue
Block a user