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
cmd/go: let go commands work well with some proxy tool, such as proxychains #31772
Comments
proxychains does LD_PRELOAD tricks to hook libc functions. Go doesn't use libc, so this is unfeasible. Please file a separate bug if cmd/go isn't respecting HTTP_PROXY somewhere. But I don't know where. Note that Go's implementation of HTTP_PROXY also supports SOCKS, so you should be able to proxy to HTTP, HTTPS, or SOCKS.
gcloud is written in Python, which uses libc, so proxychains happens to work. This wasn't a decision on gcloud's part.
Why?
Which controls? But yes, for proxychains users it'd be more convenient if it worked, but unfortunately it can't for Go programs. |
@bradfitz
With proxychains, it is convenient to switch between proxy-on and proxy-off mode, though it is only a little more convenient. And proxychains supports remote dns resolving. I just run some I have not got a full understanding on |
More info: my proxy is a socks5 proxy. |
So does Go's SOCKS5 implementation.
GOPROXY is the proxy cache to get modules from. For instance, use But you can use it with HTTPS_PROXY to set your SOCK5 proxy for that. Anyway, there's nothing to do here it seems so I'm going to close this bug. |
Would it be better to fallthrough to all_proxy if http[s]_proxy is not set? |
What version of Go are you using (
go version
)?What did you expect to see?
Many another commands, such as curl and gcloud, work well with proxychains.
I don't know why go commands don't.
I think if gcloud can, then go commands also can.
This is not a problem can be solved by GOPROXY and http(s)_proxy env vars.
proxychains is much more convenient and has better controls.
The text was updated successfully, but these errors were encountered: