命令行开启
ssr terminal
mac
/usr/local/bin/ssr.sh
if [ "$http_proxy" != "http://127.0.0.1:1087" ]
then
echo 'export http_proxy=http://127.0.0.1:1087
export https_proxy=http://127.0.0.1:1087
'
else
echo 'unset http_proxy
unset https_proxy
'
fi
~/.zshrc
alias ssr='`ssr.sh`'
通过ssr 命令开启和关闭
echo $http_proxy / $https_proxy 查看是否生效
Linux mint
socks5 转http
sudo apt install polipo
sudo vi /etc/polipo/config
socksParentProxy = "localhost:1080"
socksProxyType = socks5
sudo service polipo status
sudo service polipo restart
ssr.sh 脚本中端口改为polipo监听的端口 8123
socks5代理设置
alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080"
alias unsetproxy="unset ALL_PROXY"
alias ip="curl -i https://ip.cn"