Repurpose OPENVPN_TARGET_IP for #229

This commit is contained in:
Quentin McGaw
2020-10-12 20:21:26 +00:00
parent 1c747a10c8
commit 9b9ae69404
11 changed files with 92 additions and 143 deletions

View File

@@ -53,9 +53,8 @@ func (r *reader) GetOpenVPNRoot() (root bool, err error) {
return r.envParams.GetYesNo("OPENVPN_ROOT", libparams.Default("no"))
}
// GetTargetIP obtains the IP address to choose from the list of IP addresses
// available for a particular region, from the environment variable
// OPENVPN_TARGET_IP
// GetTargetIP obtains the IP address to override over the list of IP addresses filtered
// from the environment variable OPENVPN_TARGET_IP
func (r *reader) GetTargetIP() (ip net.IP, err error) {
s, err := r.envParams.GetEnv("OPENVPN_TARGET_IP")
if len(s) == 0 {