Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/proxy: Non-SOCKS ALL_PROXY results in proxy: unknown scheme: http #16715

bbodenmiller opened this issue Aug 16, 2016 · 3 comments


Copy link

@bbodenmiller bbodenmiller commented Aug 16, 2016

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.

  1. What version of Go are you using (go version)?
    go1.6.3 via docker
  2. What operating system and processor architecture are you using (go env)?
  3. What did you do?
    Have a http ALL_PROXY environment variable set and try to run Docker Toolbox, e.g. docker run hello-world
  4. What did you expect to see?
    Docker should work fine, Go should ignore non-SOCKS ALL_PROXY environment variable
  5. What did you see instead?
    Docker doesn't work because non-SOCKS ALL_PROXY environment variable is not ignored. The error can be traced back to

Workaround: Run unset ALL_PROXY when you get error.

@bradfitz bradfitz changed the title Non-SOCKS ALL_PROXY results in proxy: unknown scheme: http x/net/proxy: Non-SOCKS ALL_PROXY results in proxy: unknown scheme: http Aug 16, 2016
@bradfitz bradfitz added this to the Unreleased milestone Aug 16, 2016
Copy link

@nathanleclaire nathanleclaire commented Sep 19, 2017

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.


Copy link

@brandond brandond commented Jan 18, 2019

I can't believe this is still open.


Copy link

@mdsauce mdsauce commented Feb 3, 2019

@nathanleclaire I think you have to register the Dialer Type yourself:

Read more here and here:

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.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants