linux-SSR多用户版配置详解

时间:2023-03-08 21:26:47

前述:好久没有玩服务器,今天有一哥们要浏览下external website,就搭建一个新的服务器(本人用Vultr的Japan2.5$/mon centOs7.0 64位)

嗯,条件差不多了,开始啦。

  1下载安装ssr(这个就用Teddysun大神的一键安装脚本)

  

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/*_install/master/*R.sh
chmod +x *R.sh
./*R.sh 2>&1 | tee *R.log  

  2安装过程有提示就不说了

  3安装好后如果你只需要一个端口

   那恭喜你,下面你可以不用看了。


  4这一步需要安装FlashFXP这个软件(ftp工具),当然也可以不用安装,但用命令行手打真心累,但练习下linux命令也可以

  多用户版配置命令行方式。

启动:/etc/init.d/* start
停止:/etc/init.d/* stop
重启:/etc/init.d/* restart
状态:/etc/init.d/* status

先停止*

/etc/init.d/* stop

  编辑配置文件

vi /etc/*.json

按shift+i 进行编辑

{
"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",//加密方式可以修改也可以不修改本人用chacha20
"protocol": "origin",//协议也是可以修改了本人用auth_sha1 "protocol_param": "", "obfs": "plain",//这里很重要,免流的请注意必须修改,本人用http_simple "obfs_param": "", "redirect": "", "dns_ipv6": false, "fast_open": false, "workers": 1 }
改成上述类似就行,有注释地方请谨慎
再来一张截图吧
linux-SSR多用户版配置详解
编辑完成后按Esc建退出编辑界面
再按shift+;+wq!退出并保存文件
linux-SSR多用户版配置详解

多用户加进去了,但还是只会有一个用户可以使用,因为防火墙规则还是会阻止端口连接。

接下来就是修改防火墙规则了

这里是使用firewalld,不使用iptable

状态:systemctl status firewalld.service

停止防火墙:systemctl stop firewalld

开启防火墙:systemctl start firewalld

停止firefalld

systemctl stop firewalld

命令行下

编辑public.xml文件

vi /etc/firewalld/zones/public.xml

linux-SSR多用户版配置详解

上面添加你想要的端口就行了,一样:wq!

到这里就可以实现多端口访问了。

 最后别忘记启动防火墙和ssr
systemctl start firewalld
/etc/init.d/* start

祝玩的愉快!