Feat: rework Surfshark servers data (#575)
- Feat: `MULTIHOP_ONLY` variable - Feat: `COUNTRY` variable - Feat: `CITY` variable - Feat: `REGION` variable, with retro-compatibility - Feat: merge servers from API, zip and hardcoded hostnames - Fix: remove outdated and duplicate servers - Maint: faster update with fully parallel DNS resolutions
This commit is contained in:
@@ -12,9 +12,12 @@ func (s *Surfshark) filterServers(selection configuration.ServerSelection) (
|
||||
switch {
|
||||
case
|
||||
utils.FilterByPossibilities(server.Region, selection.Regions),
|
||||
utils.FilterByPossibilities(server.Country, selection.Countries),
|
||||
utils.FilterByPossibilities(server.City, selection.Cities),
|
||||
utils.FilterByPossibilities(server.Hostname, selection.Hostnames),
|
||||
selection.OpenVPN.TCP && !server.TCP,
|
||||
!selection.OpenVPN.TCP && !server.UDP:
|
||||
!selection.OpenVPN.TCP && !server.UDP,
|
||||
selection.MultiHopOnly && !server.MultiHop:
|
||||
default:
|
||||
servers = append(servers, server)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user