If the ALL_PROXY
environment variable is set to a non-SOCKS address it results in the proxy: unknown scheme: http
when it instead should ignore it.
go version
)?go env
)?ALL_PROXY
environment variable set and try to run Docker Toolbox, e.g. docker run hello-world
ALL_PROXY
environment variableALL_PROXY
environment variable is not ignored. The error can be traced back to https://github.com/golang/net/blob/master/proxy/proxy.go#L93.Workaround: Run unset ALL_PROXY
when you get error.
I'm not 100% sure, but are you sure setting ALL_PROXY
to a http
or https
protocol makes sense? There might be traffic which is non-HTTP that wants to pass through the proxy.
I can't believe this is still open.
@nathanleclaire I think you have to register the Dialer Type yourself: https://godoc.org/golang.org/x/net/proxy#RegisterDialerType
Read more here and here:
http://blog.ralch.com/articles/network-programming-and-proxies-in-golang/
https://gist.github.com/jim3ma/3750675f141669ac4702bc9deaf31c6b
But I am also not sure and in the process of trying to setup a proxy for TCP dialers. HTTP client modifications are crazy easy:
http.DefaultTransport = &http.Transport{Proxy: http.ProxyURL(proxyURL)}
But using net.Dial
and net.DialTimeout
is less straightforward with a non-SOCKS5 proxy scheme.
Most helpful comment
I can't believe this is still open.