Ubuntu服务器安装shadowsocks穿墙

  1. 需要一台服务器, Linux系统

  2. 使用ssh连接到服务器

1
$ ssh <ip> -p <port> 
  1. ssh连接成功后安装shadowsocks多用户服务(脚手架献上)
1
2
3
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-go.sh 
chmod +x shadowsocks-go.sh
./shadowsocks-go.sh 2>&1 | tee shadowsocks-go.log

成功后的样子

1
2
3
4
5
6
7
8
Congratulations, shadowsocks-go install completed!
Your Server IP:your_server_ip
Your Server Port:your_server_port
Your Password:your_password
Your Local Port:1080
Your Encryption Method:aes-256-cfb
Welcome to visit:http://teddysun.com/392.html
Enjoy it!
  1. 配置账号
1
$ vi /etc/shadowsocks/config.json

4.1 单账号配置

1
2
3
4
5
6
7
8
{
"server":"0.0.0.0",
"server_port":8989,
"local_port":1080,
"password":"xxx",
"method":"rc4-md5",
"timeout":300
}

4.2 多账号配置

1
2
3
4
5
6
7
8
9
10
11
12
{
"server":"0.0.0.0",
"port_password":{
"8989":"password0",
"9001":"password1",
"9002":"password2",
"9003":"password3",
"9004":"password4"
},
"method":"aes-256-cfb",
"timeout":600
}
  1. shadowsocks服务的日常基操
1
2
3
4
5
6
7
8
# 启动:
$ /etc/init.d/shadowsocks start
# 停止:
$ /etc/init.d/shadowsocks stop
# 重启:
$ /etc/init.d/shadowsocks restart
# 状态:
$ /etc/init.d/shadowsocks status