fix(cyberghost): compat log if COUNTRY is empty

This commit is contained in:
Quentin McGaw
2022-01-29 14:21:41 +00:00
parent 53952b143f
commit 57481e3dd7

View File

@@ -28,8 +28,10 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) (
countriesCSV := os.Getenv("COUNTRY") countriesCSV := os.Getenv("COUNTRY")
if vpnProvider == constants.Cyberghost && countriesCSV == "" { if vpnProvider == constants.Cyberghost && countriesCSV == "" {
// Retro-compatibility // Retro-compatibility
r.onRetroActive("REGION", "COUNTRY")
countriesCSV = os.Getenv("REGION") countriesCSV = os.Getenv("REGION")
if countriesCSV != "" {
r.onRetroActive("REGION", "COUNTRY")
}
} }
if countriesCSV != "" { if countriesCSV != "" {
ss.Countries = lowerAndSplit(countriesCSV) ss.Countries = lowerAndSplit(countriesCSV)