diff --git a/internal/models/sort.go b/internal/models/sort.go new file mode 100644 index 00000000..44f6d4f9 --- /dev/null +++ b/internal/models/sort.go @@ -0,0 +1,42 @@ +package models + +import "sort" + +var _ sort.Interface = (*SortableServers)(nil) + +type SortableServers []Server + +func (s SortableServers) Len() int { + return len(s) +} + +func (s SortableServers) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s SortableServers) Less(i, j int) bool { + a, b := s[i], s[j] + + if a.Country == b.Country { //nolint:nestif + if a.Region == b.Region { + if a.City == b.City { + if a.ServerName == b.ServerName { + if a.Number == b.Number { + if a.Hostname == b.Hostname { + if a.ISP == b.ISP { + return a.VPN < b.VPN + } + return a.ISP < b.ISP + } + return a.Hostname < b.Hostname + } + return a.Number < b.Number + } + return a.ServerName < b.ServerName + } + return a.City < b.City + } + return a.Region < b.Region + } + return a.Country < b.Country +} diff --git a/internal/provider/cyberghost/updater/servers.go b/internal/provider/cyberghost/updater/servers.go index ade563b6..a0e53b5c 100644 --- a/internal/provider/cyberghost/updater/servers.go +++ b/internal/provider/cyberghost/updater/servers.go @@ -4,6 +4,7 @@ package cyberghost import ( "context" + "sort" "github.com/qdm12/gluetun/internal/models" ) @@ -22,6 +23,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = possibleServers.toSlice() - sortServers(servers) + sort.Sort(models.SortableServers(servers)) + return servers, nil } diff --git a/internal/provider/cyberghost/updater/sort.go b/internal/provider/cyberghost/updater/sort.go deleted file mode 100644 index f0d3f8a3..00000000 --- a/internal/provider/cyberghost/updater/sort.go +++ /dev/null @@ -1,16 +0,0 @@ -package cyberghost - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/expressvpn/updater/servers.go b/internal/provider/expressvpn/updater/servers.go index 79c40f4a..dd1d7ec9 100644 --- a/internal/provider/expressvpn/updater/servers.go +++ b/internal/provider/expressvpn/updater/servers.go @@ -5,6 +5,7 @@ package expressvpn import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/constants/vpn" "github.com/qdm12/gluetun/internal/models" @@ -47,7 +48,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/expressvpn/updater/sort.go b/internal/provider/expressvpn/updater/sort.go deleted file mode 100644 index c441ee1e..00000000 --- a/internal/provider/expressvpn/updater/sort.go +++ /dev/null @@ -1,19 +0,0 @@ -package expressvpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/fastestvpn/updater/servers.go b/internal/provider/fastestvpn/updater/servers.go index c6e52e43..10b2a195 100644 --- a/internal/provider/fastestvpn/updater/servers.go +++ b/internal/provider/fastestvpn/updater/servers.go @@ -5,6 +5,7 @@ package fastestvpn import ( "context" "fmt" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -72,7 +73,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/fastestvpn/updater/sort.go b/internal/provider/fastestvpn/updater/sort.go deleted file mode 100644 index 4bf460a5..00000000 --- a/internal/provider/fastestvpn/updater/sort.go +++ /dev/null @@ -1,16 +0,0 @@ -package fastestvpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/hidemyass/updater/servers.go b/internal/provider/hidemyass/updater/servers.go index 7fac625d..befbdd77 100644 --- a/internal/provider/hidemyass/updater/servers.go +++ b/internal/provider/hidemyass/updater/servers.go @@ -5,6 +5,7 @@ package hidemyass import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/constants/vpn" "github.com/qdm12/gluetun/internal/models" @@ -62,7 +63,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = append(servers, server) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/hidemyass/updater/sort.go b/internal/provider/hidemyass/updater/sort.go deleted file mode 100644 index 87f6094c..00000000 --- a/internal/provider/hidemyass/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package hidemyass - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].Region == servers[j].Region { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Region < servers[j].Region - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/ipvanish/updater/servers.go b/internal/provider/ipvanish/updater/servers.go index b739b6ca..e15e97f2 100644 --- a/internal/provider/ipvanish/updater/servers.go +++ b/internal/provider/ipvanish/updater/servers.go @@ -5,6 +5,7 @@ package ipvanish import ( "context" "fmt" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -83,7 +84,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/ipvanish/updater/sort.go b/internal/provider/ipvanish/updater/sort.go deleted file mode 100644 index a2b73d0a..00000000 --- a/internal/provider/ipvanish/updater/sort.go +++ /dev/null @@ -1,19 +0,0 @@ -package ipvanish - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/ipvanish/updater/sort_test.go b/internal/provider/ipvanish/updater/sort_test.go deleted file mode 100644 index 5edb265b..00000000 --- a/internal/provider/ipvanish/updater/sort_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package ipvanish - -import ( - "testing" - - "github.com/qdm12/gluetun/internal/models" - "github.com/stretchr/testify/assert" -) - -func Test_sortServers(t *testing.T) { - t.Parallel() - testCases := map[string]struct { - initialServers []models.Server - sortedServers []models.Server - }{ - "no server": {}, - "sorted servers": { - initialServers: []models.Server{ - {Country: "B", City: "A", Hostname: "A"}, - {Country: "A", City: "A", Hostname: "B"}, - {Country: "A", City: "A", Hostname: "A"}, - {Country: "A", City: "B", Hostname: "A"}, - }, - sortedServers: []models.Server{ - {Country: "A", City: "A", Hostname: "A"}, - {Country: "A", City: "A", Hostname: "B"}, - {Country: "A", City: "B", Hostname: "A"}, - {Country: "B", City: "A", Hostname: "A"}, - }, - }, - } - for name, testCase := range testCases { - testCase := testCase - t.Run(name, func(t *testing.T) { - t.Parallel() - sortServers(testCase.initialServers) - assert.Equal(t, testCase.sortedServers, testCase.initialServers) - }) - } -} diff --git a/internal/provider/ivpn/updater/servers.go b/internal/provider/ivpn/updater/servers.go index 3083328d..b1791591 100644 --- a/internal/provider/ivpn/updater/servers.go +++ b/internal/provider/ivpn/updater/servers.go @@ -5,6 +5,7 @@ package ivpn import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/constants/vpn" "github.com/qdm12/gluetun/internal/models" @@ -72,7 +73,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = append(servers, server) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/ivpn/updater/sort.go b/internal/provider/ivpn/updater/sort.go deleted file mode 100644 index 6ad5d172..00000000 --- a/internal/provider/ivpn/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package ivpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - if servers[i].Hostname == servers[j].Hostname { - return servers[i].VPN < servers[j].VPN - } - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/ivpn/updater/sort_test.go b/internal/provider/ivpn/updater/sort_test.go deleted file mode 100644 index 6754dcd6..00000000 --- a/internal/provider/ivpn/updater/sort_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package ivpn - -import ( - "testing" - - "github.com/qdm12/gluetun/internal/models" - "github.com/stretchr/testify/assert" -) - -func Test_sortServers(t *testing.T) { - t.Parallel() - testCases := map[string]struct { - initialServers []models.Server - sortedServers []models.Server - }{ - "no server": {}, - "sorted servers": { - initialServers: []models.Server{ - {Country: "B", City: "A", Hostname: "A"}, - {Country: "A", City: "A", Hostname: "B"}, - {Country: "A", City: "A", Hostname: "A"}, - {Country: "A", City: "B", Hostname: "A"}, - }, - sortedServers: []models.Server{ - {Country: "A", City: "A", Hostname: "A"}, - {Country: "A", City: "A", Hostname: "B"}, - {Country: "A", City: "B", Hostname: "A"}, - {Country: "B", City: "A", Hostname: "A"}, - }, - }, - } - for name, testCase := range testCases { - testCase := testCase - t.Run(name, func(t *testing.T) { - t.Parallel() - sortServers(testCase.initialServers) - assert.Equal(t, testCase.sortedServers, testCase.initialServers) - }) - } -} diff --git a/internal/provider/mullvad/updater/servers.go b/internal/provider/mullvad/updater/servers.go index 8778f295..e0d8a8c7 100644 --- a/internal/provider/mullvad/updater/servers.go +++ b/internal/provider/mullvad/updater/servers.go @@ -5,6 +5,7 @@ package mullvad import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/models" "github.com/qdm12/gluetun/internal/provider/common" @@ -31,7 +32,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = hts.toServersSlice() - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/mullvad/updater/sort.go b/internal/provider/mullvad/updater/sort.go deleted file mode 100644 index 3be98616..00000000 --- a/internal/provider/mullvad/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package mullvad - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - if servers[i].Hostname == servers[j].Hostname { - return servers[i].ISP < servers[j].ISP - } - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/nordvpn/updater/servers.go b/internal/provider/nordvpn/updater/servers.go index d4825e9c..be45ddfe 100644 --- a/internal/provider/nordvpn/updater/servers.go +++ b/internal/provider/nordvpn/updater/servers.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "net" + "sort" "github.com/qdm12/gluetun/internal/constants/vpn" "github.com/qdm12/gluetun/internal/models" @@ -60,7 +61,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/nordvpn/updater/sort.go b/internal/provider/nordvpn/updater/sort.go deleted file mode 100644 index 0ce6baa3..00000000 --- a/internal/provider/nordvpn/updater/sort.go +++ /dev/null @@ -1,16 +0,0 @@ -package nordvpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Region == servers[j].Region { - return servers[i].Number < servers[j].Number - } - return servers[i].Region < servers[j].Region - }) -} diff --git a/internal/provider/perfectprivacy/updater/servers.go b/internal/provider/perfectprivacy/updater/servers.go index 3caf7fd5..88f9d324 100644 --- a/internal/provider/perfectprivacy/updater/servers.go +++ b/internal/provider/perfectprivacy/updater/servers.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net/url" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -46,7 +47,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = cts.toServersSlice() - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/perfectprivacy/updater/sort.go b/internal/provider/perfectprivacy/updater/sort.go deleted file mode 100644 index 4099f03f..00000000 --- a/internal/provider/perfectprivacy/updater/sort.go +++ /dev/null @@ -1,13 +0,0 @@ -package perfectprivacy - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - return servers[i].City < servers[j].City - }) -} diff --git a/internal/provider/privado/updater/servers.go b/internal/provider/privado/updater/servers.go index 666bdb5c..6adbb3f4 100644 --- a/internal/provider/privado/updater/servers.go +++ b/internal/provider/privado/updater/servers.go @@ -5,6 +5,7 @@ package privado import ( "context" "fmt" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -65,7 +66,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( return nil, err } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/privado/updater/sort.go b/internal/provider/privado/updater/sort.go deleted file mode 100644 index 7873d5fb..00000000 --- a/internal/provider/privado/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package privado - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].Region == servers[j].Region { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Region < servers[j].Region - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/privateinternetaccess/updater/servers.go b/internal/provider/privateinternetaccess/updater/servers.go index cce9144c..e66e824c 100644 --- a/internal/provider/privateinternetaccess/updater/servers.go +++ b/internal/provider/privateinternetaccess/updater/servers.go @@ -5,6 +5,7 @@ package privateinternetaccess import ( "context" "fmt" + "sort" "time" "github.com/qdm12/gluetun/internal/models" @@ -70,7 +71,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/privateinternetaccess/updater/sort.go b/internal/provider/privateinternetaccess/updater/sort.go deleted file mode 100644 index dc597673..00000000 --- a/internal/provider/privateinternetaccess/updater/sort.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateinternetaccess - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Region == servers[j].Region { - if servers[i].Hostname == servers[j].Hostname { - return servers[i].ServerName < servers[j].ServerName - } - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].Region < servers[j].Region - }) -} diff --git a/internal/provider/privatevpn/updater/servers.go b/internal/provider/privatevpn/updater/servers.go index 7c4e1aa6..3811988f 100644 --- a/internal/provider/privatevpn/updater/servers.go +++ b/internal/provider/privatevpn/updater/servers.go @@ -5,6 +5,7 @@ package privatevpn import ( "context" "fmt" + "sort" "strings" "github.com/qdm12/gluetun/internal/constants" @@ -94,7 +95,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = hts.toServersSlice() servers = append(servers, noHostnameServers...) - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/privatevpn/updater/sort.go b/internal/provider/privatevpn/updater/sort.go deleted file mode 100644 index 3e45e085..00000000 --- a/internal/provider/privatevpn/updater/sort.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatevpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/protonvpn/updater/servers.go b/internal/provider/protonvpn/updater/servers.go index 2cf58275..9344fe52 100644 --- a/internal/provider/protonvpn/updater/servers.go +++ b/internal/provider/protonvpn/updater/servers.go @@ -5,6 +5,7 @@ package protonvpn import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/constants" "github.com/qdm12/gluetun/internal/models" @@ -63,7 +64,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = ipToServer.toServersSlice() - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/protonvpn/updater/sort.go b/internal/provider/protonvpn/updater/sort.go deleted file mode 100644 index a0f9ac66..00000000 --- a/internal/provider/protonvpn/updater/sort.go +++ /dev/null @@ -1,26 +0,0 @@ -package protonvpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - a, b := servers[i], servers[j] - if a.Country == b.Country { //nolint:nestif - if a.Region == b.Region { - if a.City == b.City { - if a.ServerName == b.ServerName { - return a.Hostname < b.Hostname - } - return a.ServerName < b.ServerName - } - return a.City < b.City - } - return a.Region < b.Region - } - return a.Country < b.Country - }) -} diff --git a/internal/provider/purevpn/updater/servers.go b/internal/provider/purevpn/updater/servers.go index 15cf746d..8cac1206 100644 --- a/internal/provider/purevpn/updater/servers.go +++ b/internal/provider/purevpn/updater/servers.go @@ -6,6 +6,7 @@ import ( "context" "fmt" "net" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -91,7 +92,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers[i].City = ipsInfo[i].City } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/purevpn/updater/sort.go b/internal/provider/purevpn/updater/sort.go deleted file mode 100644 index 71c3a414..00000000 --- a/internal/provider/purevpn/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package purevpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].Region == servers[j].Region { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Region < servers[j].Region - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/surfshark/servers/locationdata.go b/internal/provider/surfshark/servers/locationdata.go index 70844025..18d5c9cb 100644 --- a/internal/provider/surfshark/servers/locationdata.go +++ b/internal/provider/surfshark/servers/locationdata.go @@ -12,7 +12,7 @@ type ServerLocation struct { } // TODO remove retroRegion and servers from API in v4. -func LocationData() (data []ServerLocation) { +func LocationData() (data []ServerLocation) { //nolint:maintidx //nolint:lll return []ServerLocation{ {Region: "Asia Pacific", Country: "Australia", City: "Adelaide", RetroLoc: "Australia Adelaide", Hostname: "au-adl.prod.surfshark.com", MultiHop: false}, diff --git a/internal/provider/surfshark/updater/servers.go b/internal/provider/surfshark/updater/servers.go index 87ac90a3..299253b6 100644 --- a/internal/provider/surfshark/updater/servers.go +++ b/internal/provider/surfshark/updater/servers.go @@ -5,6 +5,7 @@ package surfshark import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/models" "github.com/qdm12/gluetun/internal/provider/common" @@ -47,7 +48,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/surfshark/updater/sort.go b/internal/provider/surfshark/updater/sort.go deleted file mode 100644 index 0367acc4..00000000 --- a/internal/provider/surfshark/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package surfshark - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Region == servers[j].Region { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - } - return servers[i].Region < servers[j].Region - }) -} diff --git a/internal/provider/surfshark/updater/sort_test.go b/internal/provider/surfshark/updater/sort_test.go deleted file mode 100644 index fb16dd96..00000000 --- a/internal/provider/surfshark/updater/sort_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package surfshark - -import ( - "testing" - - "github.com/qdm12/gluetun/internal/models" - "github.com/stretchr/testify/assert" -) - -func Test_sortServers(t *testing.T) { - t.Parallel() - testCases := map[string]struct { - initialServers []models.Server - sortedServers []models.Server - }{ - "no server": {}, - "sorted servers": { - initialServers: []models.Server{ - {Region: "Z", Country: "B", City: "A", Hostname: "A"}, - {Country: "B", City: "A", Hostname: "A"}, - {Country: "A", City: "A", Hostname: "B"}, - {Country: "A", City: "A", Hostname: "A"}, - {Country: "A", City: "B", Hostname: "A"}, - }, - sortedServers: []models.Server{ - {Country: "A", City: "A", Hostname: "A"}, - {Country: "A", City: "A", Hostname: "B"}, - {Country: "A", City: "B", Hostname: "A"}, - {Country: "B", City: "A", Hostname: "A"}, - {Region: "Z", Country: "B", City: "A", Hostname: "A"}, - }, - }, - } - for name, testCase := range testCases { - testCase := testCase - t.Run(name, func(t *testing.T) { - t.Parallel() - sortServers(testCase.initialServers) - assert.Equal(t, testCase.sortedServers, testCase.initialServers) - }) - } -} diff --git a/internal/provider/torguard/updater/servers.go b/internal/provider/torguard/updater/servers.go index cd7cce97..7503e9aa 100644 --- a/internal/provider/torguard/updater/servers.go +++ b/internal/provider/torguard/updater/servers.go @@ -5,6 +5,7 @@ package torguard import ( "context" "fmt" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -64,7 +65,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/torguard/updater/sort.go b/internal/provider/torguard/updater/sort.go deleted file mode 100644 index 9853a4d5..00000000 --- a/internal/provider/torguard/updater/sort.go +++ /dev/null @@ -1,19 +0,0 @@ -package torguard - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/vpnunlimited/updater/servers.go b/internal/provider/vpnunlimited/updater/servers.go index 4befcda2..ef5c5f17 100644 --- a/internal/provider/vpnunlimited/updater/servers.go +++ b/internal/provider/vpnunlimited/updater/servers.go @@ -5,6 +5,7 @@ package vpnunlimited import ( "context" "fmt" + "sort" "github.com/qdm12/gluetun/internal/models" "github.com/qdm12/gluetun/internal/provider/common" @@ -36,7 +37,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/vpnunlimited/updater/sort.go b/internal/provider/vpnunlimited/updater/sort.go deleted file mode 100644 index 6d1e659b..00000000 --- a/internal/provider/vpnunlimited/updater/sort.go +++ /dev/null @@ -1,19 +0,0 @@ -package vpnunlimited - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Country == servers[j].Country { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Country < servers[j].Country - }) -} diff --git a/internal/provider/vyprvpn/updater/servers.go b/internal/provider/vyprvpn/updater/servers.go index df193cef..4448555e 100644 --- a/internal/provider/vyprvpn/updater/servers.go +++ b/internal/provider/vyprvpn/updater/servers.go @@ -5,6 +5,7 @@ package vyprvpn import ( "context" "fmt" + "sort" "strings" "github.com/qdm12/gluetun/internal/models" @@ -80,7 +81,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/vyprvpn/updater/sort.go b/internal/provider/vyprvpn/updater/sort.go deleted file mode 100644 index d440f25b..00000000 --- a/internal/provider/vyprvpn/updater/sort.go +++ /dev/null @@ -1,13 +0,0 @@ -package vyprvpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - return servers[i].Region < servers[j].Region - }) -} diff --git a/internal/provider/wevpn/updater/servers.go b/internal/provider/wevpn/updater/servers.go index cc4b2d81..12d4288a 100644 --- a/internal/provider/wevpn/updater/servers.go +++ b/internal/provider/wevpn/updater/servers.go @@ -6,6 +6,7 @@ import ( "context" "errors" "fmt" + "sort" "github.com/qdm12/gluetun/internal/constants/vpn" "github.com/qdm12/gluetun/internal/models" @@ -55,7 +56,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( servers = append(servers, server) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/wevpn/updater/sort.go b/internal/provider/wevpn/updater/sort.go deleted file mode 100644 index 71ee531a..00000000 --- a/internal/provider/wevpn/updater/sort.go +++ /dev/null @@ -1,16 +0,0 @@ -package wevpn - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].City == servers[j].City { - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - }) -} diff --git a/internal/provider/wevpn/updater/sort_test.go b/internal/provider/wevpn/updater/sort_test.go deleted file mode 100644 index 4d949947..00000000 --- a/internal/provider/wevpn/updater/sort_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package wevpn - -import ( - "testing" - - "github.com/qdm12/gluetun/internal/models" - "github.com/stretchr/testify/assert" -) - -func Test_sortServers(t *testing.T) { - t.Parallel() - testCases := map[string]struct { - initialServers []models.Server - sortedServers []models.Server - }{ - "no server": {}, - "sorted servers": { - initialServers: []models.Server{ - {City: "A", Hostname: "A"}, - {City: "A", Hostname: "B"}, - {City: "A", Hostname: "A"}, - {City: "B", Hostname: "A"}, - }, - sortedServers: []models.Server{ - {City: "A", Hostname: "A"}, - {City: "A", Hostname: "A"}, - {City: "A", Hostname: "B"}, - {City: "B", Hostname: "A"}, - }, - }, - } - for name, testCase := range testCases { - testCase := testCase - t.Run(name, func(t *testing.T) { - t.Parallel() - sortServers(testCase.initialServers) - assert.Equal(t, testCase.sortedServers, testCase.initialServers) - }) - } -} diff --git a/internal/provider/windscribe/updater/servers.go b/internal/provider/windscribe/updater/servers.go index 7d58195e..4c6ee3e5 100644 --- a/internal/provider/windscribe/updater/servers.go +++ b/internal/provider/windscribe/updater/servers.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "net" + "sort" "github.com/qdm12/gluetun/internal/constants/vpn" "github.com/qdm12/gluetun/internal/models" @@ -72,7 +73,7 @@ func (u *Updater) GetServers(ctx context.Context, minServers int) ( common.ErrNotEnoughServers, len(servers), minServers) } - sortServers(servers) + sort.Sort(models.SortableServers(servers)) return servers, nil } diff --git a/internal/provider/windscribe/updater/sort.go b/internal/provider/windscribe/updater/sort.go deleted file mode 100644 index cf9ded36..00000000 --- a/internal/provider/windscribe/updater/sort.go +++ /dev/null @@ -1,22 +0,0 @@ -package windscribe - -import ( - "sort" - - "github.com/qdm12/gluetun/internal/models" -) - -func sortServers(servers []models.Server) { - sort.Slice(servers, func(i, j int) bool { - if servers[i].Region == servers[j].Region { - if servers[i].City == servers[j].City { - if servers[i].Hostname == servers[j].Hostname { - return servers[i].VPN < servers[j].VPN - } - return servers[i].Hostname < servers[j].Hostname - } - return servers[i].City < servers[j].City - } - return servers[i].Region < servers[j].Region - }) -} diff --git a/internal/storage/flush.go b/internal/storage/flush.go index bea9b90e..2f0fd4ad 100644 --- a/internal/storage/flush.go +++ b/internal/storage/flush.go @@ -4,6 +4,9 @@ import ( "encoding/json" "os" "path/filepath" + "sort" + + "github.com/qdm12/gluetun/internal/models" ) // FlushToFile flushes the merged servers data to the file @@ -31,6 +34,10 @@ func (s *Storage) flushToFile(path string) error { encoder := json.NewEncoder(file) encoder.SetIndent("", " ") + for _, obj := range s.mergedServers.ProviderToServers { + sort.Sort(models.SortableServers(obj.Servers)) + } + err = encoder.Encode(&s.mergedServers) if err != nil { _ = file.Close() diff --git a/internal/storage/servers.json b/internal/storage/servers.json index eac04108..18f683b5 100644 --- a/internal/storage/servers.json +++ b/internal/storage/servers.json @@ -13378,26 +13378,6 @@ "216.131.68.22" ] }, - { - "vpn": "openvpn", - "country": "Luxembourg", - "city": "Luxembourg", - "hostname": "lux-c08.ipvanish.com", - "udp": true, - "ips": [ - "216.131.68.28" - ] - }, - { - "vpn": "openvpn", - "country": "Luxembourg", - "city": "Luxembourg", - "hostname": "lux-c09.ipvanish.com", - "udp": true, - "ips": [ - "216.131.68.34" - ] - }, { "vpn": "openvpn", "country": "Luxembourg", @@ -13418,6 +13398,26 @@ "216.131.68.28" ] }, + { + "vpn": "openvpn", + "country": "Luxembourg", + "city": "Luxembourg", + "hostname": "lux-c08.ipvanish.com", + "udp": true, + "ips": [ + "216.131.68.28" + ] + }, + { + "vpn": "openvpn", + "country": "Luxembourg", + "city": "Luxembourg", + "hostname": "lux-c09.ipvanish.com", + "udp": true, + "ips": [ + "216.131.68.34" + ] + }, { "vpn": "openvpn", "country": "Luxembourg", @@ -59247,22 +59247,22 @@ "vpn": "openvpn", "region": "Netherlands", "number": 11, - "hostname": "nl-se11.nordvpn.com", + "hostname": "nl-ch11.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "213.232.87.174" + "213.232.87.146" ] }, { "vpn": "openvpn", "region": "Netherlands", "number": 11, - "hostname": "nl-ch11.nordvpn.com", + "hostname": "nl-se11.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "213.232.87.146" + "213.232.87.174" ] }, { @@ -59276,17 +59276,6 @@ "213.232.87.142" ] }, - { - "vpn": "openvpn", - "region": "Netherlands", - "number": 12, - "hostname": "nl-uk12.nordvpn.com", - "tcp": true, - "udp": true, - "ips": [ - "213.232.87.49" - ] - }, { "vpn": "openvpn", "region": "Netherlands", @@ -59301,12 +59290,12 @@ { "vpn": "openvpn", "region": "Netherlands", - "number": 13, - "hostname": "nl-uk13.nordvpn.com", + "number": 12, + "hostname": "nl-uk12.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "213.232.87.50" + "213.232.87.49" ] }, { @@ -59320,6 +59309,17 @@ "213.232.87.145" ] }, + { + "vpn": "openvpn", + "region": "Netherlands", + "number": 13, + "hostname": "nl-uk13.nordvpn.com", + "tcp": true, + "udp": true, + "ips": [ + "213.232.87.50" + ] + }, { "vpn": "openvpn", "region": "Netherlands", @@ -65601,17 +65601,6 @@ "86.106.103.27" ] }, - { - "vpn": "openvpn", - "region": "Sweden", - "number": 9, - "hostname": "se-nl9.nordvpn.com", - "tcp": true, - "udp": true, - "ips": [ - "86.106.103.123" - ] - }, { "vpn": "openvpn", "region": "Sweden", @@ -65626,12 +65615,12 @@ { "vpn": "openvpn", "region": "Sweden", - "number": 10, - "hostname": "se-nl10.nordvpn.com", + "number": 9, + "hostname": "se-nl9.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "91.132.138.75" + "86.106.103.123" ] }, { @@ -65645,6 +65634,17 @@ "91.132.138.76" ] }, + { + "vpn": "openvpn", + "region": "Sweden", + "number": 10, + "hostname": "se-nl10.nordvpn.com", + "tcp": true, + "udp": true, + "ips": [ + "91.132.138.75" + ] + }, { "vpn": "openvpn", "region": "Sweden", @@ -66899,17 +66899,6 @@ "37.120.137.172" ] }, - { - "vpn": "openvpn", - "region": "Switzerland", - "number": 8, - "hostname": "ch-se8.nordvpn.com", - "tcp": true, - "udp": true, - "ips": [ - "217.138.203.252" - ] - }, { "vpn": "openvpn", "region": "Switzerland", @@ -66924,12 +66913,12 @@ { "vpn": "openvpn", "region": "Switzerland", - "number": 10, - "hostname": "ch-se10.nordvpn.com", + "number": 8, + "hostname": "ch-se8.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "91.132.136.219" + "217.138.203.252" ] }, { @@ -66943,6 +66932,17 @@ "91.132.136.220" ] }, + { + "vpn": "openvpn", + "region": "Switzerland", + "number": 10, + "hostname": "ch-se10.nordvpn.com", + "tcp": true, + "udp": true, + "ips": [ + "91.132.136.219" + ] + }, { "vpn": "openvpn", "region": "Switzerland", @@ -69840,22 +69840,22 @@ "vpn": "openvpn", "region": "United Kingdom", "number": 10, - "hostname": "uk-nl10.nordvpn.com", + "hostname": "uk-fr10.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "109.70.150.97" + "89.35.30.163" ] }, { "vpn": "openvpn", "region": "United Kingdom", "number": 10, - "hostname": "uk-fr10.nordvpn.com", + "hostname": "uk-nl10.nordvpn.com", "tcp": true, "udp": true, "ips": [ - "89.35.30.163" + "109.70.150.97" ] }, { @@ -117735,6 +117735,87 @@ "version": 4, "timestamp": 1654479618, "servers": [ + { + "vpn": "openvpn", + "country": "Albania", + "region": "Europe", + "city": "Tirana", + "hostname": "al-tia.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Albania", + "ips": [ + "31.171.153.101", + "31.171.153.133", + "31.171.154.221", + "31.171.155.53", + "31.171.155.83", + "31.171.155.85" + ] + }, + { + "vpn": "openvpn", + "country": "Algeria", + "region": "Middle East and Africa", + "city": "Algiers", + "hostname": "dz-alg.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.144.3", + "62.197.144.5", + "62.197.144.8", + "62.197.144.10" + ] + }, + { + "vpn": "openvpn", + "country": "Andorra", + "region": "Europe", + "city": "Andorra la Vella", + "hostname": "ad-leu.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.152.3", + "62.197.152.5", + "62.197.152.8", + "62.197.152.10" + ] + }, + { + "vpn": "openvpn", + "country": "Argentina", + "region": "The Americas", + "city": "Buenos Aires", + "hostname": "ar-bua.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Argentina Buenos Aires", + "ips": [ + "91.206.168.21", + "91.206.168.24", + "91.206.168.31", + "91.206.168.41", + "91.206.168.50", + "91.206.168.62" + ] + }, + { + "vpn": "openvpn", + "country": "Armenia", + "region": "Europe", + "city": "Yerevan", + "hostname": "am-evn.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "92.62.120.3", + "92.62.120.5", + "92.62.120.8", + "92.62.120.10" + ] + }, { "vpn": "openvpn", "country": "Australia", @@ -117832,745 +117913,14 @@ }, { "vpn": "openvpn", - "country": "Azerbaijan", - "region": "Asia Pacific", - "city": "Baku", - "hostname": "az-bak.prod.surfshark.com", + "country": "Australia US", + "region": "The Americas", + "hostname": "au-us.prod.surfshark.com", "tcp": true, "udp": true, - "retroloc": "Azerbaijan", + "retroloc": "Australia US", "ips": [ - "62.212.239.19", - "85.132.101.155", - "94.20.154.51", - "94.20.154.53" - ] - }, - { - "vpn": "openvpn", - "country": "Bhutan", - "region": "Asia Pacific", - "city": "Thimphu", - "hostname": "bt-pbh.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.157.3", - "62.197.157.5" - ] - }, - { - "vpn": "openvpn", - "country": "Brunei", - "region": "Asia Pacific", - "city": "Begawan", - "hostname": "bn-bwn.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.158.3", - "62.197.158.5" - ] - }, - { - "vpn": "openvpn", - "country": "Combodia", - "region": "Asia Pacific", - "city": "Phnom Penh", - "hostname": "kh-pnh.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.146.3", - "62.197.146.5" - ] - }, - { - "vpn": "openvpn", - "country": "Hong Kong", - "region": "Asia Pacific", - "city": "Hong Kong", - "hostname": "hk-hkg.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Hong Kong", - "ips": [ - "84.17.37.160", - "84.17.57.73", - "138.199.62.12", - "138.199.62.24", - "156.146.45.98", - "156.146.45.103", - "156.146.45.105", - "156.146.45.195", - "212.102.42.89", - "212.102.42.206" - ] - }, - { - "vpn": "openvpn", - "country": "India", - "region": "Asia Pacific", - "city": "Chennai", - "hostname": "in-chn.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "India Chennai", - "ips": [ - "103.94.27.99", - "103.108.117.116" - ] - }, - { - "vpn": "openvpn", - "country": "India", - "region": "Asia Pacific", - "city": "Indore", - "hostname": "in-idr.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "India Indore", - "ips": [ - "103.39.132.187", - "103.39.132.189", - "103.39.134.59", - "103.39.134.61", - "103.73.189.59", - "103.73.189.61", - "103.76.248.211", - "103.76.248.213", - "137.59.53.211", - "137.59.53.213" - ] - }, - { - "vpn": "openvpn", - "country": "India", - "region": "Asia Pacific", - "city": "Mumbai", - "hostname": "in-mum.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "India Mumbai", - "ips": [ - "129.227.219.12", - "129.227.219.22", - "129.227.219.24" - ] - }, - { - "vpn": "openvpn", - "country": "Indonesia", - "region": "Asia Pacific", - "city": "Jakarta", - "hostname": "id-jak.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Indonesia", - "ips": [ - "103.120.66.216", - "103.120.66.219", - "103.120.66.229", - "103.120.66.231", - "103.120.66.233", - "103.148.242.175" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st004.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Japan Tokyo st004", - "ips": [ - "217.138.212.19" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st007.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Japan Tokyo st007", - "ips": [ - "82.102.28.125" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st014.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.187" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st015.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.22.153" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st016.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.177" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st017.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.179" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st018.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.182" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st019.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.184" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st020.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.167" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st021.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.169" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st022.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.162" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st023.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "37.19.205.164" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st024.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "89.187.161.2" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok-st025.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "89.187.161.4" - ] - }, - { - "vpn": "openvpn", - "country": "Japan", - "region": "Asia Pacific", - "city": "Tokyo", - "hostname": "jp-tok.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Japan Tokyo", - "ips": [ - "37.19.205.172", - "84.17.34.46", - "138.199.22.139", - "138.199.22.141", - "138.199.22.148", - "138.199.39.78" - ] - }, - { - "vpn": "openvpn", - "country": "Kazakhstan", - "region": "Asia Pacific", - "city": "Oral", - "hostname": "kz-ura.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Kazakhstan", - "ips": [ - "5.189.202.16", - "5.189.202.126", - "5.189.202.128", - "5.189.202.144", - "5.189.202.151", - "5.189.202.153" - ] - }, - { - "vpn": "openvpn", - "country": "Laos", - "region": "Asia Pacific", - "city": "Vientiane", - "hostname": "la-vte.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "194.169.168.3" - ] - }, - { - "vpn": "openvpn", - "country": "Macau", - "region": "Asia Pacific", - "city": "Macao", - "hostname": "mo-mfm.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.154.5", - "62.197.154.8" - ] - }, - { - "vpn": "openvpn", - "country": "Malaysia", - "region": "Asia Pacific", - "city": "Kuala Lumpur", - "hostname": "my-kul.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Malaysia", - "ips": [ - "42.0.30.156", - "42.0.30.177", - "111.90.140.143", - "111.90.145.109", - "111.90.145.116", - "111.90.158.137" - ] - }, - { - "vpn": "openvpn", - "country": "Mongolia", - "region": "Asia Pacific", - "city": "Ulaanbaatar", - "hostname": "mn-uln.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.155.3", - "62.197.155.5" - ] - }, - { - "vpn": "openvpn", - "country": "Myanmar", - "region": "Asia Pacific", - "city": "Naypyidaw", - "hostname": "mm-nyt.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "45.95.242.3", - "45.95.242.5" - ] - }, - { - "vpn": "openvpn", - "country": "Nepal", - "region": "Asia Pacific", - "city": "Kathmandu", - "hostname": "np-ktm.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "194.169.170.3", - "194.169.170.5" - ] - }, - { - "vpn": "openvpn", - "country": "New Zealand", - "region": "Asia Pacific", - "city": "Auckland", - "hostname": "nz-akl.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "New Zealand", - "ips": [ - "180.149.231.3", - "180.149.231.5", - "180.149.231.11", - "180.149.231.13", - "180.149.231.45", - "180.149.231.67", - "180.149.231.117", - "180.149.231.165" - ] - }, - { - "vpn": "openvpn", - "country": "Philippines", - "region": "Asia Pacific", - "city": "Manila", - "hostname": "ph-mnl.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Philippines", - "ips": [ - "45.134.224.3", - "45.134.224.13", - "45.134.224.18", - "45.134.224.20", - "45.134.224.26", - "45.134.224.31" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-mp001.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Singapore mp001", - "ips": [ - "206.189.94.229" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-st005.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.60.175" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-st006.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.60.177" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-st007.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.60.170" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-st008.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.60.172" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-st009.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.60.180" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng-st010.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "138.199.60.182" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore", - "region": "Asia Pacific", - "city": "Singapore", - "hostname": "sg-sng.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Singapore", - "ips": [ - "89.187.163.130", - "89.187.163.134", - "89.187.163.136", - "89.187.163.202", - "89.187.163.207", - "156.146.56.130", - "156.146.56.132", - "156.146.56.135" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore Hong Kong", - "region": "Asia Pacific", - "city": "Hong Kong", - "hostname": "sg-hk.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Singapore Hong Kong", - "ips": [ - "206.189.83.129" - ] - }, - { - "vpn": "openvpn", - "country": "Singapore in", - "region": "Asia Pacific", - "hostname": "sg-in.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Singapore in", - "ips": [ - "128.199.193.35" - ] - }, - { - "vpn": "openvpn", - "country": "South Korea", - "region": "Asia Pacific", - "city": "Seoul", - "hostname": "kr-seo.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Korea", - "ips": [ - "61.14.210.234", - "61.97.244.36", - "103.249.31.24", - "103.249.31.26", - "103.249.31.28" - ] - }, - { - "vpn": "openvpn", - "country": "Sri Lanka", - "region": "Asia Pacific", - "city": "Colombo", - "hostname": "lk-cmb.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.156.3" - ] - }, - { - "vpn": "openvpn", - "country": "Taiwan", - "region": "Asia Pacific", - "city": "Taichung City", - "hostname": "tw-tai.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Taiwan", - "ips": [ - "2.58.241.149", - "2.58.242.45", - "2.58.242.173", - "103.152.151.19" - ] - }, - { - "vpn": "openvpn", - "country": "Thailand", - "region": "Asia Pacific", - "city": "Bangkok", - "hostname": "th-bkk.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Thailand", - "ips": [ - "45.40.54.9", - "45.40.54.14", - "45.40.54.17", - "45.40.54.19", - "45.40.54.22", - "45.40.54.29", - "45.40.54.32", - "45.40.54.34", - "45.40.54.37", - "45.40.54.49" - ] - }, - { - "vpn": "openvpn", - "country": "Uzbekistan", - "region": "Asia Pacific", - "city": "Tashkent", - "hostname": "uz-tas.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "94.154.124.5", - "94.154.124.8" - ] - }, - { - "vpn": "openvpn", - "country": "Vietnam", - "region": "Asia Pacific", - "city": "Ho Chi Minh City", - "hostname": "vn-hcm.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Vietnam", - "ips": [ - "212.119.34.5" - ] - }, - { - "vpn": "openvpn", - "country": "Albania", - "region": "Europe", - "city": "Tirana", - "hostname": "al-tia.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Albania", - "ips": [ - "31.171.153.101", - "31.171.153.133", - "31.171.154.221", - "31.171.155.53", - "31.171.155.83", - "31.171.155.85" - ] - }, - { - "vpn": "openvpn", - "country": "Andorra", - "region": "Europe", - "city": "Andorra la Vella", - "hostname": "ad-leu.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.152.3", - "62.197.152.5", - "62.197.152.8", - "62.197.152.10" - ] - }, - { - "vpn": "openvpn", - "country": "Armenia", - "region": "Europe", - "city": "Yerevan", - "hostname": "am-evn.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "92.62.120.3", - "92.62.120.5", - "92.62.120.8", - "92.62.120.10" + "143.244.62.65" ] }, { @@ -118593,6 +117943,35 @@ "89.187.168.44" ] }, + { + "vpn": "openvpn", + "country": "Azerbaijan", + "region": "Asia Pacific", + "city": "Baku", + "hostname": "az-bak.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Azerbaijan", + "ips": [ + "62.212.239.19", + "85.132.101.155", + "94.20.154.51", + "94.20.154.53" + ] + }, + { + "vpn": "openvpn", + "country": "Bahamas", + "region": "The Americas", + "city": "Bahamas", + "hostname": "bs-nas.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.145.8", + "62.197.145.10" + ] + }, { "vpn": "openvpn", "country": "Belgium", @@ -118632,6 +118011,47 @@ "185.104.186.173" ] }, + { + "vpn": "openvpn", + "country": "Belize", + "region": "The Americas", + "city": "Belmopan", + "hostname": "bz-blp.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "212.119.33.3", + "212.119.33.5" + ] + }, + { + "vpn": "openvpn", + "country": "Bhutan", + "region": "Asia Pacific", + "city": "Thimphu", + "hostname": "bt-pbh.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.157.3", + "62.197.157.5" + ] + }, + { + "vpn": "openvpn", + "country": "Bolivia", + "region": "The Americas", + "city": "Sucre", + "hostname": "bo-sre.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "194.169.171.3", + "194.169.171.5", + "194.169.171.8", + "194.169.171.10" + ] + }, { "vpn": "openvpn", "country": "Bosnia and Herzegovina", @@ -118650,6 +118070,38 @@ "185.212.111.59" ] }, + { + "vpn": "openvpn", + "country": "Brazil", + "region": "The Americas", + "city": "Sao Paulo", + "hostname": "br-sao.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Brazil", + "ips": [ + "138.199.4.91", + "138.199.4.93", + "138.199.58.37", + "138.199.58.55", + "138.199.58.65", + "138.199.58.75", + "193.19.205.119" + ] + }, + { + "vpn": "openvpn", + "country": "Brunei", + "region": "Asia Pacific", + "city": "Begawan", + "hostname": "bn-bwn.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.158.3", + "62.197.158.5" + ] + }, { "vpn": "openvpn", "country": "Bulgaria", @@ -118668,6 +118120,148 @@ "217.138.221.205" ] }, + { + "vpn": "openvpn", + "country": "Canada", + "region": "The Americas", + "city": "Montreal", + "hostname": "ca-mon.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Canada Montreal", + "ips": [ + "91.245.254.51", + "91.245.254.77", + "91.245.254.93", + "91.245.254.125", + "91.245.254.133", + "146.70.27.13" + ] + }, + { + "vpn": "openvpn", + "country": "Canada", + "region": "The Americas", + "city": "Toronto", + "hostname": "ca-tor-mp001.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Canada Toronto mp001", + "ips": [ + "138.197.151.26" + ] + }, + { + "vpn": "openvpn", + "country": "Canada", + "region": "The Americas", + "city": "Toronto", + "hostname": "ca-tor.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Canada Toronto", + "ips": [ + "37.19.211.17", + "37.19.211.19", + "37.19.211.24", + "37.19.211.62", + "37.19.211.74", + "37.19.211.104", + "37.19.211.117", + "37.19.211.119" + ] + }, + { + "vpn": "openvpn", + "country": "Canada", + "region": "The Americas", + "city": "Vancouver", + "hostname": "ca-van.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Canada Vancouver", + "ips": [ + "66.115.147.67", + "66.115.147.79", + "198.8.92.69", + "198.8.92.79", + "208.78.41.197", + "208.78.41.200" + ] + }, + { + "vpn": "openvpn", + "country": "Canada US", + "region": "The Americas", + "hostname": "ca-us.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Canada US", + "ips": [ + "159.203.57.80" + ] + }, + { + "vpn": "openvpn", + "country": "Chile", + "region": "The Americas", + "city": "Santiago", + "hostname": "cl-san.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Chile", + "ips": [ + "31.169.121.5", + "31.169.121.19", + "31.169.121.21", + "31.169.121.24" + ] + }, + { + "vpn": "openvpn", + "country": "Colombia", + "region": "The Americas", + "city": "Bogota", + "hostname": "co-bog.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Colombia", + "ips": [ + "45.129.32.5", + "45.129.32.29" + ] + }, + { + "vpn": "openvpn", + "country": "Combodia", + "region": "Asia Pacific", + "city": "Phnom Penh", + "hostname": "kh-pnh.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.146.3", + "62.197.146.5" + ] + }, + { + "vpn": "openvpn", + "country": "Costa Rica", + "region": "The Americas", + "city": "San Jose", + "hostname": "cr-sjn.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Costa Rica", + "ips": [ + "176.227.241.21", + "176.227.241.24", + "176.227.241.29", + "176.227.241.31", + "176.227.241.33", + "176.227.241.35" + ] + }, { "vpn": "openvpn", "country": "Croatia", @@ -118742,6 +118336,36 @@ "146.70.92.53" ] }, + { + "vpn": "openvpn", + "country": "Ecuador", + "region": "The Americas", + "city": "Quito", + "hostname": "ec-uio.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "92.62.122.3", + "92.62.122.5", + "92.62.122.8", + "92.62.122.10" + ] + }, + { + "vpn": "openvpn", + "country": "Egypt", + "region": "Middle East and Africa", + "city": "Cairo", + "hostname": "eg-cai.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.147.3", + "62.197.147.5", + "62.197.147.8", + "62.197.147.10" + ] + }, { "vpn": "openvpn", "country": "Estonia", @@ -119025,6 +118649,28 @@ "194.150.167.54" ] }, + { + "vpn": "openvpn", + "country": "Hong Kong", + "region": "Asia Pacific", + "city": "Hong Kong", + "hostname": "hk-hkg.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Hong Kong", + "ips": [ + "84.17.37.160", + "84.17.57.73", + "138.199.62.12", + "138.199.62.24", + "156.146.45.98", + "156.146.45.103", + "156.146.45.105", + "156.146.45.195", + "212.102.42.89", + "212.102.42.206" + ] + }, { "vpn": "openvpn", "country": "Hungary", @@ -119060,6 +118706,57 @@ "45.133.193.219" ] }, + { + "vpn": "openvpn", + "country": "India", + "region": "Asia Pacific", + "city": "Chennai", + "hostname": "in-chn.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "India Chennai", + "ips": [ + "103.94.27.99", + "103.108.117.116" + ] + }, + { + "vpn": "openvpn", + "country": "India", + "region": "Asia Pacific", + "city": "Indore", + "hostname": "in-idr.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "India Indore", + "ips": [ + "103.39.132.187", + "103.39.132.189", + "103.39.134.59", + "103.39.134.61", + "103.73.189.59", + "103.73.189.61", + "103.76.248.211", + "103.76.248.213", + "137.59.53.211", + "137.59.53.213" + ] + }, + { + "vpn": "openvpn", + "country": "India", + "region": "Asia Pacific", + "city": "Mumbai", + "hostname": "in-mum.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "India Mumbai", + "ips": [ + "129.227.219.12", + "129.227.219.22", + "129.227.219.24" + ] + }, { "vpn": "openvpn", "country": "India UK", @@ -119072,6 +118769,24 @@ "134.209.148.122" ] }, + { + "vpn": "openvpn", + "country": "Indonesia", + "region": "Asia Pacific", + "city": "Jakarta", + "hostname": "id-jak.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Indonesia", + "ips": [ + "103.120.66.216", + "103.120.66.219", + "103.120.66.229", + "103.120.66.231", + "103.120.66.233", + "103.148.242.175" + ] + }, { "vpn": "openvpn", "country": "Ireland", @@ -119090,6 +118805,23 @@ "185.252.222.115" ] }, + { + "vpn": "openvpn", + "country": "Israel", + "region": "Middle East and Africa", + "city": "Tel Aviv", + "hostname": "il-tlv.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Israel", + "ips": [ + "84.110.41.85", + "87.239.255.107", + "87.239.255.114", + "87.239.255.119", + "87.239.255.121" + ] + }, { "vpn": "openvpn", "country": "Italy", @@ -119126,6 +118858,224 @@ "217.138.219.251" ] }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st004.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Japan Tokyo st004", + "ips": [ + "217.138.212.19" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st007.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Japan Tokyo st007", + "ips": [ + "82.102.28.125" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st014.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.187" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st015.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.22.153" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st016.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.177" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st017.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.179" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st018.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.182" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st019.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.184" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st020.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.167" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st021.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.169" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st022.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.162" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st023.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "37.19.205.164" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st024.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "89.187.161.2" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok-st025.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "89.187.161.4" + ] + }, + { + "vpn": "openvpn", + "country": "Japan", + "region": "Asia Pacific", + "city": "Tokyo", + "hostname": "jp-tok.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Japan Tokyo", + "ips": [ + "37.19.205.172", + "84.17.34.46", + "138.199.22.139", + "138.199.22.141", + "138.199.22.148", + "138.199.39.78" + ] + }, + { + "vpn": "openvpn", + "country": "Kazakhstan", + "region": "Asia Pacific", + "city": "Oral", + "hostname": "kz-ura.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Kazakhstan", + "ips": [ + "5.189.202.16", + "5.189.202.126", + "5.189.202.128", + "5.189.202.144", + "5.189.202.151", + "5.189.202.153" + ] + }, + { + "vpn": "openvpn", + "country": "Laos", + "region": "Asia Pacific", + "city": "Vientiane", + "hostname": "la-vte.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "194.169.168.3" + ] + }, { "vpn": "openvpn", "country": "Latvia", @@ -119186,6 +119136,37 @@ "185.153.151.41" ] }, + { + "vpn": "openvpn", + "country": "Macau", + "region": "Asia Pacific", + "city": "Macao", + "hostname": "mo-mfm.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.154.5", + "62.197.154.8" + ] + }, + { + "vpn": "openvpn", + "country": "Malaysia", + "region": "Asia Pacific", + "city": "Kuala Lumpur", + "hostname": "my-kul.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Malaysia", + "ips": [ + "42.0.30.156", + "42.0.30.177", + "111.90.140.143", + "111.90.145.109", + "111.90.145.116", + "111.90.158.137" + ] + }, { "vpn": "openvpn", "country": "Malta", @@ -119199,6 +119180,39 @@ "212.119.35.5" ] }, + { + "vpn": "openvpn", + "country": "Marocco", + "region": "Middle East and Africa", + "city": "Rabat", + "hostname": "ma-rab.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "194.169.169.3", + "194.169.169.5", + "194.169.169.8", + "194.169.169.10" + ] + }, + { + "vpn": "openvpn", + "country": "Mexico", + "region": "The Americas", + "city": "Mexico City", + "hostname": "mx-mex.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Mexico City Mexico", + "ips": [ + "194.41.112.3", + "194.41.112.5", + "194.41.112.14", + "194.41.112.24", + "194.41.112.26", + "194.41.112.35" + ] + }, { "vpn": "openvpn", "country": "Moldova", @@ -119228,6 +119242,19 @@ "62.197.151.10" ] }, + { + "vpn": "openvpn", + "country": "Mongolia", + "region": "Asia Pacific", + "city": "Ulaanbaatar", + "hostname": "mn-uln.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.155.3", + "62.197.155.5" + ] + }, { "vpn": "openvpn", "country": "Montenegro", @@ -119243,6 +119270,32 @@ "62.197.159.10" ] }, + { + "vpn": "openvpn", + "country": "Myanmar", + "region": "Asia Pacific", + "city": "Naypyidaw", + "hostname": "mm-nyt.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "45.95.242.3", + "45.95.242.5" + ] + }, + { + "vpn": "openvpn", + "country": "Nepal", + "region": "Asia Pacific", + "city": "Kathmandu", + "hostname": "np-ktm.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "194.169.170.3", + "194.169.170.5" + ] + }, { "vpn": "openvpn", "country": "Netherlands", @@ -119285,6 +119338,54 @@ "178.239.173.43" ] }, + { + "vpn": "openvpn", + "country": "Netherlands US", + "region": "The Americas", + "hostname": "nl-us.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Netherlands US", + "ips": [ + "188.166.98.91" + ] + }, + { + "vpn": "openvpn", + "country": "New Zealand", + "region": "Asia Pacific", + "city": "Auckland", + "hostname": "nz-akl.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "New Zealand", + "ips": [ + "180.149.231.3", + "180.149.231.5", + "180.149.231.11", + "180.149.231.13", + "180.149.231.45", + "180.149.231.67", + "180.149.231.117", + "180.149.231.165" + ] + }, + { + "vpn": "openvpn", + "country": "Nigeria", + "region": "Middle East and Africa", + "city": "Lagos", + "hostname": "ng-lag.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Nigeria", + "ips": [ + "213.109.151.3", + "213.109.151.5", + "213.109.151.8", + "213.109.151.10" + ] + }, { "vpn": "openvpn", "country": "North Macedonia", @@ -119317,6 +119418,70 @@ "91.219.215.83" ] }, + { + "vpn": "openvpn", + "country": "Panama", + "region": "The Americas", + "city": "Panama", + "hostname": "pa-pac.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "185.244.139.3", + "185.244.139.5", + "185.244.139.7", + "185.244.139.9", + "185.244.139.12" + ] + }, + { + "vpn": "openvpn", + "country": "Paraguay", + "region": "The Americas", + "city": "Asunción", + "hostname": "py-asu.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "194.26.131.3", + "194.26.131.5", + "194.26.131.8", + "194.26.131.10" + ] + }, + { + "vpn": "openvpn", + "country": "Peru", + "region": "The Americas", + "city": "Lima", + "hostname": "pe-lim.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "193.218.35.3", + "193.218.35.5", + "193.218.35.7", + "193.218.35.12" + ] + }, + { + "vpn": "openvpn", + "country": "Philippines", + "region": "Asia Pacific", + "city": "Manila", + "hostname": "ph-mnl.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Philippines", + "ips": [ + "45.134.224.3", + "45.134.224.13", + "45.134.224.18", + "45.134.224.20", + "45.134.224.26", + "45.134.224.31" + ] + }, { "vpn": "openvpn", "country": "Poland", @@ -119424,6 +119589,124 @@ "152.89.160.211" ] }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-mp001.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Singapore mp001", + "ips": [ + "206.189.94.229" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-st005.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.60.175" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-st006.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.60.177" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-st007.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.60.170" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-st008.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.60.172" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-st009.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.60.180" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng-st010.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "138.199.60.182" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore", + "region": "Asia Pacific", + "city": "Singapore", + "hostname": "sg-sng.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Singapore", + "ips": [ + "89.187.163.130", + "89.187.163.134", + "89.187.163.136", + "89.187.163.202", + "89.187.163.207", + "156.146.56.130", + "156.146.56.132", + "156.146.56.135" + ] + }, + { + "vpn": "openvpn", + "country": "Singapore Hong Kong", + "region": "Asia Pacific", + "city": "Hong Kong", + "hostname": "sg-hk.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Singapore Hong Kong", + "ips": [ + "206.189.83.129" + ] + }, { "vpn": "openvpn", "country": "Singapore Netherlands", @@ -119436,6 +119719,18 @@ "104.248.148.18" ] }, + { + "vpn": "openvpn", + "country": "Singapore in", + "region": "Asia Pacific", + "hostname": "sg-in.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Singapore in", + "ips": [ + "128.199.193.35" + ] + }, { "vpn": "openvpn", "country": "Slovakia", @@ -119470,6 +119765,41 @@ "195.158.249.59" ] }, + { + "vpn": "openvpn", + "country": "South Africa", + "region": "Middle East and Africa", + "city": "Johannesburg", + "hostname": "za-jnb.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "South Africa", + "ips": [ + "102.165.47.130", + "102.165.47.138", + "154.16.93.51", + "154.16.93.53", + "154.127.50.136", + "154.127.50.140" + ] + }, + { + "vpn": "openvpn", + "country": "South Korea", + "region": "Asia Pacific", + "city": "Seoul", + "hostname": "kr-seo.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Korea", + "ips": [ + "61.14.210.234", + "61.97.244.36", + "103.249.31.24", + "103.249.31.26", + "103.249.31.28" + ] + }, { "vpn": "openvpn", "country": "Spain", @@ -119525,6 +119855,18 @@ "185.153.150.84" ] }, + { + "vpn": "openvpn", + "country": "Sri Lanka", + "region": "Asia Pacific", + "city": "Colombo", + "hostname": "lk-cmb.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "62.197.156.3" + ] + }, { "vpn": "openvpn", "country": "Sweden", @@ -119559,6 +119901,44 @@ "169.150.197.7" ] }, + { + "vpn": "openvpn", + "country": "Taiwan", + "region": "Asia Pacific", + "city": "Taichung City", + "hostname": "tw-tai.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Taiwan", + "ips": [ + "2.58.241.149", + "2.58.242.45", + "2.58.242.173", + "103.152.151.19" + ] + }, + { + "vpn": "openvpn", + "country": "Thailand", + "region": "Asia Pacific", + "city": "Bangkok", + "hostname": "th-bkk.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Thailand", + "ips": [ + "45.40.54.9", + "45.40.54.14", + "45.40.54.17", + "45.40.54.19", + "45.40.54.22", + "45.40.54.29", + "45.40.54.32", + "45.40.54.34", + "45.40.54.37", + "45.40.54.49" + ] + }, { "vpn": "openvpn", "country": "Turkey", @@ -119643,6 +120023,22 @@ "156.146.50.109" ] }, + { + "vpn": "openvpn", + "country": "United Arab Emirates", + "region": "Middle East and Africa", + "city": "Dubai", + "hostname": "ae-dub.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "United Arab Emirates", + "ips": [ + "146.70.102.181", + "176.125.231.3", + "176.125.231.21", + "176.125.231.27" + ] + }, { "vpn": "openvpn", "country": "United Kingdom", @@ -119794,428 +120190,6 @@ "139.28.176.53" ] }, - { - "vpn": "openvpn", - "country": "Algeria", - "region": "Middle East and Africa", - "city": "Algiers", - "hostname": "dz-alg.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.144.3", - "62.197.144.5", - "62.197.144.8", - "62.197.144.10" - ] - }, - { - "vpn": "openvpn", - "country": "Egypt", - "region": "Middle East and Africa", - "city": "Cairo", - "hostname": "eg-cai.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.147.3", - "62.197.147.5", - "62.197.147.8", - "62.197.147.10" - ] - }, - { - "vpn": "openvpn", - "country": "Israel", - "region": "Middle East and Africa", - "city": "Tel Aviv", - "hostname": "il-tlv.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Israel", - "ips": [ - "84.110.41.85", - "87.239.255.107", - "87.239.255.114", - "87.239.255.119", - "87.239.255.121" - ] - }, - { - "vpn": "openvpn", - "country": "Marocco", - "region": "Middle East and Africa", - "city": "Rabat", - "hostname": "ma-rab.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "194.169.169.3", - "194.169.169.5", - "194.169.169.8", - "194.169.169.10" - ] - }, - { - "vpn": "openvpn", - "country": "Nigeria", - "region": "Middle East and Africa", - "city": "Lagos", - "hostname": "ng-lag.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Nigeria", - "ips": [ - "213.109.151.3", - "213.109.151.5", - "213.109.151.8", - "213.109.151.10" - ] - }, - { - "vpn": "openvpn", - "country": "South Africa", - "region": "Middle East and Africa", - "city": "Johannesburg", - "hostname": "za-jnb.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "South Africa", - "ips": [ - "102.165.47.130", - "102.165.47.138", - "154.16.93.51", - "154.16.93.53", - "154.127.50.136", - "154.127.50.140" - ] - }, - { - "vpn": "openvpn", - "country": "United Arab Emirates", - "region": "Middle East and Africa", - "city": "Dubai", - "hostname": "ae-dub.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "United Arab Emirates", - "ips": [ - "146.70.102.181", - "176.125.231.3", - "176.125.231.21", - "176.125.231.27" - ] - }, - { - "vpn": "openvpn", - "country": "Argentina", - "region": "The Americas", - "city": "Buenos Aires", - "hostname": "ar-bua.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Argentina Buenos Aires", - "ips": [ - "91.206.168.21", - "91.206.168.24", - "91.206.168.31", - "91.206.168.41", - "91.206.168.50", - "91.206.168.62" - ] - }, - { - "vpn": "openvpn", - "country": "Australia US", - "region": "The Americas", - "hostname": "au-us.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Australia US", - "ips": [ - "143.244.62.65" - ] - }, - { - "vpn": "openvpn", - "country": "Bahamas", - "region": "The Americas", - "city": "Bahamas", - "hostname": "bs-nas.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "62.197.145.8", - "62.197.145.10" - ] - }, - { - "vpn": "openvpn", - "country": "Belize", - "region": "The Americas", - "city": "Belmopan", - "hostname": "bz-blp.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "212.119.33.3", - "212.119.33.5" - ] - }, - { - "vpn": "openvpn", - "country": "Bolivia", - "region": "The Americas", - "city": "Sucre", - "hostname": "bo-sre.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "194.169.171.3", - "194.169.171.5", - "194.169.171.8", - "194.169.171.10" - ] - }, - { - "vpn": "openvpn", - "country": "Brazil", - "region": "The Americas", - "city": "Sao Paulo", - "hostname": "br-sao.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Brazil", - "ips": [ - "138.199.4.91", - "138.199.4.93", - "138.199.58.37", - "138.199.58.55", - "138.199.58.65", - "138.199.58.75", - "193.19.205.119" - ] - }, - { - "vpn": "openvpn", - "country": "Canada", - "region": "The Americas", - "city": "Montreal", - "hostname": "ca-mon.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Canada Montreal", - "ips": [ - "91.245.254.51", - "91.245.254.77", - "91.245.254.93", - "91.245.254.125", - "91.245.254.133", - "146.70.27.13" - ] - }, - { - "vpn": "openvpn", - "country": "Canada", - "region": "The Americas", - "city": "Toronto", - "hostname": "ca-tor-mp001.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Canada Toronto mp001", - "ips": [ - "138.197.151.26" - ] - }, - { - "vpn": "openvpn", - "country": "Canada", - "region": "The Americas", - "city": "Toronto", - "hostname": "ca-tor.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Canada Toronto", - "ips": [ - "37.19.211.17", - "37.19.211.19", - "37.19.211.24", - "37.19.211.62", - "37.19.211.74", - "37.19.211.104", - "37.19.211.117", - "37.19.211.119" - ] - }, - { - "vpn": "openvpn", - "country": "Canada", - "region": "The Americas", - "city": "Vancouver", - "hostname": "ca-van.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Canada Vancouver", - "ips": [ - "66.115.147.67", - "66.115.147.79", - "198.8.92.69", - "198.8.92.79", - "208.78.41.197", - "208.78.41.200" - ] - }, - { - "vpn": "openvpn", - "country": "Canada US", - "region": "The Americas", - "hostname": "ca-us.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Canada US", - "ips": [ - "159.203.57.80" - ] - }, - { - "vpn": "openvpn", - "country": "Chile", - "region": "The Americas", - "city": "Santiago", - "hostname": "cl-san.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Chile", - "ips": [ - "31.169.121.5", - "31.169.121.19", - "31.169.121.21", - "31.169.121.24" - ] - }, - { - "vpn": "openvpn", - "country": "Colombia", - "region": "The Americas", - "city": "Bogota", - "hostname": "co-bog.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Colombia", - "ips": [ - "45.129.32.5", - "45.129.32.29" - ] - }, - { - "vpn": "openvpn", - "country": "Costa Rica", - "region": "The Americas", - "city": "San Jose", - "hostname": "cr-sjn.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Costa Rica", - "ips": [ - "176.227.241.21", - "176.227.241.24", - "176.227.241.29", - "176.227.241.31", - "176.227.241.33", - "176.227.241.35" - ] - }, - { - "vpn": "openvpn", - "country": "Ecuador", - "region": "The Americas", - "city": "Quito", - "hostname": "ec-uio.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "92.62.122.3", - "92.62.122.5", - "92.62.122.8", - "92.62.122.10" - ] - }, - { - "vpn": "openvpn", - "country": "Mexico", - "region": "The Americas", - "city": "Mexico City", - "hostname": "mx-mex.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Mexico City Mexico", - "ips": [ - "194.41.112.3", - "194.41.112.5", - "194.41.112.14", - "194.41.112.24", - "194.41.112.26", - "194.41.112.35" - ] - }, - { - "vpn": "openvpn", - "country": "Netherlands US", - "region": "The Americas", - "hostname": "nl-us.prod.surfshark.com", - "tcp": true, - "udp": true, - "retroloc": "Netherlands US", - "ips": [ - "188.166.98.91" - ] - }, - { - "vpn": "openvpn", - "country": "Panama", - "region": "The Americas", - "city": "Panama", - "hostname": "pa-pac.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "185.244.139.3", - "185.244.139.5", - "185.244.139.7", - "185.244.139.9", - "185.244.139.12" - ] - }, - { - "vpn": "openvpn", - "country": "Paraguay", - "region": "The Americas", - "city": "Asunción", - "hostname": "py-asu.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "194.26.131.3", - "194.26.131.5", - "194.26.131.8", - "194.26.131.10" - ] - }, - { - "vpn": "openvpn", - "country": "Peru", - "region": "The Americas", - "city": "Lima", - "hostname": "pe-lim.prod.surfshark.com", - "tcp": true, - "udp": true, - "ips": [ - "193.218.35.3", - "193.218.35.5", - "193.218.35.7", - "193.218.35.12" - ] - }, { "vpn": "openvpn", "country": "United States", @@ -120768,6 +120742,19 @@ "212.119.32.10" ] }, + { + "vpn": "openvpn", + "country": "Uzbekistan", + "region": "Asia Pacific", + "city": "Tashkent", + "hostname": "uz-tas.prod.surfshark.com", + "tcp": true, + "udp": true, + "ips": [ + "94.154.124.5", + "94.154.124.8" + ] + }, { "vpn": "openvpn", "country": "Venezuela", @@ -120781,6 +120768,19 @@ "45.149.3.7", "45.149.3.14" ] + }, + { + "vpn": "openvpn", + "country": "Vietnam", + "region": "Asia Pacific", + "city": "Ho Chi Minh City", + "hostname": "vn-hcm.prod.surfshark.com", + "tcp": true, + "udp": true, + "retroloc": "Vietnam", + "ips": [ + "212.119.34.5" + ] } ] },