Created
October 2, 2019 04:21
-
-
Save deneschen/a77e0c5fe1f45f312923e7c1f1719011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install git vim wget psmisc python-pip -y | |
wget --no-check-certificate https://github.com/shadowsocks/shadowsocks-rust/releases/download/v1.7.2/shadowsocks-v1.7.2-stable.x86_64-unknown-linux-musl.tar.xz | |
tar -Jxf shadowsocks-v1.7.2-stable.x86_64-unknown-linux-musl.tar.xz | |
cp ssserver /usr/local/bin/ | |
cat <<EOF >/usr/lib/systemd/system/shadowsocks.service | |
[Unit] | |
Description=Shadowsocks Server | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks.json | |
Restart=on-abort | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
cat <<EOF >/etc/shadowsocks.json | |
{ | |
"servers": [ | |
{ | |
"address": "服务器端IP地址", | |
"port": 服务器端监听端口号1, | |
"password": "连接密码", | |
"fast_open": true, | |
"method": "aes-256-cfb" | |
}, | |
{ | |
"address": "服务器端IP地址", | |
"port": 服务器端监听端口号2, | |
"password": "连接密码", | |
"fast_open": true, | |
"method": "aes-256-cfb" | |
}, | |
], | |
"local_port": 1080, | |
"local_address": "127.0.0.1" | |
} | |
EOF | |
systemctl enable shadowsocks | |
systemctl start shadowsocks | |
systemctl status shadowsocks | |
wget --no-check-certificate -O tcp.sh https://github.com/cx9208/Linux-NetSpeed/raw/master/tcp.sh && chmod +x tcp.sh | |
git clone https://github.com/tcp-nanqinlang/general.git bbr_plus | |
git clone https://github.com/675816156/shell-scripts.git | |
bash ./shell-scripts/kcptun/kcptun.sh | |
/etc/rc.local文件中添加: | |
/usr/bin/systemctl start crond.service | |
/usr/bin/systemctl start shadowsocks | |
# 下面步骤忽略 | |
iptables -I INPUT -p udp --dport 29900 -j ACCEPT | |
iptables -I INPUT -p tcp --dport 29900 -j ACCEPT | |
iptables-save >/etc/iptables | |
cat <<EOF >/etc/network/if-pre-up.d/iptables | |
#!/bin/sh | |
/sbin/iptables-restore < /etc/iptables | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment