Maintenance: deduplicate PIA servers by protocols

This commit is contained in:
Quentin McGaw
2021-02-16 13:06:58 +00:00
parent b9b2f691a5
commit c5af536299
6 changed files with 605 additions and 646 deletions

View File

@@ -10,14 +10,15 @@ import (
type PIAServer struct {
Region string `json:"region"`
ServerName string `json:"server_name"`
Protocol string `json:"protocol"`
TCP bool `json:"tcp"`
UDP bool `json:"udp"`
PortForward bool `json:"port_forward"`
IP net.IP `json:"ip"`
}
func (p *PIAServer) String() string {
return fmt.Sprintf("{Region: %q, ServerName: %q, Protocol: %q, PortForward: %t, IP: %s}",
p.Region, p.ServerName, p.Protocol, p.PortForward, goStringifyIP(p.IP))
return fmt.Sprintf("{Region: %q, ServerName: %q, TCP: %t, UDP: %t, PortForward: %t, IP: %s}",
p.Region, p.ServerName, p.TCP, p.UDP, p.PortForward, goStringifyIP(p.IP))
}
type MullvadServer struct {