目前仅支持http以及https代理,不支持socks,所以如果是用ssh需要参考另外一篇文章:使用privoxy+ssh实现共享科学上网
#https
https_proxy=127.0.0.1:8118 go get url
#http
http_proxy=127.0.0.1:8118 go get url
Setting proxies for source code used by go get (listed in GoGetTools)
git
$ git config [--global] http.proxy http://proxy.example.com:port
mercurial
Edit ~/.hgrc and add the following:
[http_proxy]
host=proxy.example.com:port
svn
Edit ~/.subversion/servers and add the following:
[Global]
http-proxy-host=proxy.example.com
http-proxy-port=xxxx