We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
首先安装 polipo 程序
polipo
$ brew install polipo
设置 polipo 程序开机自启动
$ vim /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
需要给 polipo 程序走 ss 客户端的代理,配置如下
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>homebrew.mxcl.polipo</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>ProgramArguments</key> <array> <string>/usr/local/opt/polipo/bin/polipo</string> <string>socksParentProxy=localhost:1080</string> </array> </dict> </plist>
接着执行命令
$ ln -sfv /usr/local/opt/polipo/*.plist ~/Library/LaunchAgents $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
并且启动
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
给 shell 设置别名以简短命令执行
shell
macOS 用户修改 ~/.bash_profile,用 zsh 的话就编辑 ~/.zshrc
~/.bash_profile
zsh
~/.zshrc
$ vim ~/.bash_profile # 或 vim ~/.zshrc
尾部追加
# Polipo proxy alias proxy="export http_proxy=http://localhost:8123; export https_proxy=http://localhost:8123" alias unproxy="unset http_proxy; unset https_proxy"
重新读取配置
$ source ~/.bash_profile # 或 source ~/.zshrc 或直接 zsh
此后,需要走代理的时候执行 proxy 即可,取消的话就 unproxy 咯
proxy
unproxy
参考资料: 为终端设置Shadowsocks代理, 解决golang dep ensure依赖包安装被墙 - 作者:Quinton
The text was updated successfully, but these errors were encountered:
No branches or pull requests
首先安装
polipo
程序设置
polipo
程序开机自启动需要给
polipo
程序走 ss 客户端的代理,配置如下接着执行命令
并且启动
给
shell
设置别名以简短命令执行macOS 用户修改
~/.bash_profile
,用zsh
的话就编辑~/.zshrc
尾部追加
重新读取配置
此后,需要走代理的时候执行
proxy
即可,取消的话就unproxy
咯参考资料:
为终端设置Shadowsocks代理, 解决golang dep ensure依赖包安装被墙 - 作者:Quinton
The text was updated successfully, but these errors were encountered: