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:
|
||||
SERVER_NUMBER= \
|
||||
# # PIA and ProtonVPN only:
|
||||
SERVER_NAME= \
|
||||
SERVER_NAMES= \
|
||||
# # ProtonVPN only:
|
||||
FREE_ONLY= \
|
||||
# # Surfshark only:
|
||||
|
||||
@@ -46,7 +46,8 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) (
|
||||
_, hostnamesCSV := r.getEnvWithRetro("SERVER_HOSTNAMES", "SERVER_HOSTNAME")
|
||||
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 != "" {
|
||||
numbersStrings := strings.Split(csv, ",")
|
||||
|
||||
Reference in New Issue
Block a user