Common operation for server side

sudo ssserver -c /etc/shadowsocks.json -d start # 启动
sudo ssserver -d stop # 关闭
sudo ssserver -c /etc/shadowsocks.json -d restart # 重启

Server

sudo apt-get install python-pip -y
pip install shadowsocks
vim /etc/shadowsocks.json
{
    "server":"0.0.0.0",
    "server_port":8388,
    "local_port":1080,
    "password": "...",
    "timeout":600,
    "method":"aes-256-cfb"
}
# ssserver --version
Shadowsocks 2.8.2

启动

sudo ssserver -c /etc/shadowsocks.json -d start # 启动

查看日志

/var/log/shadowsocks.log

开机启动

vim /etc/rc.local
chmod +x /etc/rc.local
/usr/bin/python /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start

注意

是否需要安装python-m2crypto

FAQ

服务运行75天之后,发现https://ssl.gstatic.com/accounts/o/4229659068-postmessagerelay.js这个URL无法访问了(忘记记录错误类型了),测试后发现是gstatic.com这个域名下的资源都无法访问了,所以将shadowsocks server服务重启了一下,然后就好了。

Ubuntu Client

ref: https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation

PPA is for Ubuntu >= 14.04.

sudo add-apt-repository ppa:hzwhuang/ss-qt5
sudo apt-get update
sudo apt-get install shadowsocks-qt5

HTTP proxy

由于Windows版的shadowsocks默认只有socks proxy,所以需要使用privoxy(通过forwarding)来支持HTTP proxy。

shadowrocket

See also