lqh9724:
规划
最近尝试了一些面板综合体验以后认为 xboard 最适合使用,摸索过程中网上完整的前后端对接的说明太少,很多说明还不完整,搭建过程踩了不少坑,总结一下经验分享;
声明楼主不是机场主,只是很多朋友需要使用,因为分发过程麻烦,索性搭建一个在线自助服务
直接上干货
面板部署
官方文档:xboard wiki
git clone -b compose --depth 1 https://github.com/cedar2025/Xboard
- 自用面板可以选择默认的 SQlite 数据库
- 第二步自定义管理员邮箱
- 最终输出管理员邮箱、密码、后台管理路径
cd Xboard
docker compose run -it --rm web php artisan xboard:install
# 完成上述设置以后启动面板
docker compose up -d
- 创建反代网站,反代 7001 端口并配置 ssl 证书
- 系统配置--站点配置:订阅 URL 填面板网址 | 站点地址填面板网址 | 勾选强制 https
- 安全设置:建议勾选安全模式并且设置更复杂的后台管理路径
- 节点配置:自定义一个通讯密钥,长度建议不低于 32 位大小写字母&数字组合
- 其余设置视情况修改或者保持默认即可
- 权限组管理:新建一个权限组
- 节点管理:按照提示设置节点名称、分配权限组、设置节点参数,以 vless&reality 为例
- 连接端口&服务端口:没特殊需求就设置为同样的
- 安全性:选择 reality ,其余参数自行设置,可以点击按钮随机生成
- 流控:选择 xtls-rprx-vision
- 保存以后勾选“显隐”开关
- 在套餐管理中新建套餐,服务器分组选择上一步建立的分组,其余的参数看喜好设置
- 这里开始就是一个大坑,必须有至少一个用户订阅了套餐才能完成 xrayr 的后端对接
- 编辑一个用户,设置足够的余额,打开面板用户端(删掉管理后台的路径就是用户端)订阅上一步设置的套餐完成付款,测试能否正常获取订阅链接,一切正常的话 xboard 面板设置到此为止
后端对接
项目地址:xrayr
通过xrayr
可以唤起脚本功能列表
wget -N https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh && bash install.sh
- 安装完成以后先选择一键安装 bbr 功能和开机自启功能
- 退出脚本执行
rm -rf /etc/XrayR/config.yml
删除默认配置
- 执行
nano /etc/XrayR/config.yml
新建 xrayr 配置文件,参考下方配置文件自行调整参数后粘贴保存
- 这是一份适用于 vless&reality 协议的配置文件,许多需要调整的参数已完成调整,仅需要在”ApiConfig“模块中找到中文备注的位置修改参数即可
- 若是需要其他依赖 ssl 证书的协议,自行修改”CertConfig“模块的配置即可
- 完成以后执行
xrayr
打开选项面板,重启服务即可
- 最后推荐一个 vps ,三网各走各自的专线线路,G 口带宽,每月 35cny:asia yun,链接带 aff ,不喜欢 aff 可以不点击链接,直接搜索 asia yun 也可以找到,需要实名认证,遵守服务器所在地的相关法规,已与客服确认过可用,无主动审查;建议月付,留点心低调用;发文这会在用美国大带宽精品机器,50cny/月配合 7 折优惠码 35cny/月
Log:
Level: warning # Log level: none, error, warning, info, debug
AccessPath: # /etc/XrayR/access.Log
ErrorPath: # /etc/XrayR/error.log
DnsConfigPath: # /etc/XrayR/dns.json # Path to dns config, check https://xtls.github.io/config/dns.html for help
RouteConfigPath: # /etc/XrayR/route.json # Path to route config, check https://xtls.github.io/config/routing.html for help
InboundConfigPath: # /etc/XrayR/custom_inbound.json # Path to custom inbound config, check https://xtls.github.io/config/inbound.html for help
OutboundConfigPath: # /etc/XrayR/custom_outbound.json # Path to custom outbound config, check https://xtls.github.io/config/outbound.html for help
ConnectionConfig:
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, kB
Nodes:
- PanelType: "NewV2board" # Panel type: SSpanel, NewV2board, PMpanel, Proxypanel, V2RaySocks, GoV2Panel, BunPanel
ApiConfig:
ApiHost: "https://你的 xboard 面板网址"
ApiKey: "xboard 面板系统设置--节点配置中设置的通讯密钥"
NodeID: 1 # 这里的数字是 xboard 面板添加的节点 id ,可以在节点管理中查看 id
NodeType: V2ray # Node type: V2ray, Vmess, Vless, Shadowsocks, Trojan, Shadowsocks-Plugin
Timeout: 30 # Timeout for the api request
EnableVless: true # Enable Vless for V2ray Type
VlessFlow: "xtls-rprx-vision" # Only support vless
SpeedLimit: 0 # Mbps, Local settings will replace remote settings, 0 means disable
DeviceLimit: 0 # Local settings will replace remote settings, 0 means disable
RuleListPath: # /etc/XrayR/rulelist Path to local rulelist file
DisableCustomConfig: true # disable custom config for sspanel
ControllerConfig:
ListenIP: 0.0.0.0 # IP address you want to listen
SendIP: 0.0.0.0 # IP address you want to send pacakage
UpdatePeriodic: 60 # Time to update the nodeinfo, how many sec.
EnableDNS: true # Use custom DNS config, Please ensure that you set the dns.json well
DNSType: UseIPv4 # AsIs, UseIP, UseIPv4, UseIPv6, DNS strategy
EnableProxyProtocol: false # Only works for WebSocket and TCP
AutoSpeedLimitConfig:
Limit: 0 # Warned speed. Set to 0 to disable AutoSpeedLimit (mbps)
WarnTimes: 0 # After (WarnTimes) consecutive warnings, the user will be limited. Set to 0 to punish overspeed user immediately.
LimitSpeed: 0 # The speedlimit of a limited user (unit: mbps)
LimitDuration: 0 # How many minutes will the limiting last (unit: minute)
GlobalDeviceLimitConfig:
Enable: false # Enable the global device limit of a user
RedisNetwork: tcp # Redis protocol, tcp or unix
RedisAddr: 127.0.0.1:6379 # Redis server address, or unix socket path
RedisUsername: # Redis username
RedisPassword: YOUR PASSWORD # Redis password
RedisDB: 0 # Redis DB
Timeout: 5 # Timeout for redis request
Expiry: 60 # Expiry time (second)
EnableFallback: false # Only support for Trojan and Vless
FallBackConfigs: # Support multiple fallbacks
- SNI: # TLS SNI(Server Name Indication), Empty for any
Alpn: # Alpn, Empty for any
Path: # HTTP PATH, Empty for any
Dest: 80 # Required, Destination of fallback, check https://xtls.github.io/config/features/fallback.html for details.
ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for disable
DisableLocalREALITYConfig: true # disable local reality config
EnableREALITY: true # Enable REALITY
REALITYConfigs:
Show: true # Show REALITY debug
Dest: www.amazon.com:443 # Required, Same as fallback
ProxyProtocolVer: 0 # Send PROXY protocol version, 0 for disable
ServerNames: # Required, list of available serverNames for the client, * wildcard is not supported at the moment.
- www.amazon.com
PrivateKey: YOUR_PRIVATE_KEY # Required, execute './XrayR x25519' to generate.
MinClientVer: # Optional, minimum version of Xray client, format is x.y.z.
MaxClientVer: # Optional, maximum version of Xray client, format is x.y.z.
MaxTimeDiff: 0 # Optional, maximum allowed time difference, unit is in milliseconds.
ShortIds: # Required, list of available shortIds for the client, can be used to differentiate between different clients.
- ""
- 0123456789abcdef
CertConfig:
CertMode: none # Option about how to get certificate: none, file, http, tls, dns. Choose "none" will forcedly disable the tls config.
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.key
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