Feature: add more Surfshark servers

- Add servers missing from surfshark zip file
- Fixes #424 and re-add multihop servers
- Fix logic to try resolving old vpn servers for Surfshark
This commit is contained in:
Quentin McGaw
2021-04-16 22:30:58 +00:00
parent 69f9461bcd
commit 0636123e7a
4 changed files with 124 additions and 97 deletions

View File

@@ -162,10 +162,9 @@ func findSurfsharkServersFromZip(ctx context.Context, client *http.Client, looku
func getRemainingServers(ctx context.Context, mapping map[string]string, lookupIP lookupIPFunc) (
servers []models.SurfsharkServer, warnings []string) {
hosts := make([]string, len(mapping))
i := 0
hosts := make([]string, 0, len(mapping))
for subdomain := range mapping {
hosts[i] = subdomain + ".prod.surfshark.com"
hosts = append(hosts, subdomain+".prod.surfshark.com")
}
const repetition = 20