前言
关于V2board的后端对接,官方的文档并没有提供详细的教程,同时大多数人使用的是第三方客户端,很难找到时效性较高的部署教程,所以不能抄,就只能自己摸了。本文将展示咱在对接XrayR与V2board中的各种踩坑记录(谢谢,人已经踩麻了)。
XrayR是一个为数不多免费且永久开源的后端项目(白嫖党狂喜),相比一些付费项目,XrayR的安装配置过程简单,自带的功能齐全,并且开发组也在持续对项目进行更新。
环境
- V2board版本:v1.7.0
- XrayR后端版本:v0.8.8
本文的后端部署操作在CentOS7-8/Debian8-11系统下均实测成功。
部署所用的VPS配置为Azure云 1H1G
相关项目链接
v2board设置
进入v2board后台,默认后台地址为admin(建议在正式投入使用前修改),使用管理员账户登录
1.设置通讯密钥
在后台▪系统配置»节点▪ 处设置通讯密钥,一段随机的字符串
2.添加节点
在后台▪节点管理▪,点击左上角加号按钮,选择shadowsocks
设置参考
输入节点名称,添加权限组
节点地址:节点服务器所绑定的域名
连接端口:用户连接节点服务器的端口,建议在20000-60000里随便选
服务端口:节点服务器开放给用户连接的端口,一般情况下可以和连接端口一样
加密算法:节点服务器与用户直接传输所用的加密协议
节点服务器
下面开始节点服务器的相关操作,以下操作均在root权限下进行
1.更新系统
如果你使用的是CentOS系统,请使用
yum update
如果你使用的是Debian系统,请使用
apt-get update
2.关闭防火墙(重要)
节点服务器需要使用端口来发出/接收用户数据,而防火墙可能会拦截相关数据
CentOS关闭防火墙命令
systemctl stop firewalld.service
systemctl disable firewalld.service
Debian关闭防火墙命令
apt-get install ufw
ufw disable
3.安装宝塔面板(可选)
安装宝塔面板主要是为了方便修改XrayR配置文件,如果你有其他ftp工具可以省略此步骤
宝塔面板官网提供了不同系统的安装脚本
https://www.bt.cn/new/download.html
4.安装XrayR
准备工作完毕
使用官方提供的一键脚本
bash <(curl -Ls https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh)
5.安装加速内核
XrayR官方控制脚本中已经内置了自动安装命令
XrayR
安装后会提醒你重启VPS
6.修改配置文件
XrayR默认的配置文件在etc/XrayR
默认的config.yml
Log: Level: warning # Log level: none, error, warning, info, debug AccessPath: # /etc/XrayR/access.Log ErrorPath: # /etc/XrayR/error.logDnsConfigPath: # /etc/XrayR/dns.json # Path to dns config, check https://xtls.github.io/config/dns.html for helpRouteConfigPath: # /etc/XrayR/route.json # Path to route config, check https://xtls.github.io/config/routing.html for helpInboundConfigPath: # /etc/XrayR/custom_inbound.json # Path to custom inbound config, check https://xtls.github.io/config/inbound.html for helpOutboundConfigPath: # /etc/XrayR/custom_outbound.json # Path to custom outbound config, check https://xtls.github.io/config/outbound.html for helpConnectionConfig: Handshake: 4 # Handshake time limit, Second ConnIdle: 30 # Connection idle time limit, Second UplinkOnly: 2 # Time limit when the connection downstream is closed, Second DownlinkOnly: 4 # Time limit when the connection is closed after the uplink is closed, Second BufferSize: 64 # The internal cache size of each connection, kBNodes: - PanelType: "V2board" # Panel type: SSpanel, V2board, NewV2board, PMpanel, Proxypanel, V2RaySocks ApiConfig: ApiHost: "https://proxy.baios.net" ApiKey: "baiguguyigefenziwuidproxy" NodeID: 5 NodeType: Shadowsocks # Node type: V2ray, Shadowsocks, Trojan Timeout: 30 # Timeout for the api request EnableVless: false # Enable Vless for V2ray Type EnableXTLS: false # Enable XTLS for V2ray and Trojan SpeedLimit: 0 # Mbps, Local settings will replace remote settings DeviceLimit: 0 # Local settings will replace remote settings ControllerConfig: ListenIP: 0.0.0.0 # IP address you want to listen UpdatePeriodic: 10 # Time to update the nodeinfo, how many sec. EnableDNS: false # Use custom DNS config, Please ensure that you set the dns.json well CertConfig: CertMode: none # Option about how to get certificate: none, file, http, dns CertDomain: "node1.test.com" # Domain to cert CertFile: /etc/XrayR/cert/node1.test.com.cert # Provided if the CertMode is file KeyFile: /etc/XrayR/cert/node1.test.com.pem Provider: alidns # DNS cert provider, Get the full support list here: https://go-acme.github.io/lego/dns/ Email: test@me.com DNSEnv: # DNS ENV option used by DNS provider ALICLOUD_ACCESS_KEY: aaa ALICLOUD_SECRET_KEY: bbb
常见的问题
节点显示黄色/连接不上
请检查服务器防火墙是否关闭,服务器厂商是否放行了节点端口
检测节点可以使用tcp.ping.pe
XrayR显示未启动/启动失败
1.请检查你配置文件的格式,内容是否正确
2.检查面板服务器和节点服务器之间是否能正常通讯
Comments | NOTHING