- A+
所属分类:技术文档
ShadowsocksR是breakwa11发起的shadowsocks分支,在shadowsocks的基础上增加了一些数据混淆方式,修复了部分安全问题并可以提高QoS优先级。后来贡献者Librehat也为shadowsocks补上了一些此类特性,甚至增加了类似Tor的可插拔传输层功能–wiki。
SSR脚本fork自github,这里介绍一下安装。本脚本适用环境:
系统支持:CentOS,Debian,Ubuntu
内存要求:≥128M
1.下载脚本,安装
需要用到wget工具,wget 其实是一个从网络上自动下载文件的自由工具。系统没有的话根据系统使用下面的命令:
Shell
- #for CentOS/Redhat
- yum -y install wget screen curl python
- #for Debian/Ubuntu
- apt-get -y install wget screen curl python
1.使用wget命令下载脚本。
Shell
- #下载脚本
- wget --no-check-certificate https://raw.githubusercontent.com/wcmbeta/shadowsocks_install/master/shadowsocksR.sh
- #赋予脚本执行权限
- chmod +x shadowsocksR.sh
- #执行脚本,输出到log文件
- ./shadowsocksR.sh 2>&1 | tee shadowsocksR.log
2.填写节点配置信息
接上一步的执行脚本,根据提示填写资料完成安装,输入数字选择或者按回车使用默认配置。
Shell
- #############################################################
- # One click Install ShadowsocksR Server #
- # Intro: http://www.feiyu2.com #
- # Author: Teddysun <i@teddysun.com> #
- # Github: https://github.com/shadowsocksr/shadowsocksr #
- #############################################################
- Please input password for ShadowsocksR:(节点密码)
- (Default password: feiyu2.com):942420
- ---------------------------
- password = 942420
- ---------------------------
- Please input port for ShadowsocksR [1-65535]:(节点端口)
- (Default port: 8989):444
- ---------------------------
- port = 444
- ---------------------------
- Please select stream cipher for ShadowsocksR:(加密算法)
- 1) none
- 2) aes-256-cfb
- 3) aes-192-cfb
- 4) aes-128-cfb
- 5) aes-256-cfb8
- 6) aes-192-cfb8
- 7) aes-128-cfb8
- 8) aes-256-ctr
- 9) aes-192-ctr
- 10) aes-128-ctr
- 11) chacha20-ietf
- 12) chacha20
- 13) rc4-md5
- 14) rc4-md5-6
- Which cipher you'd select(Default: aes-256-cfb):2
- ---------------------------
- cipher = aes-256-cfb
- ---------------------------
- Please select protocol for ShadowsocksR:(混淆协议)
- 1) origin
- 2) verify_deflate
- 3) auth_sha1_v4
- 4) auth_sha1_v4_compatible
- 5) auth_aes128_md5
- 6) auth_aes128_sha1
- 7) auth_chain_a
- 8) auth_chain_b
- Which protocol you'd select(Default: origin):
- ---------------------------
- protocol = origin
- ---------------------------
- Please select obfs for ShadowsocksR:(混淆obfs)
- 1) plain
- 2) http_simple
- 3) http_simple_compatible
- 4) http_post
- 5) http_post_compatible
- 6) tls1.2_ticket_auth
- 7) tls1.2_ticket_auth_compatible
- 8) tls1.2_ticket_fastauth
- 9) tls1.2_ticket_fastauth_compatible
- Which obfs you'd select(Default: plain):
- ---------------------------
- obfs = plain
- ---------------------------
- Press any key to start...or Press Ctrl+C to cancel
安装完成,查看运行状态。
Shell
- /etc/init.d/shadowsocks status
- #结果
- ShadowsocksR (pid xxx) is running...
tips:脚本安装完成后,已将 ShadowsocksR 自动加入开机自启动。
4.命令和目录
- 卸载、重启等相关命令:
- Shell
- 卸载:./shadowsocksR.sh uninstall
- 启动:/etc/init.d/shadowsocks start
- 停止:/etc/init.d/shadowsocks stop
- 重启:/etc/init.d/shadowsocks restart
- 状态:/etc/init.d/shadowsocks status
- 相关文件路径:
- 配置文件路径:/etc/shadowsocks.json
- 日志文件路径:/var/log/shadowsocks.log
- 代码安装目录:/usr/local/shadowsocks
- 多用户配置示例:
- Shell
- {
- "server":"0.0.0.0",
- "server_ipv6": "[::]",
- "local_address":"127.0.0.1",
- "local_port":1080,
- "port_password":{
- "8989":"password1",
- "8990":"password2",
- "8991":"password3"
- },
- "timeout":300,
- "method":"aes-256-cfb",
- "protocol": "origin",
- "protocol_param": "",
- "obfs": "plain",
- "obfs_param": "",
- "redirect": "",
- "dns_ipv6": false,
- "fast_open": false,
- "workers": 1
- }
相关下载: