- 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
21 lines
634 B
Go
21 lines
634 B
Go
package surfshark
|
|
|
|
import (
|
|
"github.com/qdm12/gluetun/internal/constants"
|
|
)
|
|
|
|
// getRemainingServers finds extra servers not found in the API or in the ZIP file.
|
|
func getRemainingServers(hts hostToServer) {
|
|
hostnameToLocationLeft := constants.SurfsharkHostToLocation()
|
|
for _, hostnameDone := range hts.toHostsSlice() {
|
|
delete(hostnameToLocationLeft, hostnameDone)
|
|
}
|
|
|
|
for hostname, locationData := range hostnameToLocationLeft {
|
|
// we assume the server supports TCP and UDP
|
|
const tcp, udp = true, true
|
|
hts.add(hostname, locationData.Region, locationData.Country,
|
|
locationData.City, locationData.RetroLoc, tcp, udp)
|
|
}
|
|
}
|