Add support for forwarding Docker client through SOCKS proxy

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 05002c2501ac549b3cf677ab04d0f571cc456360
Component: engine
This commit is contained in:
Alexander Morozov
2016-02-16 10:05:05 -08:00
parent c645116653
commit 4f226110ac
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" {