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

@@ -16,12 +16,6 @@ func (settings *Provider) readCyberghost(r reader) (err error) {
return err
}
settings.ServerSelection.Groups, err = r.env.CSVInside("CYBERGHOST_GROUP",
constants.CyberghostGroupChoices(servers))
if err != nil {
return fmt.Errorf("environment variable CYBERGHOST_GROUP: %w", err)
}
settings.ServerSelection.Countries, err = r.env.CSVInside("COUNTRY",
constants.CyberghostCountryChoices(servers),
params.RetroKeys([]string{"REGION"}, r.onRetroActive))

View File

@@ -25,13 +25,11 @@ func Test_Provider_lines(t *testing.T) {
Name: constants.Cyberghost,
ServerSelection: ServerSelection{
VPN: constants.OpenVPN,
Groups: []string{"group"},
Countries: []string{"a", "El country"},
},
},
lines: []string{
"|--Cyberghost settings:",
" |--Server groups: group",
" |--Countries: a, El country",
" |--OpenVPN selection:",
" |--Protocol: udp",

View File

@@ -15,9 +15,6 @@ type ServerSelection struct { //nolint:maligned
// Cyberghost, PIA, Protonvpn, Surfshark, Windscribe, Vyprvpn, NordVPN
Regions []string `json:"regions"`
// Cyberghost
Groups []string `json:"groups"`
// Fastestvpn, HideMyAss, IPVanish, IVPN, Mullvad, PrivateVPN, Protonvpn, PureVPN, VPNUnlimited
Countries []string `json:"countries"`
// HideMyAss, IPVanish, IVPN, Mullvad, PrivateVPN, Protonvpn, PureVPN, VPNUnlimited, Windscribe
@@ -51,10 +48,6 @@ func (selection ServerSelection) toLines() (lines []string) {
lines = append(lines, lastIndent+"Target IP address: "+selection.TargetIP.String())
}
if len(selection.Groups) > 0 {
lines = append(lines, lastIndent+"Server groups: "+commaJoin(selection.Groups))
}
if len(selection.Countries) > 0 {
lines = append(lines, lastIndent+"Countries: "+commaJoin(selection.Countries))
}