check also for uppercase NO_PROXY env

This commit is contained in:
Harald Müller 2017-11-15 13:00:48 +01:00 committed by Yasuhiro Matsumoto
parent 2271ce0aec
commit 66aade104d

View File

@ -94,6 +94,9 @@ func connect(host, user, passwd string) (net.Conn, error) {
// test for no proxy // test for no proxy
if proxy != "" { if proxy != "" {
noproxy := os.Getenv("no_proxy") noproxy := os.Getenv("no_proxy")
if noproxy == "" {
noproxy = os.Getenv("NO_PROXY")
}
if noproxy != "" { if noproxy != "" {
nplist := strings.Split(noproxy, ",") nplist := strings.Split(noproxy, ",")
for _, s := range nplist { for _, s := range nplist {