• 本帖最后由 hostvps 于 2018-9-12 16:13 编辑 *

VPS要是KVM类型,优化方案同时启用锐速+hybla+TCP Fast Openpe配合上安全而速度快的chacha20-ietf-poly1305加密方式,故称最优SS单边加速优化方案
1、重装系统为Debian8(安装后SSH默认密码为:Vicer记得修改成复杂密码)

2、更换锐速可用内核

  • echo -e "\ndeb http://ftp.debian.org/debian/ wheezy-backports main" >> /etc/apt/sources.list
  • apt-get update
  • apt-get -t wheezy-backports install linux-image-3.16.0-4-amd64 -y
  • dpkg -l|grep linux-image | awk '{print $2}' #查看本机安装内核
  • apt-get purge 其余内核名称 -y
  • update-grub
  • reboot复制代码

3、安装锐速

4、安装SS(选Shadowsocks-libev安装,加密方式选chacha20-ietf-poly1305)

5、优化SS
修改/etc/security/limits.conf 添加

  • * soft nofile 51200
  • * hard nofile 51200复制代码

修改/etc/profile 添加

  • ulimit -SHn 51200复制代码

修改/etc/sysctl.conf 添加

  • fs.file-max = 51200
  • net.core.rmem_max = 67108864
  • net.core.wmem_max = 67108864
  • net.core.netdev_max_backlog = 250000
  • net.core.somaxconn = 4096
  • net.ipv4.tcp_syncookies = 1
  • net.ipv4.tcp_tw_reuse = 1
  • net.ipv4.tcp_tw_recycle = 0
  • net.ipv4.tcp_fin_timeout = 30
  • net.ipv4.tcp_keepalive_time = 1200
  • net.ipv4.ip_local_port_range = 10000 65000
  • net.ipv4.tcp_max_syn_backlog = 8192
  • net.ipv4.tcp_max_tw_buckets = 5000
  • net.ipv4.tcp_fastopen = 3
  • net.ipv4.tcp_mem = 25600 51200 102400
  • net.ipv4.tcp_rmem = 4096 87380 67108864
  • net.ipv4.tcp_wmem = 4096 65536 67108864
  • net.ipv4.tcp_mtu_probing = 1
  • net.ipv4.tcp_congestion_control = hybla复制代码

运行sysctl -p使设置生效
修改/etc/shadowsocks-libev/config.json

  • "fast_open":true,复制代码

重启系统即可享用最优SS单边加速优化方案(如果已是可装锐速的debian8系统,1和2步可省去)
参考:
https://moeclub.org/2018/04/03/603/
https://doub.io/linux-jc6/
https://moeclub.org/2017/03/08/14/?v=795
https://teddysun.com/358.html
https://shadowsocks.org/en/config/advanced.html
https://www.hostloc.com/thread-467991-1-1.html