+ + {appName} + +
+{m.tagline}
+ +
+
+
+
+ The official documentation and product site for + 3x-ui — + an advanced web panel for managing Xray-core servers. +
+ + + ++ Read the docs → +
+ +--- + +## Overview + +This directory (`docs/` in the [3x-ui](https://github.com/MHSanaei/3x-ui) monorepo) contains +the source for [docs.sanaei.dev](https://docs.sanaei.dev) — a static-first documentation and +marketing site built with [Fumadocs](https://fumadocs.dev) on Next.js. It has **no backend, +no database, and no auth**: every page is prerendered and every tool runs entirely in the +browser. + +## What's inside + +The documentation walks you through 3x-ui from first install to day-to-day operation: + +- **Getting Started** — installation, first login, and updating or uninstalling the panel. +- **Configuration** — the panel, inbounds, REALITY, transports, clients, subscriptions, and share links. +- **Operations** — reverse proxy, multi-node setups, outbounds & routing, backup/restore, the Telegram bot, and security. +- **Reference** — environment variables, the database, ports & firewall, and the HTTP API. +- **Help** — troubleshooting, FAQ, migration, and how to contribute. + +## Interactive tools + +The site ships with in-browser helpers that generate configuration for you — **no data +ever leaves your browser**: + +| Tool | What it does | +| ---------------------------- | ------------------------------------------------------- | +| **REALITY Config Generator** | Build a valid REALITY inbound configuration. | +| **Share Link Inspector** | Decode and inspect `vless://` / `vmess://` share links. | +| **Install Command Builder** | Assemble the right install command for your setup. | +| **Reverse Proxy Generator** | Generate reverse-proxy configs (Nginx / Caddy). | +| **Protocol Wizard** | Pick and configure the right protocol for your needs. | +| **Firewall Rules Generator** | Produce firewall rules for your ports. | + +## Tech stack + +| Layer | Technology | +| ---------- | ---------------------------------------------------------- | +| Framework | [Next.js 16](https://nextjs.org) (App Router) · React 19 | +| Docs | [Fumadocs](https://fumadocs.dev) (`-ui` / `-core` / `-mdx`) | +| Styling | [Tailwind CSS v4](https://tailwindcss.com) | +| Search | [Orama](https://orama.com) static index | +| Language | TypeScript (strict) | +| Tests | [Vitest](https://vitest.dev) for the pure `lib/xray` logic | +| Tooling | pnpm · ESLint 9 · Prettier | + +## Quick start + +This project uses **[pnpm](https://pnpm.io)** (npm lockfiles are gitignored). Run everything +from the `docs/` directory: + +```bash +cd docs +pnpm install +pnpm dev # http://localhost:3000 +``` + +Useful scripts: + +| Script | Description | +| ---------------- | -------------------------------------------- | +| `pnpm dev` | Start the dev server | +| `pnpm build` | Production build (also typechecks) | +| `pnpm typecheck` | Generate MDX/route types and `tsc --noEmit` | +| `pnpm lint` | Run ESLint | +| `pnpm test` | Run unit tests (Vitest) | + +See [`CONTRIBUTING.md`](./CONTRIBUTING.md) for the full list and project conventions. + +## Project structure + +``` +app/ # Next.js App Router — layouts, home, docs, OG images, search, llms.txt +components/ # React components — interactive tools, home sections, MDX bindings +content/docs/ # MDX documentation, one folder per locale (en · fa · ru · zh) +lib/ # source config, i18n, GitHub stats, and the unit-tested lib/xray logic +public/ # static assets — logos, favicon, openapi.json, CNAME +scripts/ # build-time scripts (API reference generation) +source.config.ts # Fumadocs MDX schema & collection config +next.config.mjs # Next.js config (static-export gating) +proxy.ts # i18n middleware +``` + +## Internationalization + +Documentation is authored in **English**. Persian (`fa`, RTL), Russian (`ru`), and +Chinese (`zh`) locales are wired up; untranslated pages fall back to English so they +never 404. English URLs are unprefixed; other locales live under `/fa`, `/ru`, `/zh`. + +## Deployment + +The site builds for two targets: + +- **Vercel / Node** — `pnpm build` (static search index + prerendered OG images). +- **GitHub Pages (static export)** — `DEPLOY_TARGET=static pnpm build` → `out/`. + +## Contributing + +Contributions are welcome! Setup, scripts, and project conventions live in +[`CONTRIBUTING.md`](./CONTRIBUTING.md). + +## License + +Licensed under [GPL-3.0](./LICENSE). diff --git a/docs/app/[lang]/(home)/layout.tsx b/docs/app/[lang]/(home)/layout.tsx new file mode 100644 index 000000000..17af0d723 --- /dev/null +++ b/docs/app/[lang]/(home)/layout.tsx @@ -0,0 +1,28 @@ +import { HomeLayout } from 'fumadocs-ui/layouts/home'; +import { baseOptions } from '@/lib/layout.shared'; +import { HomeLanguageSwitcher } from '@/components/home/language-switcher'; + +export default async function Layout({ params, children }: LayoutProps<'/[lang]'>) { + const { lang } = await params; + const options = baseOptions(lang); + return ( +{m.tagline}
+ +{subtitle}
+{description}
+
+ {command}
+
+
+ Choose a language
+ {locales.map(({ locale, name }) => ( + + {name} + + ))} +
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+
+ >
+ );
+}
diff --git a/docs/components/mdx.tsx b/docs/components/mdx.tsx
new file mode 100644
index 000000000..d2c272e33
--- /dev/null
+++ b/docs/components/mdx.tsx
@@ -0,0 +1,47 @@
+import defaultMdxComponents from 'fumadocs-ui/mdx';
+import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
+import { Step, Steps } from 'fumadocs-ui/components/steps';
+import { Mermaid } from '@/components/mdx/mermaid';
+import { RealityConfigGenerator } from '@/components/tools/reality-config-generator';
+import { ShareLinkInspector } from '@/components/tools/share-link-inspector';
+import { InstallCommandBuilder } from '@/components/tools/install-command-builder';
+import { ReverseProxyGenerator } from '@/components/tools/reverse-proxy-generator';
+import { ProtocolWizard } from '@/components/tools/protocol-wizard';
+import { FirewallRulesGenerator } from '@/components/tools/firewall-rules-generator';
+import { OutboundGenerator } from '@/components/tools/outbound-generator';
+import { RoutingBuilder } from '@/components/tools/routing-builder';
+import { SubscriptionBuilder } from '@/components/tools/subscription-builder';
+import { TelegramSetupHelper } from '@/components/tools/telegram-setup-helper';
+import { ApiRequestBuilder } from '@/components/tools/api-request-builder';
+import { OpenAPIPage } from '@/components/openapi-page';
+import type { MDXComponents } from 'mdx/types';
+
+export function getMDXComponents(components?: MDXComponents) {
+ return {
+ ...defaultMdxComponents,
+ Tab,
+ Tabs,
+ Step,
+ Steps,
+ Mermaid,
+ RealityConfigGenerator,
+ ShareLinkInspector,
+ InstallCommandBuilder,
+ ReverseProxyGenerator,
+ ProtocolWizard,
+ FirewallRulesGenerator,
+ OutboundGenerator,
+ RoutingBuilder,
+ SubscriptionBuilder,
+ TelegramSetupHelper,
+ ApiRequestBuilder,
+ OpenAPIPage,
+ ...components,
+ } satisfies MDXComponents;
+}
+
+export const useMDXComponents = getMDXComponents;
+
+declare global {
+ type MDXProvidedComponents = ReturnType{result.rationale}
+
+ {value}
+
+ + Caddy obtains and renews TLS certificates automatically — no extra command needed. +
+ )} +| + {key} + | ++ {value || —} + | +
|---|
+ {value}
+
+ {qr && value ? (
+ + {children} +
+ ); +} + +export function TelegramSetupHelper() { + const [token, setToken] = useState(''); + const [adminIds, setAdminIds] = useState(''); + const [runTime, setRunTime] = useState('@daily'); + + const tokenV = validateBotToken(token); + const idsV = parseAdminIds(adminIds); + const cronV = validateRunTime(runTime); + const summary = buildBotConfigSummary({ token, adminIds, runTime }); + + const settingsText = [ + `tgBotEnable = true`, + `tgBotToken = ${summary.tgBotToken || '{description}
+ ) : null} +Authorization: Bearer <token> on any /panel/api/* request —
+ the token is a full-admin credential.
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ List every API token, enabled or not. The token value is never returned
+ — only metadata.
+ url: >-
+ #list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - depth: 2
+ title: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the token
+ string is server-generated and returned only in this response — it is
+ stored hashed and cannot be retrieved later.
+ url: >-
+ #mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - depth: 2
+ title: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ url: >-
+ #permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - depth: 2
+ title: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens are
+ rejected by checkAPIAuth on the next request.
+ url: >-
+ #toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ structuredData:
+ headings:
+ - content: >-
+ List every API token, enabled or not. The token value is never
+ returned — only metadata.
+ id: >-
+ list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - content: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the
+ token string is server-generated and returned only in this response —
+ it is stored hashed and cannot be retrieved later.
+ id: >-
+ mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - content: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ id: >-
+ permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - content: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens
+ are rejected by checkAPIAuth on the next request.
+ id: >-
+ toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ ws:///ws to receive a stream of JSON messages without
+ polling. Requires an authenticated session cookie (Bearer token auth is not
+ supported). Each message has a type field that identifies the
+ payload shape.
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ url: >-
+ #upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ structuredData:
+ headings:
+ - content: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ id: >-
+ upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ Authorization: Bearer <token> ارسال کنید — این توکن یک اعتبارنامهٔ
+ مدیر کامل است.
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ List every API token, enabled or not. The token value is never returned
+ — only metadata.
+ url: >-
+ #list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - depth: 2
+ title: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the token
+ string is server-generated and returned only in this response — it is
+ stored hashed and cannot be retrieved later.
+ url: >-
+ #mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - depth: 2
+ title: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ url: >-
+ #permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - depth: 2
+ title: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens are
+ rejected by checkAPIAuth on the next request.
+ url: >-
+ #toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ structuredData:
+ headings:
+ - content: >-
+ List every API token, enabled or not. The token value is never
+ returned — only metadata.
+ id: >-
+ list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - content: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the
+ token string is server-generated and returned only in this response —
+ it is stored hashed and cannot be retrieved later.
+ id: >-
+ mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - content: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ id: >-
+ permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - content: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens
+ are rejected by checkAPIAuth on the next request.
+ id: >-
+ toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ ws:///ws متصل شوید تا بدون نیاز به polling، جریانی از
+ پیامهای JSON دریافت کنید. به یک کوکی نشست احرازهویتشده نیاز دارد (احرازهویت با
+ توکن Bearer پشتیبانی نمیشود). هر پیام دارای یک فیلد type است که
+ شکل دادهی آن را مشخص میکند.
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ url: >-
+ #upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ structuredData:
+ headings:
+ - content: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ id: >-
+ upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ Authorization: Bearer <token> в любом запросе /panel/api/* —
+ такой токен даёт полные права администратора.
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ List every API token, enabled or not. The token value is never returned
+ — only metadata.
+ url: >-
+ #list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - depth: 2
+ title: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the token
+ string is server-generated and returned only in this response — it is
+ stored hashed and cannot be retrieved later.
+ url: >-
+ #mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - depth: 2
+ title: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ url: >-
+ #permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - depth: 2
+ title: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens are
+ rejected by checkAPIAuth on the next request.
+ url: >-
+ #toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ structuredData:
+ headings:
+ - content: >-
+ List every API token, enabled or not. The token value is never
+ returned — only metadata.
+ id: >-
+ list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - content: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the
+ token string is server-generated and returned only in this response —
+ it is stored hashed and cannot be retrieved later.
+ id: >-
+ mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - content: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ id: >-
+ permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - content: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens
+ are rejected by checkAPIAuth on the next request.
+ id: >-
+ toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ ws:///ws , чтобы получать поток JSON-сообщений без
+ опроса. Требуется аутентифицированный сессионный cookie (авторизация по токену
+ Bearer не поддерживается). У каждого сообщения есть поле type,
+ которое определяет структуру полезной нагрузки.
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ url: >-
+ #upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ structuredData:
+ headings:
+ - content: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ id: >-
+ upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ Authorization: Bearer <token> 的形式发送令牌——该令牌是一份完全管理员凭据。
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ List every API token, enabled or not. The token value is never returned
+ — only metadata.
+ url: >-
+ #list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - depth: 2
+ title: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the token
+ string is server-generated and returned only in this response — it is
+ stored hashed and cannot be retrieved later.
+ url: >-
+ #mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - depth: 2
+ title: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ url: >-
+ #permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - depth: 2
+ title: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens are
+ rejected by checkAPIAuth on the next request.
+ url: >-
+ #toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ structuredData:
+ headings:
+ - content: >-
+ List every API token, enabled or not. The token value is never
+ returned — only metadata.
+ id: >-
+ list-every-api-token-enabled-or-not-the-token-value-is-never-returned--only-metadata
+ - content: >-
+ Mint a new API token. Name must be unique and 1-64 characters; the
+ token string is server-generated and returned only in this response —
+ it is stored hashed and cannot be retrieved later.
+ id: >-
+ mint-a-new-api-token-name-must-be-unique-and-1-64-characters-the-token-string-is-server-generated-and-returned-only-in-this-response--it-is-stored-hashed-and-cannot-be-retrieved-later
+ - content: >-
+ Permanently delete a token. Any caller using it stops authenticating
+ immediately.
+ id: >-
+ permanently-delete-a-token-any-caller-using-it-stops-authenticating-immediately
+ - content: >-
+ Toggle a token enabled/disabled without deleting it. Disabled tokens
+ are rejected by checkAPIAuth on the next request.
+ id: >-
+ toggle-a-token-enableddisabled-without-deleting-it-disabled-tokens-are-rejected-by-checkapiauth-on-the-next-request
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+ ws:///ws 建立一次连接,即可接收 JSON 消息流,无需轮询。需要经过身份验证的会话
+ Cookie(不支持 Bearer token 身份验证)。每条消息都带有一个 type 字段,用于标识其载荷结构。
+full: true
+_openapi:
+ preload:
+ - ./public/openapi.json
+ toc:
+ - depth: 2
+ title: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ url: >-
+ #upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ structuredData:
+ headings:
+ - content: >-
+ Upgrade an HTTP connection to a WebSocket. Requires an authenticated
+ session cookie (Bearer token auth is not supported here). Returns 101
+ Switching Protocols on success. The server then pushes JSON messages
+ described below.
+ id: >-
+ upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
+ contents: []
+---
+
+{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
+
+export default function Layout(props) {
+ const { APIPage, OpenAPIPage } = props.components ?? {};
+ // "APIPage" is the old name from v10, this allows both for backward compatibility
+ const Comp = OpenAPIPage ?? APIPage;
+ return (
+ <>
+ {props.children}
+