Maint: Remove CYBERGHOST_GROUP (change)

- It does not make any sense with newer server data
- It was to be deprecated anyway
This commit is contained in:
Quentin McGaw (desktop)
2021-09-23 13:54:24 +00:00
parent 625de1c834
commit f9aadeef1c
17 changed files with 1910 additions and 1846 deletions

View File

@@ -10,24 +10,25 @@ import (
type hostToServer map[string]models.CyberghostServer
func getPossibleServers() (possibleServers hostToServer) {
groups := getGroups()
groupIDToProtocol := getGroupIDToProtocol()
cyberghostCountryCodes := getSubdomainToRegion()
allCountryCodes := constants.CountryCodes()
possibleCountryCodes := mergeCountryCodes(cyberghostCountryCodes, allCountryCodes)
n := len(groups) * len(possibleCountryCodes)
n := len(groupIDToProtocol) * len(possibleCountryCodes)
possibleServers = make(hostToServer, n) // key is the host
for groupID, groupName := range groups {
for groupID, protocol := range groupIDToProtocol {
for countryCode, country := range possibleCountryCodes {
const domain = "cg-dialup.net"
possibleHost := groupID + "-" + countryCode + "." + domain
possibleServer := models.CyberghostServer{
Hostname: possibleHost,
Country: country,
Group: groupName,
TCP: protocol == constants.TCP,
UDP: protocol == constants.UDP,
}
possibleServers[possibleHost] = possibleServer
}