Przeglądaj źródła

Add ProxyFromEnvironment enables client via proxy.

Signed-off-by: Anders Janmyr <anders@janmyr.com>
Anders Janmyr 10 lat temu
rodzic
commit
43d45e601f
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      api/client/cli.go

+ 1 - 0
api/client/cli.go

@@ -155,6 +155,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, key libtrust.PrivateKey,
 
 
 	// The transport is created here for reuse during the client session
 	// The transport is created here for reuse during the client session
 	tr := &http.Transport{
 	tr := &http.Transport{
+		Proxy:           http.ProxyFromEnvironment,
 		TLSClientConfig: tlsConfig,
 		TLSClientConfig: tlsConfig,
 	}
 	}