pkg/transport: use ProxyFromEnvironment when constructing a transport

this allows use of HTTP_PROXY/HTTPS_PROXY for etcdctl.
This commit is contained in:
Nick Owens 2016-03-21 21:02:42 -07:00
parent e73ac5bdd7
commit d80a546ed4

View File

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