Shadowsocks-libev

by cody96
6 deployments · 5 still active · last rev. 3 months ago

Compatible with: Ubuntu 18.04 LTS
						#!/bin/bash

apt update
apt dist-upgrade -y
apt autoremove

modprobe tcp_bbr
echo "tcp_bbr" >> /etc/initramfs-tools/modules
update-initramfs -u -k $(uname -r)
sysctl -w net.ipv4.tcp_congestion_control=bbr
sysctl -w net.ipv4.tcp_fastopen=3
echo 'net.ipv4.tcp_congestion_control = bbr' >> /etc/sysctl.conf
echo 'net.ipv4.tcp_fastopen = 3' >> /etc/sysctl.conf

apt install shadowsocks-libev rng-tools simple-obfs -y
systemctl enable shadowsocks-libev

cat <<EOF > /etc/shadowsocks-libev/config.json
{
    "server": [
        "0.0.0.0",
        "::0"
    ],
    "server_port": 443,
    "password": "CHANGE_IT",
    "timeout": 60,
    "method": "chacha20-ietf-poly1305",
    "fast_open": true,
    "plugin": "obfs-server",
    "plugin_opts": "obfs=tls;failover=127.0.0.1:8443"
}
EOF

reboot