chore(env): SERVER_COUNTRIES variable
- With retro-compatibility with `COUNTRY`
This commit is contained in:
@@ -93,7 +93,7 @@ ENV VPN_SERVICE_PROVIDER=pia \
|
|||||||
WIREGUARD_ADDRESSES= \
|
WIREGUARD_ADDRESSES= \
|
||||||
# VPN server filtering
|
# VPN server filtering
|
||||||
REGION= \
|
REGION= \
|
||||||
COUNTRY= \
|
SERVER_COUNTRIES= \
|
||||||
CITY= \
|
CITY= \
|
||||||
SERVER_HOSTNAME= \
|
SERVER_HOSTNAME= \
|
||||||
# # Mullvad only:
|
# # Mullvad only:
|
||||||
|
|||||||
@@ -25,12 +25,13 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) (
|
|||||||
return ss, err
|
return ss, err
|
||||||
}
|
}
|
||||||
|
|
||||||
ss.Countries = envToCSV("COUNTRY")
|
_, countriesCSV := r.getEnvWithRetro("SERVER_COUNTRIES", "COUNTRY")
|
||||||
|
ss.Countries = lowerAndSplit(countriesCSV)
|
||||||
if vpnProvider == constants.Cyberghost && len(ss.Countries) == 0 {
|
if vpnProvider == constants.Cyberghost && len(ss.Countries) == 0 {
|
||||||
// Retro-compatibility for Cyberghost using the REGION variable
|
// Retro-compatibility for Cyberghost using the REGION variable
|
||||||
ss.Countries = envToCSV("REGION")
|
ss.Countries = envToCSV("REGION")
|
||||||
if len(ss.Countries) > 0 {
|
if len(ss.Countries) > 0 {
|
||||||
r.onRetroActive("REGION", "COUNTRY")
|
r.onRetroActive("REGION", "SERVER_COUNTRIES")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user