Add support for forwarding Docker client through SOCKS proxy

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2016-02-16 10:05:05 -08:00
parent 16effc66c0
commit 05002c2501
3 changed files with 8 additions and 5 deletions

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