diff --git a/daemon/info.go b/daemon/info.go index 20d8356d44..61eab2d7fd 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -20,6 +20,7 @@ import ( "github.com/docker/docker/utils" "github.com/docker/docker/volume/drivers" "github.com/docker/engine-api/types" + "github.com/docker/go-connections/sockets" ) // SystemInfo returns information about the host server the daemon is running on. @@ -97,9 +98,9 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) { ServerVersion: dockerversion.Version, ClusterStore: daemon.configStore.ClusterStore, ClusterAdvertise: daemon.configStore.ClusterAdvertise, - HTTPProxy: getProxyEnv("http_proxy"), - HTTPSProxy: getProxyEnv("https_proxy"), - NoProxy: getProxyEnv("no_proxy"), + HTTPProxy: sockets.GetProxyEnv("http_proxy"), + HTTPSProxy: sockets.GetProxyEnv("https_proxy"), + NoProxy: sockets.GetProxyEnv("no_proxy"), } // TODO Windows. Refactor this more once sysinfo is refactored into diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils.go index 78d530c7a5..e4f05c0b54 100644 --- a/integration-cli/docker_utils.go +++ b/integration-cli/docker_utils.go @@ -196,7 +196,7 @@ func (d *Daemon) getClientConfig() (*clientConfig, error) { transport = &http.Transport{} } - sockets.ConfigureTransport(transport, proto, addr) + d.c.Assert(sockets.ConfigureTransport(transport, proto, addr), check.IsNil) return &clientConfig{ transport: transport, diff --git a/pkg/plugins/client.go b/pkg/plugins/client.go index 72c7331c78..985f656207 100644 --- a/pkg/plugins/client.go +++ b/pkg/plugins/client.go @@ -30,7 +30,9 @@ func NewClient(addr string, tlsConfig tlsconfig.Options) (*Client, error) { tr.TLSClientConfig = c protoAndAddr := strings.Split(addr, "://") - sockets.ConfigureTransport(tr, protoAndAddr[0], protoAndAddr[1]) + if err := sockets.ConfigureTransport(tr, protoAndAddr[0], protoAndAddr[1]); err != nil { + return nil, err + } scheme := protoAndAddr[0] if scheme != "https" {