Files
3x-ui-agent/README.md
T
2026-10-20 12:35:03 +08:00

57 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 3x-ui-agent
基于 3x-ui v3.7.0 的二次开发:节点 agent 化。节点鸡不再跑完整面板,只跑一个轻量 agent(约 60MB 内存),由主控统一管理、下发 xray 配置。
## 架构
- **主控**:完整 3x-ui 面板,唯一的配置可信源。管理节点、入站、客户端,下发完整 xray 配置(含出站、路由)到各 agent。
- **Agent**:跑在节点鸡上,通过 token 向主控注册。定时拉取主控下发的 xray 配置并应用,上报心跳和流量。只提供 VLESS / SS2022 入站。
## 安装
### 主控
```bash
bash <(curl -fL https://raw.githubusercontent.com/aaaamoooo/3x-ui-diy/main/install-master.sh)
```
装完面板在 `http://主控IP:2053`,默认账号 `admin` / `admin`。
### Agent(节点鸡)
先在主控面板「节点管理」→「添加节点」→ 类型选 **Agent**,保存后弹窗会显示 token,复制下来。
然后在节点鸡上:
```bash
bash <(curl -fL https://raw.githubusercontent.com/aaaamoooo/3x-ui-diy/main/install-agent.sh) \
--master http://主控IP:2053 --token 你的TOKEN --name 节点名
```
agent 约 30 秒后拉到配置并启动 xray,节点在面板显示在线。
## 使用流程
1. 主控面板添加 Agent 类型节点,拿到 token
2. 节点鸡一键安装 agent,填入主控地址和 token
3. 在「入站列表」创建入站(VLESS / SS2022),「部署到」选择在线的 agent 节点
4. 主控自动把完整 xray 配置下发到节点,客户端即可连接
## 内存占用(实测)
| | 内存 |
|---|---|
| agent + xray | 约 63MB |
| 完整 3x-ui 面板 | 130–160MB |
## 与原版的区别
- 节点不再需要安装完整面板
- 主控是唯一可信源,节点配置全部由主控下发
- 节点在线状态由 agent 心跳维持
- 添加节点支持 Agent 类型,自动生成注册 token
## License
GPL-3.0(继承上游 3x-ui)