Shadowsocks

by hmorris
52 deployments · 25 still active · last rev. 4 months ago

Please feel free to contribute here: https://github.com/hmorris3293/Shadowsocks

please also secure your shadowsocks:
https://github.com/shadowsocks/shadowsocks/wiki/Securing-Public-Shadowsocks-Server

Compatible with: Debian 8, Ubuntu 16.04 LTS, Ubuntu 14.04 LTS
						#!/bin/bash
## 
#<UDF name="shadowip" Label="IP Address" example="123.234.234.123" />
#<UDF name="shadowpasswd" Label="Shadowsocks Password" example="Password" />

apt-get -o Acquire::ForceIPv4=true update -y
sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold"  install grub-pc
apt-get -o Acquire::ForceIPv4=true update -y

apt-get install fail2ban -y

apt-get install python-pip python-m2crypto -y
pip install shadowsocks 

cat <<END >/etc/shadowsocks.json
{
"server":"$SHADOWIP",
"server_port":8000,
"local_port":1080,
"password":"$SHADOWPASSWD",
"timeout":600,
"method":"aes-256-cfb"
}
END

ssserver -c /etc/shadowsocks.json -d start

iptables -I INPUT -p tcp --dport 8000 -j ACCEPT

cat <<END >/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/bin/python /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start
exit 0
END