——最后更新于2017.10.12 00:50.如因时间过久而失效,请留言指出。
shadowsocksR与shadowsocks的主要区别是混淆、协议。
ShadowsocksR的混淆协议和插件可以欺骗某wall目前的流量匹配功能和QOS限速。
shadowsocksR多用户模式:
安装的大致步骤:
centos:
yum install git
ubuntu/debian:
apt-get install git
git clone https://github.com/hao35954514/shadowsocksR-b.git
执行完毕后,当前的目录会多一个shadowsocksR-b目录。其中shadowsocksR-b的是多用户版(即数据库版,个人用户请忽略这个),子目录中的shadowsocks是单用户版。
apt-get install python-pip //安装Python(ubuntu)-------(centos命令应该为:yum -y install python-pip,下次我试试) cd shadowsocksR-b/ bash initcfg.sh
python server.py -p 443 -k password -m aes-256-cfb -O auth_sha1_v4 -o http_simple
#说明:-p 端口 -k 密码 -m 加密方式 -O 协议插件 -o 混淆插件
命令行后台运行:
python server.py -p 443 -k password -m aes-256-cfb -O auth_sha1_v4 -o http_simple -d start
4.2 使用配置文件运行:
编辑shadowsocksR-b文件夹中的user-config.json文件。具体修改教程:https://github.com/breakwa11/shadowsocks-rss/wiki/config.json
一般情况下,只需要修改以下五项即可:
“server_port”:8388, //端口
“password”:”password”, //密码
“protocol”:”origin”, //协议插件
“obfs”:”http_simple”, //混淆插件
“method”:”aes-256-cfb”, //加密方式
最后运行shadowsocks内的server.py即可:
python server.py
后台运行:
python server.py -d start
其他操作:
python server.py -d stop/restart
示例:
{ "server": "0.0.0.0", "server_ipv6": "::", "local_address": "127.0.0.1", "local_port": 1080, "port_password":{ "8888":"password1", "9999":"password2", "2333":"password3" }, "timeout": 120, "udp_timeout": 60, "method": "aes-128-ctr", "protocol": "auth_aes128_md5", "protocol_param": "", "obfs": "tls1.2_ticket_auth_compatible", "obfs_param": "", "speed_limit_per_con": 0, "speed_limit_per_user": 0, "dns_ipv6": false, "connect_verbose_info": 0, "redirect": "", "fast_open": false }
为每个端口配置不同的混淆协议:
{ "server":"0.0.0.0", "server_ipv6":"::", "local_address":"127.0.0.1", "local_port":1080, "port_password":{ "8388":{"protocol":"auth_simple", "password":"abcde", "obfs":"http_simple", "obfs_param":""}, "8389":{"protocol":"origin", "password":"abcde"} }, "timeout":300, "method":"aes-128-ctr", "protocol": "auth_aes128_md5", "protocol_param": "", "obfs": "tls1.2_ticket_auth_compatible", "obfs_param": "", "speed_limit_per_con": 0, "speed_limit_per_user": 0, "redirect": "", "dns_ipv6": false, "fast_open": false, "workers": 1 }
参数名称 | 描述 | 中文描述 |
---|---|---|
server | the address your server listens | 监听地址 |
server_ipv6 | the ipv6 address your server listens | ipv6地址 |
server_port | server port | 监听端口 |
local_address | the address your local listens | 本地地址 |
local_port | local port | 本地端口 |
password | password used for encryption | SSR密码 |
timeout | in seconds | 超时时间 |
method | default: “aes-128-cft” | 加密方式 |
protocol_param | default:”” | 协议插件参数,可设置每个端口的链接设备数,比如”5″就是一个端口最大5个设备连接 |
protocol | default:”auth_aes128_md5″ | 协议插件,默认”auth_aes128_md5″ |
obfs | default:”tls1.2_ticket_auth_compatible” | 混淆插件,默认”tls1.2_ticket_auth_compatible” |
obfs_param | default:”” | 混淆插件参数,默认”” |
speed_limit_per_con | default:0 | 单线程限速,默认 0,单位KB/S |
speed_limit_per_user | default:0 | 端口总限速,默认 0,单位 KB/S |
redirect | default:”” | 重定向参数,默认”” |
dns_ipv6 | default:false | 是否优先使用IPv6地址,有IPv6时可开启 |
fast_open | use TCP_FASTOPEN, true / false | 快速打开(仅限linux客户端) |
workers | number of workers, available on Unix/Linux | 线程(仅限linux客户端) |
相关:
shadowsocksR客户端(Windows):
链接: http://pan.baidu.com/s/1jHRUmt4 密码: u46d
如果通过以上教程仍然搭建不成功,可以用大逗比的一键脚本(需科学):
以上教程摘选自破娃酱的GitHub:https://github.com/breakwa11/shadowsocks-rss/wiki/Server-Setup
5、6部分参考自逗比
下载了ssr后目录里没有shadowsocksR-b目录啊
“git clone https://github.com/hao35954514/shadowsocksR-b.git”
执行这条命令之后,就会从GitHub下载shadowsocksR-b文件夹。如果你没有,就说明你没有下载成功。看看git安装了没有
2017-11-22 03:49:56 ERROR db_transfer.py:266 Traceback (most recent call last):
File “/root/shadowsocksR-b/db_transfer.py”, line 248, in thread_db
rows = db_instance.pull_db_all_user()
File “/root/shadowsocksR-b/db_transfer.py”, line 373, in pull_db_all_user
import cymysql
ImportError: No module named cymysql
一直卡在这里,请问什么意思,完全不明白
你启用了什么密码方式?如果是chacha20之类的加密需要安装另外的拓展:
https://lighti.me/1785.html
python server.py -d start
IPv6 support
2017-12-02 16:06:11 INFO util.py:85 loading libcrypto from libcrypto.so.1.0.0
2017-12-02 16:06:11 INFO asyncdns.py:324 dns server: [(‘8.8.8.8’, 53)]
2017-12-02 16:06:12 INFO shell.py:72 ShadowsocksR 2.8.2
2017-12-02 16:06:12 INFO db_transfer.py:238 current process RLIMIT_NOFILE resource: soft 1024 hard 1048576
2017-12-02 16:06:12 ERROR db_transfer.py:266 Traceback (most recent call last):
File “/root/shadowsocksR-b/db_transfer.py”, line 248, in thread_db
rows = db_instance.pull_db_all_user()
File “/root/shadowsocksR-b/db_transfer.py”, line 373, in pull_db_all_user
import cymysql
ImportError: No module named cymysql
2017-12-02 16:07:12 ERROR db_transfer.py:266 Traceback (most recent call last):
File “/root/shadowsocksR-b/db_transfer.py”, line 248, in thread_db
rows = db_instance.pull_db_all_user()
File “/root/shadowsocksR-b/db_transfer.py”, line 373, in pull_db_all_user
import cymysql
ImportError: No module named cymysql
你好我也遇到了相似的问题 请问怎解? 加密方法是aes-256-cfb
命令需要在shadowsocksR-b下面的shadowsocks里面执行
git clone https://github.com/hao35954514/shadowsocksR-b.git
Initialized empty Git repository in /root/shadowsocksR-b/.git/
error: while accessing https://github.com/hao35954514/shadowsocksR-b.git/info/refs
fatal: HTTP request failed