You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alias proxy="export http_proxy=http://localhost:8123;export https_proxy=http://localhost:8123" //会话全局设置
alias unproxy="unset http_proxy" //撤销当前会话的http_proxy代理
写这篇文章的目的,很简单,解决golang dep安装依赖包被墙无法正常开发的问题,做个记录。如果你也遇到这类问题,就请往下看。
首先,你要有个自己shadowsocks账号;如果你还没有,以下是我个人的意见:
好了,现在你已经准备好了一切,但是你在golang项目运行

dep ensure
时不一定如意:接下来,我们要解决的问题是在终端也能翻墙!
安装 polipo 工具
polipo程序开机自启动
需要给polipo命令加上命令行参数
socksParentProxy=localhost:1080
, 完整配置如下:紧接着执行以下命令:
polipo 启动
设置别名
bash中有一个很好的东西,就是别名alias. Linux用户修改~/.bashrc,Mac用户修改~/.bash_profile文件或者~/.zshrc,增加如下设置:
接下来,你只要运行
proxy
就可以全局代理了,取消代理使用unproxy
。如果你到这还遇到问题,那请参考以下资料:
The text was updated successfully, but these errors were encountered: