Skip to content

Instantly share code, notes, and snippets.

@sh1n0b1
Last active November 26, 2021 06:53
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 sh1n0b1/3a2b58db967262097ee06d7ca2b85e21 to your computer and use it in GitHub Desktop.
Save sh1n0b1/3a2b58db967262097ee06d7ca2b85e21 to your computer and use it in GitHub Desktop.
Shadowsocks Server deployment script for Debian 9 - Tools to bypass internet censorship
#!/bin/bash
#===============================================================================================
# System Required: Debian 9
# Description: Shadowsocks Server deployment script for Debian 9
# Author: https://github.com/sh1n0b1
#===============================================================================================
apt update
apt install -y curl sudo
sudo apt install -y shadowsocks-libev
sudo systemctl start shadowsocks-libev
sudo systemctl enable shadowsocks-libev
RED='\033[0;31m'
NC='\033[0m'
IP=`curl ifconfig.me`
PORT=`shuf -i 10000-65000 -n 1`
CIPHER="chacha20-ietf-poly1305"
SECRET=`openssl rand -base64 32`
HOSTNAME=`hostname`
# If you are doing port forwarding traffic to your local network, you need to change the $IP address of the following config file to the IP address of the local interface:
echo -e "{\n\t\"server\":\"$IP\",\n\t\"server_port\":$PORT,\n\t\"local_port\":1080,\n\t\"password\":\"$SECRET\",\n\t\"timeout\":600,\n\t\"method\":\"chacha20-ietf-poly1305\"\n}" > /etc/shadowsocks-libev/config.json
sudo systemctl restart shadowsocks-libev
echo "Done"
ENCODED=$(echo -n "$CIPHER:$SECRET@$IP:$PORT" | base64 -w 0)
echo ""
echo -e "SS_LINK:\t${RED}ss://$ENCODED#$HOSTNAME${NC}"
echo ""
echo "Copy the above ^^^ link into the Outline app on your phone or computer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment