Merge pull request #20366 from LK4D4/socks_proxy

Add support for forwarding Docker client through SOCKS proxy
This commit is contained in:
Phil Estes 2016-02-16 22:29:49 -08:00
commit 59e100d7c2

View file

@ -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" {