Skip to content

Instantly share code, notes, and snippets.

@xuyuji9000
Forked from zhiguangwang/README.md
Created December 21, 2024 22:46
Show Gist options
  • Save xuyuji9000/fdb7166ccd2c296ccddcc524e64775d1 to your computer and use it in GitHub Desktop.
Save xuyuji9000/fdb7166ccd2c296ccddcc524e64775d1 to your computer and use it in GitHub Desktop.
Installing and running shadowsocks on Ubuntu Server

Installing and running shadowsocks on Ubuntu Server

  1. Run install.sh to install Shadowsocks.

  2. Put ss.json, start.sh, stop.sh under /var/shadowsocks/.

  3. Replace server_port and password in ss.json with your own choices.

  4. Put the following in /etc/rc.local to start ssserver upon server start.

# Start shadowsocks server
/var/shadowsocks/start.sh
#!/bin/bash
sudo apt-get update
sudo apt-get install python-pip
sudo pip install shadowsocks
{
"server": "0.0.0.0",
"server_port": [port],
"password": "[password]",
"timeout": 300,
"method": "aes-256-cfb",
"fast_open": true
}
#!/bin/bash
sudo /usr/local/bin/ssserver -c /var/shadowsocks/ss.json --user nobody -qq -d start
#!/bin/bash
sudo /usr/local/bin/ssserver -c /var/shadowsocks/ss.json -d stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment