Skip to content

Instantly share code, notes, and snippets.

@ihciah
Created April 5, 2016 03:15
Show Gist options
  • Save ihciah/cdf7f9263b28b7ff0b1cf094febc4eba to your computer and use it in GitHub Desktop.
Save ihciah/cdf7f9263b28b7ff0b1cf094febc4eba to your computer and use it in GitHub Desktop.
shadowsocks quick install
#!/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