ubuntu16.04安装shadowsocks
commond和GUI二选一。
安装 shadowsocks by commond
安装
sudo apt-get -y install python-pip
sudo pip install shadowsocks
配置
新建名字为ss_conf.json的配置文件,内容如下:
{
    "server":"ip",
    "port": port,
    "password": "password",
    "method": "method", #可选
    "remarks": "remarks",#可选
    "auth": false
}
运行
nohup sslocal -c ~/ss_conf.json > ~/ss.log 2>&1 &
安装 shadowsocks by GUI
sudo add-apt-repository ppa:hzwhuang/ss-qt5
sudo apt-get update
sudo apt-get install shadowsocks-qt5
和windows一样 找一份config.json添加进去。
浏览器
我这里配置的是chrome
下载插件
SwitchyOmega插件下载方式
- 下载地址
- 谷歌商店
貌似两种方式都需要翻墙,我是一个也没下下来,最后找人下完传给我的。大家可是是第一种。
下载完成后,浏览器地址打开chrome://extensions/,将下载的插件拖拽进去安装。
配置插件
点击SwitchyOmega的Options
配置Proxy servers
点击New profile配置Proxy servers
- Protocol选- SOCKS5
- Server填写- 127.0.0.1
- Port填写- 1080
- 点击Apply changes
配置 auto swith
点击auto swith
- Default选择- Direct
- Rule list rules选择刚刚新建的- profile
- Rule List Config选择- AutoProxy
- Rule List URL填写- https://github.com/gfwlist/gfwlist/blob/master/gfwlist.txt
- 点击Download Profile Now
- 点击Apply changes
选择 auto swith
点击浏览器右上角的SwitchyOmega选择auto swith
终端
安装 polipo
sudo apt-get install polipo
vi  /etc/polipo/config
#添加 
socksParentProxy = "localhost:1080"
socksProxyType = socks5
#保存
sudo service polipo restart
配置Bash
在~/.bashrc中添加如下alias,可以方便快速设置HTTP Proxy环境变量:
alias http-proxy-show='env|grep http'
alias http-proxy-on='export http_proxy=http://127.0.0.1:8123; export https_proxy=http://127.0.0.1:8123; http-proxy-show'
alias http-proxy-off='unset http_proxy; unset https_proxy'
开启命令http-proxy-on
###参考资料
