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 e178bdf28e
commit 54bafc26b7

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