1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 15:06:23 +00:00

Unset proxy env vars when ssh bastion is configured with option ignore_proxy_env_vars

This commit is contained in:
Pascal Morillon
2021-05-31 16:49:01 +02:00
parent a21294e915
commit 8b9385040f
2 changed files with 9 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ const (
WorkerThreads = 50
)
var proxyEnvVars = [3]string{"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"}
var ProxyEnvVars = [3]string{"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY"}
func StrToSemVer(version string) (*semver.Version, error) {
v, err := semver.NewVersion(strings.TrimPrefix(version, "v"))
@@ -146,7 +146,7 @@ func GetEnvVar(key string) (string, string, bool) {
func PrintProxyEnvVars() {
// Print proxy related environment variables
for _, proxyEnvVar := range proxyEnvVars {
for _, proxyEnvVar := range ProxyEnvVars {
var err error
// Lookup environment variable
if key, value, ok := GetEnvVar(proxyEnvVar); ok {