Skip to content

Instantly share code, notes, and snippets.

@lexrus
Last active November 13, 2023 13:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lexrus/b6019fed8a2bbd0075f754eeb7b8b326 to your computer and use it in GitHub Desktop.
Save lexrus/b6019fed8a2bbd0075f754eeb7b8b326 to your computer and use it in GitHub Desktop.
ss_startup.sh
#!/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
@fafeichter
Copy link

DigitalOcean free Coupon $200

1. Use this link to Sign Up.

2. Activate your account by credit card or PayPal.

3. Done! Now you have free $200 credit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment