chore(storage): tcp and udp fields for all servers

- Updater code sets UDP and TCP compatibility for all providers
- Increase servers.json model versions for affected providers (mullvad, windscribe, privado, protonvpn, privatevpn)
- Remove retro-compatibility server defaults
- Update all affected providers servers data (mullvad, windscribe, privado, protonvpn, privatevpn)
This commit is contained in:
Quentin McGaw
2022-04-22 21:25:00 +00:00
parent afa51b3ff6
commit e6c3cb078a
8 changed files with 6822 additions and 891 deletions

View File

@@ -36,8 +36,11 @@ func (hts hostToServer) add(data serverData) (err error) {
switch data.Type {
case "openvpn":
server.VPN = vpn.OpenVPN
server.UDP = true
server.TCP = true
case "wireguard":
server.VPN = vpn.Wireguard
server.UDP = true
case "bridge":
// ignore bridge servers
return nil

View File

@@ -14,6 +14,7 @@ func (hts hostToServer) add(host string) {
return
}
server.Hostname = host
server.UDP = true
hts[host] = server
}

View File

@@ -17,6 +17,8 @@ func (hts hostToServer) add(host, country, city string) {
server.Hostname = host
server.Country = country
server.City = city
server.UDP = true
server.TCP = true
hts[host] = server
}

View File

@@ -73,6 +73,8 @@ func GetServers(ctx context.Context, unzipper unzip.Unzipper,
Country: country,
City: city,
IPs: ips,
UDP: true,
TCP: true,
}
noHostnameServers = append(noHostnameServers, server)
}

View File

@@ -19,6 +19,8 @@ func (its ipToServer) add(country, region, city, name, hostname string,
server.City = city
server.ServerName = name
server.Hostname = hostname
server.UDP = true
server.TCP = true
server.IPs = []net.IP{entryIP}
} else {
server.IPs = append(server.IPs, entryIP)

View File

@@ -41,6 +41,8 @@ func GetServers(ctx context.Context, client *http.Client, minServers int) (
}
server := models.Server{
VPN: vpn.OpenVPN,
TCP: true,
UDP: true,
Region: region,
City: city,
Hostname: node.Hostname,
@@ -56,6 +58,8 @@ func GetServers(ctx context.Context, client *http.Client, minServers int) (
}
server.VPN = vpn.Wireguard
server.UDP = true
server.TCP = false
server.OvpnX509 = ""
server.WgPubKey = wgPubKey
server.IPs = []net.IP{node.IP3}