2021-08-23 10:25:00 -07:00
|
|
|
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) {
|
2022-02-13 01:21:25 +00:00
|
|
|
locationData := constants.SurfsharkLocationData()
|
|
|
|
|
hostnameToLocationLeft := hostToLocation(locationData)
|
2021-08-23 10:25:00 -07:00
|
|
|
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)
|
|
|
|
|
}
|
|
|
|
|
}
|