chore(env): SERVER_NAMES variable
- With retro-compatibility with `SERVER_NAME`
This commit is contained in:
@@ -109,7 +109,7 @@ ENV VPN_SERVICE_PROVIDER=pia \
|
|||||||
# # Nordvpn only:
|
# # Nordvpn only:
|
||||||
SERVER_NUMBER= \
|
SERVER_NUMBER= \
|
||||||
# # PIA and ProtonVPN only:
|
# # PIA and ProtonVPN only:
|
||||||
SERVER_NAME= \
|
SERVER_NAMES= \
|
||||||
# # ProtonVPN only:
|
# # ProtonVPN only:
|
||||||
FREE_ONLY= \
|
FREE_ONLY= \
|
||||||
# # Surfshark only:
|
# # Surfshark only:
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) (
|
|||||||
_, hostnamesCSV := r.getEnvWithRetro("SERVER_HOSTNAMES", "SERVER_HOSTNAME")
|
_, hostnamesCSV := r.getEnvWithRetro("SERVER_HOSTNAMES", "SERVER_HOSTNAME")
|
||||||
ss.Hostnames = lowerAndSplit(hostnamesCSV)
|
ss.Hostnames = lowerAndSplit(hostnamesCSV)
|
||||||
|
|
||||||
ss.Names = envToCSV("SERVER_NAME")
|
_, namesCSV := r.getEnvWithRetro("SERVER_NAMES", "SERVER_NAME")
|
||||||
|
ss.Names = lowerAndSplit(namesCSV)
|
||||||
|
|
||||||
if csv := os.Getenv("SERVER_NUMBER"); csv != "" {
|
if csv := os.Getenv("SERVER_NUMBER"); csv != "" {
|
||||||
numbersStrings := strings.Split(csv, ",")
|
numbersStrings := strings.Split(csv, ",")
|
||||||
|
|||||||
Reference in New Issue
Block a user