安装shadowsocks
一. 安装
登录你的vps
安装PIP环境
1
apt-get install python-gevent python-pip
安装
shadowsocks
1
pip install shadowsocks
##2. 配置信息
- 创建
config.json
文件- 进入shadowsocks文件夹:
cd /etc/shadowsocks
- 创建配置文件:
touch config.json
- 进入shadowsocks文件夹:
- 编辑
config.json
- 打开vi编辑器:
vi config.json
按照下列格式填写配置信息
1
2
3
4
5
6
7
8{
"server":"123.123.123.123", # 服务器地址
"server_port":9000, #端口号
"local_port":9000, # 本地端口号
"password":"123456", # 密码
"timeout":600, # 超时时间
"method":"rc4-md5" # 密码类型
}保存并且退出
- 阿里云香港搭shadowsocks服务的注意事项
- 如果服务器是专有网络,
/etc/shadowsocks/config.json
中的server ip
是私有ip,而非公网ip - 服务器实例的安全组规则需要增加 自定义 TCP 在 相关端口(9000) 的访问 ,(允许所有ip访问,设置为0.0.0.0/0)
- 如果服务器是专有网络,
三. 开启服务
- 执行启动服务器:
nohup ssserver -c /etc/shadowsocks/config.json > log &
- 设置开机启动:
/usr/local/bin/ssserver -c /etc/shadowsocks/config.json