IVPN server data update code and ISP filter (#578)
- Use IVPN's HTTP API instead of their .zip file - Unit tests for API and GetServers - Paves the way for Wireguard - Update server information for IVPN - Add `ISP` filter for IVPN
This commit is contained in:
@@ -28,6 +28,15 @@ func IvpnCityChoices() (choices []string) {
|
||||
return makeUnique(choices)
|
||||
}
|
||||
|
||||
func IvpnISPChoices() (choices []string) {
|
||||
servers := IvpnServers()
|
||||
choices = make([]string, len(servers))
|
||||
for i := range servers {
|
||||
choices[i] = servers[i].ISP
|
||||
}
|
||||
return makeUnique(choices)
|
||||
}
|
||||
|
||||
func IvpnHostnameChoices() (choices []string) {
|
||||
servers := IvpnServers()
|
||||
choices = make([]string, len(servers))
|
||||
|
||||
Reference in New Issue
Block a user