Last active
November 13, 2023 13:41
-
-
Save lexrus/b6019fed8a2bbd0075f754eeb7b8b326 to your computer and use it in GitHub Desktop.
ss_startup.sh
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
#!/bin/sh | |
# | |
# This startup script initializes a Shadowsocks server in Debian 11. | |
# It's compatible with DigitalOcean, Linode and Vultr. | |
# | |
# Author: @lexrus https://github.com/lexrus | |
# | |
# Get $100 free credit for VPS with my referral links: | |
# DigitalOcean: https://m.do.co/c/3eb5cf371fc9 | |
# Linode: https://www.linode.com/lp/refer/?r=9f144941e797d495a10c2841c3137ce1acde5f15 | |
# Vultr: https://www.vultr.com/?ref=6822054 | |
PASSWORD="supercalifragilisticexpialidocious_pneumonoultramicroscopicsilicovolcanoconiosis" | |
METHOD="chacha20-ietf-poly1305" | |
update-locale LANG=en_US.UTF-8 | |
apt update | |
apt install -y shadowsocks-libev simple-obfs pwgen | |
echo """ | |
{ | |
\"server\": [\"::1\", \"0.0.0.0\"], | |
\"mode\": \"tcp_and_udp\", | |
\"server_port\": 443, | |
\"local_port\": 1080, | |
\"password\": \"$PASSWORD\", | |
\"timeout\": 86400, | |
\"method\": \"$METHOD\", | |
\"workers\": 4, | |
\"plugin\": \"obfs-server\", | |
\"plugin_opts\": \"obfs=tls;obfs-host=www.bing.com\", | |
\"fast_open\": true, | |
\"reuse_port\": true | |
} | |
""" > /etc/shadowsocks-libev/config.json | |
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf | |
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf | |
setcap cap_net_bind_service+ep /usr/bin/obfs-server | |
sysctl -p | |
systemctl restart shadowsocks-libev.service | |
ufw disable 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1. Use this link to Sign Up.
2. Activate your account by credit card or PayPal.
3. Done! Now you have free $200 credit.