目前仅支持http以及https代理,不支持socks,所以如果是用ssh需要参考另外一篇文章:[使用privoxy+ssh实现共享科学上网](http://www.c4ys.com/?p=481)

#https
https_proxy=127.0.0.1:8118 go get url
#http
http_proxy=127.0.0.1:8118 go get url

[GoGetProxyConfig](https://github.com/golang/go/wiki/GoGetProxyConfig)

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

本条目发布于[2015年11月19日](https://c4ys.com/archives/511 "11:46")。属于[Golang](https://c4ys.com/archives/category/golang)分类。