设置密码

如何在Vultr VPS上部署shadowsocks服务器

1.通过脚本安装Shadowsocks

在这里,我们将使用teddysun脚本自动在Vultr VPS服务器上安装Shadowsocks服务器:

首先,下载脚本:

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh

然后更改此文件的模式以授予其运行权限:

chmod +x shadowsocks.sh

最后运行它:

./shadowsocks.sh 2>&1 | tee shadowsocks.log

如果你想安装ShadowsocksR,只需下载镜像,如下面的代码片段:

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh

2.设置密码

设置密码

3.设置端口

set_port

4.选择特定的加密方法

根据该文件,比较了加密方法的速度,测试与100MB数据报大小。

x86 + Intel Core i7-6500U

Encryption Methods Time Used (ms)
aes-128-cfb 639
aes-192-cfb 693
aes-256-cfb 764
bf-cfb 1103
camellia-128-cfb 1038
camellia-192-cfb 1261
camellia-256-cfb 1266
cast5-cfb 1213
chacha20 307
des-cfb 1613
idea-cfb 2066
rc2-cfb 2214
rc4-md5 551
salsa20 263
seed-cfb 1521
serpent-cfb 1444

x86 + AMD Phenom II X4 N930

Encryption Methods Time Used (ms)
aes-128-cfb 1860
aes-192-cfb 1984
aes-256-cfb 2125
bf-cfb 2563
camellia-128-cfb 3812
camellia-192-cfb 4797
camellia-256-cfb 4828
cast5-cfb 2766
chacha20 687
des-cfb 3563
idea-cfb 4562
rc2-cfb 5219
rc4-md5 2640
salsa20 875
seed-cfb 2657
serpent-cfb 2875

ARM + Samsung Exynos 4412 Prime

Encryption Methods Time Used (ms)
aes-128-cfb 3837
aes-192-cfb 4089
aes-256-cfb 4443
bf-cfb 4320
camellia-128-cfb 5920
camellia-192-cfb 7058
camellia-256-cfb 7057
cast5-cfb 4730
chacha20 1297
des-cfb 8147
idea-cfb 6678
rc2-cfb 8846
rc4-md5 3170
salsa20 1666
seed-cfb 6941
serpent-cfb 4440

 

5. TCP快速打开

要提高连接速度,您可以按照以下步骤执行更多操作:

将以下行添加到文件中/etc/rc.local

 # /etc/rc.local
 echo 3 > /proc/sys/net/ipv4/tcp_fastopen

将以下行添加到文件中/etc/sysctl.conf

# /etc/sysctl.conf
net.ipv4.tcp_fastopen = 3

改装后的属性fast_opentrue文件中/etc/shadowsocks.json

重启Shadowsocks服务器:

 /etc/init.d/shadowsocks restart