SS搭建

安装 SS 的步骤.

安装

apt-get install python-pip
pip install shadowsocks

配置

配置chacha20加密方式

apt-get install python-m2crypto
apt-get install build-essential
wget https://github.com/jedisct1/libsodium/releases/download/1.0.1/libsodium-1.0.1.tar.gz
tar xf libsodium-1.0.1.tar.gz && cd libsodium-1.0.1
./configure && make -j2 && make install
ldconfig

配置文件

/etc/shadowsocks.json中:

{
    "server": "::",
    "local_address": "127.0.0.1",
    "local_port":1080,
    "port_password":{
         "10001": "pass1",
         "20001": "pass2"
    },
    "timeout":300,
    "method": "chacha20",
    "fast_open": false
}

加入自启

/etc/rc.local中加入:

/usr/bin/python /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start

使用

ssserver -c /etc/shadowsocks.json -d start
ssserver -d stop

运行日志

root@localhost:~# pip install shadowsocks
Downloading/unpacking shadowsocks
Downloading shadowsocks-2.8.2.tar.gz
Running setup.py (path:/tmp/pip_build_root/shadowsocks/setup.py) egg_info for package shadowsocks

Installing collected packages: shadowsocks
Running setup.py install for shadowsocks

Installing sslocal script to /usr/local/bin
Installing ssserver script to /usr/local/bin
Successfully installed shadowsocks
Cleaning up...

Enjoy!