Browse Source

pkg/transport: use ProxyFromEnvironment when constructing a transport

this allows use of HTTP_PROXY/HTTPS_PROXY for etcdctl.
Nick Owens 9 years ago
parent
commit
d80a546ed4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      pkg/transport/listener.go

+ 1 - 0
pkg/transport/listener.go

@@ -67,6 +67,7 @@ func NewTransport(info TLSInfo, dialtimeoutd time.Duration) (*http.Transport, er
 	}
 	}
 
 
 	t := &http.Transport{
 	t := &http.Transport{
+		Proxy: http.ProxyFromEnvironment,
 		Dial: (&net.Dialer{
 		Dial: (&net.Dialer{
 			Timeout: dialtimeoutd,
 			Timeout: dialtimeoutd,
 			// value taken from http.DefaultTransport
 			// value taken from http.DefaultTransport