Created
April 5, 2016 03:15
-
-
Save ihciah/cdf7f9263b28b7ff0b1cf094febc4eba to your computer and use it in GitHub Desktop.
shadowsocks quick install
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/sh | |
sudo apt-get -y install curl python-pip | |
sudo pip install shadowsocks | |
sudo mkdir /etc/shadowsocks | |
printf "=====\nEnter your shadowsocks password\n=====\n" | |
read password | |
printf "=====\nEnter your shadowsocks port(>1024)\n=====\n" | |
read port | |
printf "\nConfigure shadowsocks with password: $password and at port: $port\n" | |
printf "{\n\t\"server\":\"::\",\n\t\"server_port\":$port,\n\t\"local_port\":10800,\n\t\"password\":\"$password\",\n\t\"timeout\":600,\n\t\"method\":\"rc4-md5\"\n}" | sudo tee /etc/shadowsocks/config.json > /dev/null | |
sudo apt-get -y install python-m2crypto supervisor | |
printf "[program:shadowsocks]\ncommand=`which ssserver` -c /etc/shadowsocks/config.json\nautorestart=true\nuser=nobody" | sudo tee /etc/supervisor/conf.d/shadowsocks.conf > /dev/null | |
sudo service supervisor start | |
sudo supervisorctl reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo sh -c "$(wget https://gist.github.com/ihciah/cdf7f9263b28b7ff0b1cf094febc4eba/raw/c92c11ca0ef7b52ac079e179ab036134e84a6708/ss_install.sh -O -)"