HANDBOOK
ShadowsocksR 服务端安装教程
ShadowsocksR 服务端安装教程 说明: 此教程为单用户版,适合个人用户。如果你是站长,请查看多用户版教程:多用户版教程 基本库安装 以下命令均以root用户执行,或sudo方式执行 centos:
1 2 |
yum install m2crypto git libsodium |
ubuntu/debian:
1 2 |
apt-get install m2crypto git |
如果要使用 salsa20 或 chacha20 或 chacha20-ietf 算法,请安装 libsodium :
1 2 3 4 5 6 |
apt-get install build-essential wget https://github.com/jedisct1/libsodium/releases/download/1.0.8/libsodium-1.0.8.tar.gz tar xf libsodium-1.0.8.tar.gz && cd libsodium-1.0.8 ./configure && make -j2 && make install ldconfig |
如果曾经安装过旧版本,亦可重复用以上步骤更新到最新版,仅1.0.4或以上版本支持chacha20-ietf 获取源代码 git clone -b manyuser https://github.com/breakwa11/shadowsocks.git 执行完毕后此目录会新建一个shadowsocks目录,其中根目录的是多用户版(即数据库版,个人用户请忽略这个),子目录中的是单用户版(即shadowsocks/shadowsocks)。 根目录即 ./shadowsocks 子目录即 ./shadowsocks/shadowsocks 服务端配置 进入子目录:
1 2 |
cd shadowsocks/shadowsocks |
快速运行
1 2 3 4 |
python server.py -p 443 -k password -m aes-256-cfb -o http_simple #说明:-p 端口 -k 密码 -m 加密方式 -P 协议插件 -o 混淆插件 |
如果要后台运行:
1 2 |
python server.py -p 443 -k password -m aes-256-cfb -o http_simple -d start |
如果要停止/重启:
1 2 |
python server.py -d stop/restart |
查看日志:
1 2 |
tail -f /var/log/shadowsocks.log |
用 -h 查看所有参数 通过配置文件运行 建立配置文件 vi /etc/shadowsocks.json Read more…