Feature: multiple IP addresses per PIA server

This commit is contained in:
Quentin McGaw
2021-05-10 15:44:46 +00:00
parent 52ff03ae41
commit baf506ae27
7 changed files with 422 additions and 394 deletions

View File

@@ -91,18 +91,18 @@ func (s *PrivadoServer) String() string {
}
type PIAServer struct {
Region string `json:"region"`
Hostname string `json:"hostname"`
ServerName string `json:"server_name"`
TCP bool `json:"tcp"`
UDP bool `json:"udp"`
PortForward bool `json:"port_forward"`
IP net.IP `json:"ip"`
Region string `json:"region"`
Hostname string `json:"hostname"`
ServerName string `json:"server_name"`
TCP bool `json:"tcp"`
UDP bool `json:"udp"`
PortForward bool `json:"port_forward"`
IPs []net.IP `json:"ips"`
}
func (p *PIAServer) String() string {
return fmt.Sprintf("{Region: %q, Hostname: %q, ServerName: %q, TCP: %t, UDP: %t, PortForward: %t, IP: %s}",
p.Region, p.Hostname, p.ServerName, p.TCP, p.UDP, p.PortForward, goStringifyIP(p.IP))
return fmt.Sprintf("{Region: %q, Hostname: %q, ServerName: %q, TCP: %t, UDP: %t, PortForward: %t, IPs: %s}",
p.Region, p.Hostname, p.ServerName, p.TCP, p.UDP, p.PortForward, goStringifyIPs(p.IPs))
}
type PrivatevpnServer struct {