1.6 KiB
1.6 KiB
NexusGate(二开版)
基于 NexusGate v0.6.8 的二次开发:3x-ui 式共享节点 + 全面 sing-box 化。主控面板和 Agent 弃用 xray,只用 sing-box,内存占用大幅降低。
架构
- 主控:Node.js 面板(约 61MB),跑在 OpenWrt 路由器或任意 Linux 上。管理节点、客户、订阅,下发配置到各 Agent。
- Agent:跑在节点机上,通过 token 注册。管理 sing-box 进程,上报心跳和按用户流量。
与原版的区别
- 移除 VMess 协议
- 3x-ui 式共享节点:nodes 状态机 + 每个客户独立凭据(
ng:<customerId>身份) - 全面 sing-box:不再捆绑 xray
- 按用户流量统计:AnyTLS 走日志解析,SS 走节点级
- 内存优化:面板
node --max-old-space-size=128,agent 64M,sing-boxGOMEMLIMIT=64MiB
安装
主控
# 克隆仓库
git clone https://github.com/imamoxilin/NexusGate.git /opt/nexusgate
cd /opt/nexusgate
# 安装依赖并启动
node --max-old-space-size=128 --optimize-for-size server.js
面板地址:http://IP:8787,默认账号 admin。
OpenWrt 上用 procd 常驻,见 scripts/ 目录。
Agent(节点机)
bash <(curl -fL https://raw.githubusercontent.com/imamoxilin/NexusGate/main/scripts/agent-install.sh) \
--master http://主控IP:8787 --token 你的TOKEN --name 节点名
支持的协议
VLESS / SS2022 / SS经典 / SOCKS5 / Hysteria2 / AnyTLS
内存占用(实测)
| 组件 | 内存 |
|---|---|
| 主控面板 | 约 61MB |
| Agent | 约 30MB |
| sing-box | 约 64MB |
License
继承上游 NexusGate