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:
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -778,6 +779,12 @@ func (c *Cluster) SetupDialers(ctx context.Context, dailersOptions hosts.Dialers
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if c.BastionHost.IgnoreProxyEnvVars {
|
||||
logrus.Debug("Unset http proxy environment variables")
|
||||
for _, v := range util.ProxyEnvVars {
|
||||
os.Unsetenv(v)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user