Last active
November 26, 2021 06:53
-
-
Save sh1n0b1/3a2b58db967262097ee06d7ca2b85e21 to your computer and use it in GitHub Desktop.
Shadowsocks Server deployment script for Debian 9 - Tools to bypass internet censorship
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/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