chore(storage): runtime defaults on servers data
- `openvpn` default VPN protocol for servers - True UDP if VPN protocol is Wireguard
This commit is contained in:
@@ -47,8 +47,37 @@ func (a *AllServers) Count() int {
|
||||
len(a.Windscribe.Servers)
|
||||
}
|
||||
|
||||
func (a *AllServers) SetDefaults() {
|
||||
a.Cyberghost.SetDefaults()
|
||||
a.Expressvpn.SetDefaults()
|
||||
a.Fastestvpn.SetDefaults()
|
||||
a.HideMyAss.SetDefaults()
|
||||
a.Ipvanish.SetDefaults()
|
||||
a.Ivpn.SetDefaults()
|
||||
a.Mullvad.SetDefaults()
|
||||
a.Nordvpn.SetDefaults()
|
||||
a.Perfectprivacy.SetDefaults()
|
||||
a.Privado.SetDefaults()
|
||||
a.Pia.SetDefaults()
|
||||
a.Privatevpn.SetDefaults()
|
||||
a.Protonvpn.SetDefaults()
|
||||
a.Purevpn.SetDefaults()
|
||||
a.Surfshark.SetDefaults()
|
||||
a.Torguard.SetDefaults()
|
||||
a.VPNUnlimited.SetDefaults()
|
||||
a.Vyprvpn.SetDefaults()
|
||||
a.Wevpn.SetDefaults()
|
||||
a.Windscribe.SetDefaults()
|
||||
}
|
||||
|
||||
type Servers struct {
|
||||
Version uint16 `json:"version"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Servers []Server `json:"servers"`
|
||||
}
|
||||
|
||||
func (s *Servers) SetDefaults() {
|
||||
for i := range s.Servers {
|
||||
s.Servers[i].setDefaults()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user