Files
gluetun/internal/models/servers.go

55 lines
1.7 KiB
Go
Raw Normal View History

package models
type AllServers struct {
Version uint16 `json:"version"` // used for migration of the top level scheme
Cyberghost Servers `json:"cyberghost"`
Expressvpn Servers `json:"expressvpn"`
Fastestvpn Servers `json:"fastestvpn"`
HideMyAss Servers `json:"hidemyass"`
Ipvanish Servers `json:"ipvanish"`
Ivpn Servers `json:"ivpn"`
Mullvad Servers `json:"mullvad"`
Perfectprivacy Servers `json:"perfectprivacy"`
Nordvpn Servers `json:"nordvpn"`
Privado Servers `json:"privado"`
Pia Servers `json:"pia"`
Privatevpn Servers `json:"privatevpn"`
Protonvpn Servers `json:"protonvpn"`
Purevpn Servers `json:"purevpn"`
Surfshark Servers `json:"surfshark"`
Torguard Servers `json:"torguard"`
VPNUnlimited Servers `json:"vpnunlimited"`
Vyprvpn Servers `json:"vyprvpn"`
Wevpn Servers `json:"wevpn"`
Windscribe Servers `json:"windscribe"`
}
func (a *AllServers) Count() int {
return len(a.Cyberghost.Servers) +
2021-09-23 10:19:30 -07:00
len(a.Expressvpn.Servers) +
2021-03-05 23:12:19 -05:00
len(a.Fastestvpn.Servers) +
len(a.HideMyAss.Servers) +
len(a.Ipvanish.Servers) +
2021-05-31 00:11:16 +00:00
len(a.Ivpn.Servers) +
len(a.Mullvad.Servers) +
len(a.Nordvpn.Servers) +
2021-10-05 10:44:15 -07:00
len(a.Perfectprivacy.Servers) +
len(a.Privado.Servers) +
len(a.Pia.Servers) +
2021-03-05 22:58:57 -05:00
len(a.Privatevpn.Servers) +
len(a.Protonvpn.Servers) +
len(a.Purevpn.Servers) +
len(a.Surfshark.Servers) +
len(a.Torguard.Servers) +
len(a.VPNUnlimited.Servers) +
len(a.Vyprvpn.Servers) +
2021-09-23 07:58:13 -07:00
len(a.Wevpn.Servers) +
len(a.Windscribe.Servers)
}
type Servers struct {
Version uint16 `json:"version"`
Timestamp int64 `json:"timestamp"`
Servers []Server `json:"servers"`
2020-07-25 11:19:45 -04:00
}