ShadowsocksR 单用户版安装教程

9,910 views次阅读
没有评论

ShadowsocksR 单用户版安装教程

Shadowsocks原作者被喝茶 放弃此项目,由ShadowsocksR作者接手,所以以后只能转成SSR的服务端和客户端了。

本教程转自github,由ShadowsocksR作者编写!

 

基本安装

以下命令均以root用户执行,或sudo方式执行

centos:

yum update

yum install git -y

 

ubuntu/debian:

apt-get update

apt-get install git -y

 

Chacha20

如果要使用Chacha20 chacha20-ietf 等加密方式,请安装 libsodium

 

获取源码

git clone -b manyuser https://github.com/shadowsocksr/shadowsocksr.git

 

执行完毕后此目录会新建一个shadowsocksr目录

子目录中的是单用户版(即shadowsocksr/shadowsocks)

 

根目录即 shadowsocksr

子目录即 shadowsocksr/shadowsocks

 

配置ShadowsocksR

进入 ShadowsocksR根目录:

cd shadowsocksr

 

初始化配置:

bash initcfg.sh

 

使用配置文件运行ShadowsocksR

打开根目录的 user-config.json 文件,修改配置内容。

默认配置如下:

{
"server": "0.0.0.0",
"server_ipv6": "::",
"server_port": 8388,
"local_address": "127.0.0.1",
"local_port": 1080,

"password": "m",
"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,

"additional_ports" : {}, // only works under multi-user mode
"additional_ports_only" : false, // only works under multi-user mode
"timeout": 120,
"udp_timeout": 60,
"dns_ipv6": false,
"connect_verbose_info": 0,
"redirect": "",
"fast_open": false
}

 

参数说明:

[code]"server_port":8388, //端口
"password":"password", //密码
"protocol":"origin", //协议插件
"obfs":"http_simple", //混淆插件
"method":"aes-128-ctr", //加密方式[/code]

按照自己需要的配置一下就可以了,至于使用什么方法去打开这个文件,修改这个文件不在本文讨论范围。

 

赋予脚本运行权限

进入子目录即 shadowsocksr/shadowsocks

chmod +x *.sh

 

启动服务测试ShadowsocksR

./logrun.sh

 

使用客户端测一下是否已经正常可以使用,如果不行查看上面的配置文件,修改相应项目。

 

ShadowsocksR开机启动

通过上面的配置,ShadowsocksR已经可以正常使用,但服务器重启后,ShadowsocksR将不会自动开启,所以需要设置开机启动。

Cent OS 系统:

/etc/rc.d/rc.local

在上面配置文件的最后加入:

/bin/bash /root/shadowsocksr/shadowsocks/logrun.sh

 

Ubuntu/Debian 系统:

/etc/rc.local

在上面配置文件最后的 exit 0 前面加入:

/bin/bash /root/shadowsocksr/shadowsocks/logrun.sh

 

配置多用户端口

修改根目录即 shadowsocksr 下的 user-config.json文件:

{
"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
}

 

更新ShadowsocksR源代码

进入根目录即 shadowsocksr

git pull

成功后重启SS服务就可以了

 

备注

如果你的服务端python版本在2.6以下,那么必须更新python到 2.7.x 版本

正文完
 0
HopoL
版权声明:本站原创文章,由 HopoL 于2017-06-23发表,共计2256字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)

HopoL's Blog

文章搜索
最新评论
HopoL HopoL Yeah, back in the older Unraid versions, some folks managed to get it booting from drives like SATA or NVMe by compiling the software themselves. But that method never got updated or maintained afterward, so it might not work with the current setups. Hope that helps!
MickeyDee MickeyDee Slightly off topic but anyone managed to get Unraid to boot off anything other than USB, like sata or nvme? If wrong place please delete and advise
Mrg Mrg I cannot Thank you enough. Thank you , Thank you , Thank you.
阿龙 阿龙 谢谢大佬分享
MickeyDee MickeyDee Cancell that, figured it out and it works, Much appriciated .
MickeyDee MickeyDee Hi Thanks for sharing, please clarify, do you mean Rename the folder "unraider-7.2.0" to unraider and copy it to the config . Thanks
lzdwudi lzdwudi 我也想试试 但我目前的版本是6.12.13 我不敢做大的动作
wice222 wice222 archive is demaged
tstUser01 tstUser01 Thanks for sharing!
saisu saisu how to install from scratch for noobs like me please :D What is GUID ??