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
internal/models/location.go
Normal file
12
internal/models/location.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
// SurfsharkLocationData is required to keep location data on Surfshark
|
||||
// servers that are not obtained through their API.
|
||||
type SurfsharkLocationData struct {
|
||||
Region string
|
||||
Country string
|
||||
City string
|
||||
RetroLoc string // TODO remove in v4
|
||||
Hostname string
|
||||
MultiHop bool
|
||||
}
|
||||
@@ -119,7 +119,11 @@ type PurevpnServer struct {
|
||||
|
||||
type SurfsharkServer struct {
|
||||
Region string `json:"region"`
|
||||
Country string `json:"country"` // Country is also used for multi-hop
|
||||
City string `json:"city"`
|
||||
RetroLoc string `json:"retroloc"` // TODO remove in v4
|
||||
Hostname string `json:"hostname"`
|
||||
MultiHop bool `json:"multihop"`
|
||||
TCP bool `json:"tcp"`
|
||||
UDP bool `json:"udp"`
|
||||
IPs []net.IP `json:"ips"`
|
||||
|
||||
Reference in New Issue
Block a user