参考:
- https://juejin.im/post/5b13f92151882513ad321a3e
- http://www.bioinfo-scrounger.com/archives/490
- https://www.zybuluo.com/gongzhen/note/472805
- https://gist.github.com/3013216027/469e7b988edde7e5f806f55a993b9efa
- https://medium.com/@moreless/%E4%BD%BF%E7%94%A8shadowsocks%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91-87ac5efecd8a
- 注册成功后,绑定信用卡,授权1USD(冻结1USD)以验证身份
- 生成密钥,本地连接
ssh -i "example.pem" ubuntu@ec2-**-**-***-**.us-east-2.compute.amazonaws.com
- 下面进行shadowsocks的设置安装
# 查看python版本,安装“python-setuptools”,以及“pip”
$ sudo apt install python-setuptools
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py
$ pip install shadowsocks
# 如果报错,可以google解决,也可以更新下shadowsocks看看
$ sudo pip install -U git+https://github.com/shadowsocks/shadowsocks.git@master
# 配置下shadowsocks.json文件,然后进行启动
$ ssserver -c ./shadowsocks.json -d start --log-file ./ss.log --pid-file ./ss.pid
- shadowsocks配置文件,实例列表处有私有ip,自定义端口,比如“7878”;还有自定义密码
{
"server": "*.*.*.*", --- 填写“私有”IP
"server_port": **, --- 自定义对外端口
"local_address": "127.0.0.1",
"local_port": 1080,
"password": "****", --- 密码
"timeout": 300, --- 超时时间
"method": "aes-256-cfb", --- 加密方式
"fast_open": false --- 要开启需要服务端和客户端都是 linux 3.7+,不确定就设置为false
}
- 点击实例列表,添加设置端口规则
- 电脑设置公网ip,和设置的端口及密码,安装设置shadowsocks客户端,最后记得右键图标启动
自己遇到的问题
- 服务器端shadowsocks启动失败,通过更新shadowsocks,启动成功
- 增加新的端口规则,来源,选自定义“0.0.0/0”
- 客户端启动没有右键启动
启动命令报错,可以去掉后面注释
{
"server": "*...",
"server_port": *,
"local_address": "127.0.0.1",
"local_port": 1080,
"password": "*******",
"timeout": 300,
"method": "aes-256-cfb",
"fast_open": false
}