diff --git a/Dockerfile b/Dockerfile index 86b8d66f..3ffcc2d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,7 +63,7 @@ ENV VPNSP=pia \ # Mullvad, PureVPN, Windscribe only CITY= \ # Windscribe only - HOSTNAME= \ + SERVER_HOSTNAME= \ # Mullvad only ISP= \ OWNED=no \ diff --git a/internal/params/privado.go b/internal/params/privado.go index 5907ae12..b54e36da 100644 --- a/internal/params/privado.go +++ b/internal/params/privado.go @@ -2,10 +2,13 @@ package params import ( "github.com/qdm12/gluetun/internal/constants" + libparams "github.com/qdm12/golibs/params" ) // GetPrivadoHostnames obtains the hostnames for the Privado server from the -// environment variable HOSTNAME. +// environment variable SERVER_HOSTNAME. func (r *reader) GetPrivadoHostnames() (hosts []string, err error) { - return r.envParams.GetCSVInPossibilities("HOSTNAME", constants.PrivadoHostnameChoices()) + return r.envParams.GetCSVInPossibilities("SERVER_HOSTNAME", + constants.PrivadoHostnameChoices(), + libparams.RetroKeys([]string{"HOSTNAME"}, r.onRetroActive)) } diff --git a/internal/params/windscribe.go b/internal/params/windscribe.go index db6a6e5d..7b1ba3d3 100644 --- a/internal/params/windscribe.go +++ b/internal/params/windscribe.go @@ -21,9 +21,12 @@ func (r *reader) GetWindscribeCities() (cities []string, err error) { } // GetWindscribeHostnames obtains the hostnames for the Windscribe servers from the -// environment variable HOSTNAME. +// environment variable SERVER_HOSTNAME. func (r *reader) GetWindscribeHostnames() (hostnames []string, err error) { - return r.envParams.GetCSVInPossibilities("HOSTNAME", constants.WindscribeHostnameChoices()) + return r.envParams.GetCSVInPossibilities("SERVER_HOSTNAME", + constants.WindscribeHostnameChoices(), + libparams.RetroKeys([]string{"HOSTNAME"}, r.onRetroActive), + ) } // GetWindscribePort obtains the port to reach the Windscribe server on from the