fix(slickvpn/updater): update existing hostnames from servers.json

- SlickVPN location website is now total garbage which cannot be parsed
This commit is contained in:
Quentin McGaw
2025-12-23 02:50:15 +00:00
parent 92237658c3
commit e806fe02db
12 changed files with 52 additions and 695 deletions
+6
View File
@@ -19,3 +19,9 @@ func parseHardcodedServers() (allServers models.AllServers, err error) {
err = decoder.Decode(&allServers)
return allServers, err
}
// HardcodedServers returns the hardcoded servers.
// Warning: mutating the returned value will impact the storage's internal state.
func (s *Storage) HardcodedServers() models.AllServers {
return s.hardcodedServers
}
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"golang.org/x/text/language"
)
// readFromFile reads the servers from server.json.
// readFromFile reads the servers from servers.json.
// It only reads servers that have the same version as the hardcoded servers version
// to avoid JSON decoding errors.
func (s *Storage) readFromFile(filepath string, hardcodedVersions map[string]uint16) (