chore(env): SERVER_REGIONS variable

- With retro-compatibility with `REGION`
This commit is contained in:
Quentin McGaw
2022-02-05 23:18:58 +00:00
parent 7aab18d197
commit 0e6db2f1c5
3 changed files with 4 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ ENV VPN_SERVICE_PROVIDER=pia \
WIREGUARD_PUBLIC_KEY= \ WIREGUARD_PUBLIC_KEY= \
WIREGUARD_ADDRESSES= \ WIREGUARD_ADDRESSES= \
# VPN server filtering # VPN server filtering
REGION= \ SERVER_REGIONS= \
SERVER_COUNTRIES= \ SERVER_COUNTRIES= \
SERVER_CITIES= \ SERVER_CITIES= \
SERVER_HOSTNAME= \ SERVER_HOSTNAME= \

View File

@@ -35,7 +35,8 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) (
} }
} }
ss.Regions = envToCSV("REGION") _, regionsCSV := r.getEnvWithRetro("SERVER_REGIONS", "REGION")
ss.Regions = lowerAndSplit(regionsCSV)
_, citiesCSV := r.getEnvWithRetro("SERVER_CITIES", "CITY") _, citiesCSV := r.getEnvWithRetro("SERVER_CITIES", "CITY")
ss.Cities = lowerAndSplit(citiesCSV) ss.Cities = lowerAndSplit(citiesCSV)

View File

@@ -54,7 +54,7 @@ That error usually happens because either:
1. The VPN server IP address you are trying to connect to is no longer valid 🔌 1. The VPN server IP address you are trying to connect to is no longer valid 🔌
Update your server information using https://github.com/qdm12/gluetun/wiki/Updating-Servers Update your server information using https://github.com/qdm12/gluetun/wiki/Updating-Servers
2. The VPN server crashed 💥, try changing your VPN servers filtering options such as REGION 2. The VPN server crashed 💥, try changing your VPN servers filtering options such as SERVER_REGIONS
3. Your Internet connection is not working 🤯, ensure it works 3. Your Internet connection is not working 🤯, ensure it works