Feature: filter by hostname for Cyberghost servers

This commit is contained in:
Quentin McGaw
2021-05-08 19:05:11 +00:00
parent c0e4d805b1
commit a34769ae02
9 changed files with 182 additions and 121 deletions

View File

@@ -16,6 +16,10 @@ func (settings *Provider) cyberghostLines() (lines []string) {
lines = append(lines, lastIndent+"Regions: "+commaJoin(settings.ServerSelection.Regions))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
if settings.ExtraConfigOptions.ClientKey != "" {
lines = append(lines, lastIndent+"Client key is set")
}
@@ -61,6 +65,11 @@ func (settings *Provider) readCyberghost(r reader) (err error) {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.CyberghostHostnameChoices())
if err != nil {
return err
}
return nil
}