Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: let go commands work well with some proxy tool, such as proxychains #31772
What version of Go are you using (
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.
But yes, for proxychains users it'd be more convenient if it worked, but unfortunately it can't for Go programs.
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
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.