Multi options filters, fixes #231 (#262)

* OWNED environment variable for Mullvad
* CSV are now accepted for all servers filtering environment variables
This commit is contained in:
Quentin McGaw
2020-10-18 17:15:42 -04:00
committed by GitHub
parent c932f48a95
commit af606463ea
26 changed files with 247 additions and 223 deletions

View File

@@ -14,12 +14,11 @@ func (p *reader) GetCyberghostGroup() (group string, err error) {
return s, err
}
// GetCyberghostRegion obtains the country name for the Cyberghost server from the
// GetCyberghostRegions obtains the country names for the Cyberghost servers from the
// environment variable REGION
func (p *reader) GetCyberghostRegion() (region string, err error) {
func (p *reader) GetCyberghostRegions() (regions []string, err error) {
choices := append(constants.CyberghostRegionChoices(), "")
s, err := p.envParams.GetValueIfInside("REGION", choices)
return s, err
return p.envParams.GetCSVInPossibilities("REGION", choices)
}
// GetCyberghostClientKey obtains the one line client key to use for openvpn from the