Skip to content

Instantly share code, notes, and snippets.

@sh1n0b1 sh1n0b1/shadowsocks.sh
Last active Jan 31, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.