From 0e6db2f1c565cc57a9510b4b973b0e169eea35d3 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 5 Feb 2022 23:18:58 +0000 Subject: [PATCH] chore(env): `SERVER_REGIONS` variable - With retro-compatibility with `REGION` --- Dockerfile | 2 +- internal/configuration/sources/env/serverselection.go | 3 ++- internal/openvpn/logs.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f0acff6..99de23c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,7 +92,7 @@ ENV VPN_SERVICE_PROVIDER=pia \ WIREGUARD_PUBLIC_KEY= \ WIREGUARD_ADDRESSES= \ # VPN server filtering - REGION= \ + SERVER_REGIONS= \ SERVER_COUNTRIES= \ SERVER_CITIES= \ SERVER_HOSTNAME= \ diff --git a/internal/configuration/sources/env/serverselection.go b/internal/configuration/sources/env/serverselection.go index 89d52399..1d82b75a 100644 --- a/internal/configuration/sources/env/serverselection.go +++ b/internal/configuration/sources/env/serverselection.go @@ -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") ss.Cities = lowerAndSplit(citiesCSV) diff --git a/internal/openvpn/logs.go b/internal/openvpn/logs.go index f53a7d93..7990d469 100644 --- a/internal/openvpn/logs.go +++ b/internal/openvpn/logs.go @@ -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 🔌 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