docs: vendor the documentation site into the monorepo

Fold the standalone 3x-ui-docs project (Next.js 16 + Fumadocs, deployed to
docs.sanaei.dev) into docs/ so the panel and its documentation share a single
source of truth, the way sing-box keeps its docs in-tree. The old repo becomes
redundant and can be retired.

- Import the full site under docs/ (app, components, content, lib, public,
  scripts, config). The self-contained pnpm project sits alongside the existing
  engineering notes with no filename collisions.
- Re-point "Edit on GitHub" links from MHSanaei/3x-ui-docs to this repo's
  docs/content/docs path (docs/lib/shared.ts, docs/app/.../page.tsx).
- Add docs-ci.yml and docs-deploy.yml under .github/workflows/, scoped to
  docs/** and run with working-directory: docs, since GitHub only runs
  workflows from the repo-root .github/. deploy-static.yml's GitHub Pages
  publish (CNAME docs.sanaei.dev) carries over unchanged.

Follow-up (outside this commit): attach the docs.sanaei.dev custom domain to
this repository's Pages (or set the Vercel project's root directory to docs),
confirm the site is live from the monorepo, then delete MHSanaei/3x-ui-docs.
This commit is contained in:
MHSanaei
2026-07-07 23:07:14 +02:00
parent 2c49dbf54e
commit 9b91f0f42e
283 changed files with 44179 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
---
title: 客户端
description: 管理 3x-ui 客户端——凭据、流量与到期限制、IP 限制、分组、批量操作、外部链接以及在线状态。
icon: Users
---
**客户端**是由唯一的**电子邮箱**标识的单个用户。在当前版本的
面板中,客户端是一等记录,可以同时关联到**多个入站**,并对每个客户端单独进行流量统计。
## 客户端字段
| 字段 | 适用于 | 含义 |
| -------------- | --------------------- | ------------------------------------------------------------------ |
| **Email** | 全部 | 用于统计和查询的唯一标识符。 |
| **ID (UUID)** | VLESS、VMess | 客户端凭据。 |
| **Password** | Trojan、Shadowsocks | 客户端凭据。 |
| **Auth** | Hysteria2 | 客户端凭据。 |
| **Flow** | VLESS | XTLS 流控,例如 `xtls-rprx-vision`。 |
| **Limit IP** | 全部 | 最大同时连接的源 IP 数量(通过 Fail2ban 强制执行)。 |
| **Total (GB)** | 全部 | 流量配额;用尽后客户端将被禁用。 |
| **Expiry** | 全部 | 该日期之后客户端停止工作。 |
| **Reset** | 全部 | 以**天**为单位的自动续期周期(滚动重置配额)。 |
| **Telegram ID**| 全部 | 将客户端关联到 Telegram 用户,用于自助服务/通知。 |
| **Sub ID** | 全部 | 用于对该客户端链接分组的订阅标识符。 |
| **Group** | 全部 | 可选的客户端分组,便于组织管理和批量筛选。 |
| **Comment** | 全部 | 自由文本备注。 |
<Callout type="info">
达到**流量**或**到期**限制会禁用客户端;当客户端被自动禁用时,面板可以
自动重启 Xray(`restartXrayOnClientDisable`,默认开启)。
</Callout>
## 限制与 IP 控制
- **流量 / 到期**上限达到时会禁用客户端;**Reset** 周期可
自动续期配额。
- **Limit IP** 限制同时连接的源 IP 数量。其强制执行依赖于 Fail2ban——
参见 [安全](/docs/operations/security)。你可以查看某个客户端最近使用的 IP,
并从该客户端的操作中清除它们。
- 系统会按客户端(在多节点部署中还会按节点)跟踪**在线状态**和**最后在线**时间。
## 分享链接与外部链接
每个客户端都有针对其各入站的分享链接和二维码,外加一个合并的
[订阅](/docs/config/subscription)。你还可以为客户端附加**外部
链接**——额外的 `vless://`、`vmess://`、`trojan://`、`ss://`、
`hysteria2://` 或 `wireguard://` 链接,或一个远程订阅 URL——使它们
与面板生成的链接一起出现在该客户端的订阅中。
要查看链接的确切内容,可将其粘贴到
[分享链接检查器](/docs/config/share-links)中。
## 批量操作
为便于一次性管理大量客户端,面板支持批量**创建、启用、
禁用、删除、关联/解除关联**(到入站)、**重置流量**以及
**调整**(增加天数 / 增加字节 / 设置 flow)。维护操作还允许你
删除**已耗尽**的客户端(配额/到期用尽)和**孤立**的客户端
(未关联到任何入站)。
<Callout type="warn">
客户端的分享链接包含其凭据。请像对待密码一样对待链接和二维码,
一旦泄露应立即轮换凭据。
</Callout>