From 9b69a7f47954d866ec06e6df2005924209545ce1 Mon Sep 17 00:00:00 2001 From: Meo597 Date: Fri, 23 Jan 2026 22:37:20 +0000 Subject: [PATCH] Prettified Code! --- .vitepress/config.mts | 144 ++++---- .vitepress/menus/nav.en.mts | 16 +- .vitepress/menus/nav.mts | 14 +- .vitepress/menus/nav.ru.mts | 16 +- .vitepress/menus/sidebar.en.mts | 164 +++++---- .vitepress/menus/sidebar.mts | 116 ++++--- .vitepress/menus/sidebar.ru.mts | 162 ++++----- .vitepress/theme/components/BackToTop.vue | 20 +- .../theme/components/PageContributors.vue | 51 +-- .../theme/components/TranslationNotice.vue | 42 +-- .vitepress/theme/index.mts | 38 +-- docs/document/level-0/ch05-webpage.md | 17 +- docs/document/level-2/warp.md | 10 +- docs/en/config/features/fallback.md | 2 +- docs/en/config/inbounds/http.md | 2 +- docs/en/config/inbounds/vmess.md | 2 +- docs/en/config/metrics.md | 198 +++++------ docs/en/config/observatory.md | 2 +- docs/en/config/outbounds/freedom.md | 2 +- docs/en/config/outbounds/vmess.md | 2 +- docs/en/config/reverse.md | 2 +- docs/en/config/transport.md | 14 +- docs/en/config/transports/mkcp.md | 2 +- docs/en/development/protocols/mkcp.md | 20 +- docs/en/development/protocols/muxcool.md | 80 ++--- docs/en/development/protocols/vless.md | 12 +- docs/en/development/protocols/vmess.md | 30 +- docs/en/document/command.md | 4 +- docs/en/document/level-0/ch01-preface.md | 2 +- docs/en/document/level-0/ch02-preparation.md | 16 +- docs/en/document/level-0/ch03-ssh.md | 10 +- docs/en/document/level-0/ch04-security.md | 263 ++++++++------- docs/en/document/level-0/ch05-webpage.md | 214 ++++++------ docs/en/document/level-0/ch06-certificates.md | 202 +++++------ docs/en/document/level-0/ch07-xray-server.md | 36 +- docs/en/document/level-0/ch08-xray-clients.md | 36 +- docs/en/document/level-0/ch09-appendix.md | 70 ++-- docs/en/document/level-1/fallbacks-lv1.md | 316 +++++++++--------- docs/en/document/level-1/routing-lv1-part1.md | 10 +- docs/en/document/level-1/routing-lv1-part2.md | 2 +- .../transparent_proxy/transparent_proxy.md | 2 +- docs/en/document/level-2/warp.md | 10 +- docs/ru/document/level-0/ch05-webpage.md | 17 +- docs/ru/document/level-2/warp.md | 10 +- scripts/gen-contributors.mjs | 149 +++++---- scripts/gen-i18n-stale.mjs | 158 ++++----- 46 files changed, 1395 insertions(+), 1312 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index b5e07925..de566c3f 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -1,13 +1,13 @@ -import { defineConfig } from "vitepress"; -import llmstxt from "vitepress-plugin-llms"; -import { MermaidMarkdown, MermaidPlugin } from "vitepress-plugin-mermaid"; +import { defineConfig } from "vitepress" +import llmstxt from "vitepress-plugin-llms" +import { MermaidMarkdown, MermaidPlugin } from "vitepress-plugin-mermaid" -import { nav as nav } from "./menus/nav.mts"; -import { nav as nav_en } from "./menus/nav.en.mts"; -import { nav as nav_ru } from "./menus/nav.ru.mts"; -import { sidebar as sidebar } from "./menus/sidebar.mts"; -import { sidebar as sidebar_en } from "./menus/sidebar.en.mts"; -import { sidebar as sidebar_ru } from "./menus/sidebar.ru.mts"; +import { nav as nav } from "./menus/nav.mts" +import { nav as nav_en } from "./menus/nav.en.mts" +import { nav as nav_ru } from "./menus/nav.ru.mts" +import { sidebar as sidebar } from "./menus/sidebar.mts" +import { sidebar as sidebar_en } from "./menus/sidebar.en.mts" +import { sidebar as sidebar_ru } from "./menus/sidebar.ru.mts" // https://vitepress.dev/reference/site-config export default defineConfig({ @@ -22,7 +22,7 @@ export default defineConfig({ ignoreDeadLinks: false, sitemap: { - hostname: "https://xtls.github.io", + hostname: "https://xtls.github.io" }, markdown: { @@ -30,23 +30,26 @@ export default defineConfig({ theme: { dark: "dark-plus", - light: "light-plus", + light: "light-plus" }, attrs: { leftDelimiter: "{:" }, config(md) { - md.use(MermaidMarkdown); - }, + md.use(MermaidMarkdown) + } }, vite: { - plugins: [llmstxt({ ignoreFiles: ["en/**", "ru/**"] }), MermaidPlugin()], + plugins: [ + llmstxt({ ignoreFiles: ["en/**", "ru/**"] }), + MermaidPlugin() + ], optimizeDeps: { - include: ["mermaid"], + include: ["mermaid"] }, ssr: { - noExternal: ["mermaid"], - }, + noExternal: ["mermaid"] + } }, themeConfig: { @@ -59,13 +62,13 @@ export default defineConfig({ detailedView: true, miniSearch: { options: { - tokenize: (str) => str.split(/[\s,,。、]+/), - }, + tokenize: (str) => str.split(/[\s,,。、]+/) + } }, translations: { button: { buttonText: "搜索", - buttonAriaLabel: "搜索", + buttonAriaLabel: "搜索" }, modal: { displayDetails: "显示详细列表", @@ -75,11 +78,11 @@ export default defineConfig({ footer: { selectText: "选择", navigateText: "切换", - closeText: "关闭", - }, - }, - }, - }, + closeText: "关闭" + } + } + } + } }, darkModeSwitchLabel: "深色模式", @@ -92,43 +95,44 @@ export default defineConfig({ outline: { level: [2, 4], - label: "页面导航", + label: "页面导航" }, sidebar: sidebar, socialLinks: [ - { icon: "github", link: "https://github.com/XTLS/Xray-core" }, + { icon: "github", link: "https://github.com/XTLS/Xray-core" } ], editLink: { - pattern: "https://github.com/XTLS/Xray-docs-next/edit/main/docs/:path", - text: "帮助我们改善此页面!", + pattern: + "https://github.com/XTLS/Xray-docs-next/edit/main/docs/:path", + text: "帮助我们改善此页面!" }, lastUpdated: { text: "最近更改", formatOptions: { dateStyle: "short", - timeStyle: "short", - }, + timeStyle: "short" + } }, docFooter: { prev: "上一页", - next: "下一页", + next: "下一页" }, footer: { message: "根据 CC-BY-SA 4.0 许可协议授权", - copyright: "版权所有 © 2020-至今 Project X 社区", - }, + copyright: "版权所有 © 2020-至今 Project X 社区" + } }, locales: { root: { label: "简体中文", - lang: "zh", + lang: "zh" }, en: { @@ -144,13 +148,13 @@ export default defineConfig({ tokenize: (str) => str .split(/[\s.,;!?'"(){}[\]\-_+=&%$#@~`^<>|\\]+/) - .filter(Boolean), - }, + .filter(Boolean) + } }, translations: { button: { buttonText: "Search", - buttonAriaLabel: "Search", + buttonAriaLabel: "Search" }, modal: { displayDetails: "Show detailed list", @@ -160,11 +164,11 @@ export default defineConfig({ footer: { selectText: "Select", navigateText: "Navigate", - closeText: "Close", - }, - }, - }, - }, + closeText: "Close" + } + } + } + } }, darkModeSwitchLabel: "Appearance", @@ -174,33 +178,33 @@ export default defineConfig({ returnToTopLabel: "Return to top", outline: { - label: "On this page", + label: "On this page" }, sidebar: sidebar_en, editLink: { - text: "Help us improve this page on GitHub!", + text: "Help us improve this page on GitHub!" }, lastUpdated: { text: "Last Updated", formatOptions: { dateStyle: "short", - timeStyle: "short", - }, + timeStyle: "short" + } }, docFooter: { prev: "Previous page", - next: "Next page", + next: "Next page" }, footer: { message: "Licensed under CC-BY-SA 4.0", - copyright: "Copyright © 2020-Present Project X Community", - }, - }, + copyright: "Copyright © 2020-Present Project X Community" + } + } }, ru: { @@ -216,13 +220,13 @@ export default defineConfig({ tokenize: (str) => str .split(/[\s.,;!?'"(){}[\]\-_+=&%$#@~`^<>|\\]+/) - .filter(Boolean), - }, + .filter(Boolean) + } }, translations: { button: { buttonText: "Поиск", - buttonAriaLabel: "Поиск", + buttonAriaLabel: "Поиск" }, modal: { displayDetails: "Показать подробный список", @@ -232,11 +236,11 @@ export default defineConfig({ footer: { selectText: "Выбрать", navigateText: "Переключить", - closeText: "Закрыть", - }, - }, - }, - }, + closeText: "Закрыть" + } + } + } + } }, darkModeSwitchLabel: "Внешний вид", @@ -246,34 +250,34 @@ export default defineConfig({ returnToTopLabel: "Вернуться наверх", outline: { - label: "Содержание страницы", + label: "Содержание страницы" }, sidebar: sidebar_ru, editLink: { - text: "Помогите нам улучшить эту страницу!", + text: "Помогите нам улучшить эту страницу!" }, lastUpdated: { text: "Последние изменения", formatOptions: { dateStyle: "short", - timeStyle: "short", - }, + timeStyle: "short" + } }, docFooter: { prev: "Предыдущая страница", - next: "Следующая страница", + next: "Следующая страница" }, footer: { message: "Лицензия CC-BY-SA 4.0", copyright: - "Авторские права 2020-настоящее время Сообщество Project X", - }, - }, - }, - }, -}); + "Авторские права 2020-настоящее время Сообщество Project X" + } + } + } + } +}) diff --git a/.vitepress/menus/nav.en.mts b/.vitepress/menus/nav.en.mts index 5c4cf026..b178466f 100644 --- a/.vitepress/menus/nav.en.mts +++ b/.vitepress/menus/nav.en.mts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" export const nav: DefaultTheme.Config["nav"] = [ { text: "Homepage", link: "/en" }, @@ -9,8 +9,8 @@ export const nav: DefaultTheme.Config["nav"] = [ { text: "Basic Configuration", link: "/en/config/" }, { text: "Inbound Protocols", link: "/en/config/inbounds/" }, { text: "Outbound Protocols", link: "/en/config/outbounds/" }, - { text: "Transports", link: "/en/config/transports/" }, - ], + { text: "Transports", link: "/en/config/transports/" } + ] }, { text: "Usage Guide", @@ -18,12 +18,12 @@ export const nav: DefaultTheme.Config["nav"] = [ { text: "Quick Start", link: "/en/document/" }, { text: "Absolute Beginner's Plain Guide", - link: "/en/document/level-0/", + link: "/en/document/level-0/" }, { text: "Beginner Skills", link: "/en/document/level-1/" }, - { text: "Advanced Skills", link: "/en/document/level-2/" }, - ], + { text: "Advanced Skills", link: "/en/document/level-2/" } + ] }, { text: "Developer Guide", link: "/en/development/" }, - { text: "Sponsor & Donation & NFTs", link: "/en/about/sponsor.md" }, -]; + { text: "Sponsor & Donation & NFTs", link: "/en/about/sponsor.md" } +] diff --git a/.vitepress/menus/nav.mts b/.vitepress/menus/nav.mts index aaa77367..673af348 100644 --- a/.vitepress/menus/nav.mts +++ b/.vitepress/menus/nav.mts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" export const nav: DefaultTheme.Config["nav"] = [ { text: "首页", link: "/" }, @@ -9,8 +9,8 @@ export const nav: DefaultTheme.Config["nav"] = [ { text: "基础配置", link: "/config/" }, { text: "入站协议", link: "/config/inbounds/" }, { text: "出站协议", link: "/config/outbounds/" }, - { text: "底层传输", link: "/config/transports/" }, - ], + { text: "底层传输", link: "/config/transports/" } + ] }, { text: "使用指南", @@ -18,9 +18,9 @@ export const nav: DefaultTheme.Config["nav"] = [ { text: "快速入门", link: "/document/" }, { text: "小小白白话文", link: "/document/level-0/" }, { text: "入门技巧", link: "/document/level-1/" }, - { text: "进阶技巧", link: "/document/level-2/" }, - ], + { text: "进阶技巧", link: "/document/level-2/" } + ] }, { text: "开发指南", link: "/development/" }, - { text: "赞助 & 捐款 & NFTs", link: "/about/sponsor.md" }, -]; + { text: "赞助 & 捐款 & NFTs", link: "/about/sponsor.md" } +] diff --git a/.vitepress/menus/nav.ru.mts b/.vitepress/menus/nav.ru.mts index 97001f01..8e5042cb 100644 --- a/.vitepress/menus/nav.ru.mts +++ b/.vitepress/menus/nav.ru.mts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" export const nav: DefaultTheme.Config["nav"] = [ { text: "Главная", link: "/ru" }, @@ -9,8 +9,8 @@ export const nav: DefaultTheme.Config["nav"] = [ { text: "Базовая конфигурация", link: "/ru/config/" }, { text: "Входящие подключения", link: "/ru/config/inbounds/" }, { text: "Исходящие подключения", link: "/ru/config/outbounds/" }, - { text: "Транспортный уровень", link: "/ru/config/transports/" }, - ], + { text: "Транспортный уровень", link: "/ru/config/transports/" } + ] }, { text: "Руководство по использованию", @@ -18,12 +18,12 @@ export const nav: DefaultTheme.Config["nav"] = [ { text: "Быстрый старт", link: "/ru/document/" }, { text: "Простыми словами", - link: "/ru/document/level-0/", + link: "/ru/document/level-0/" }, { text: "Базовые навыки", link: "/ru/document/level-1/" }, - { text: "Продвинутые навыки", link: "/ru/document/level-2/" }, - ], + { text: "Продвинутые навыки", link: "/ru/document/level-2/" } + ] }, { text: "Руководство разработчика", link: "/ru/development/" }, - { text: "Sponsor & Donation & NFTs", link: "/ru/about/sponsor.md" }, -]; + { text: "Sponsor & Donation & NFTs", link: "/ru/about/sponsor.md" } +] diff --git a/.vitepress/menus/sidebar.en.mts b/.vitepress/menus/sidebar.en.mts index ff59bf39..e1cbbe64 100644 --- a/.vitepress/menus/sidebar.en.mts +++ b/.vitepress/menus/sidebar.en.mts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" export const sidebar: DefaultTheme.Config["sidebar"] = { "/en/config/": [ @@ -11,14 +11,17 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Fallback", link: "/en/config/features/fallback.md" }, { text: "Browser Dialer", - link: "/en/config/features/browser_dialer.md", + link: "/en/config/features/browser_dialer.md" + }, + { + text: "Environment Variables", + link: "/en/config/features/env.md" }, - { text: "Environment Variables", link: "/en/config/features/env.md" }, { text: "Multiple Configurations", - link: "/en/config/features/multiple.md", - }, - ], + link: "/en/config/features/multiple.md" + } + ] }, { text: "Basic Configuration", @@ -35,10 +38,13 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Reverse Proxy", link: "/en/config/reverse.md" }, { text: "Routing", link: "/en/config/routing.md" }, { text: "Statistics", link: "/en/config/stats.md" }, - { text: "Transport (uTLS, REALITY)", link: "/en/config/transport.md" }, + { + text: "Transport (uTLS, REALITY)", + link: "/en/config/transport.md" + }, { text: "Metrics", link: "/en/config/metrics.md" }, - { text: "Observatory", link: "/en/config/observatory.md" }, - ], + { text: "Observatory", link: "/en/config/observatory.md" } + ] }, { text: "Inbound Protocols", @@ -47,20 +53,23 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Tunnel (dokodemo-door)", - link: "/en/config/inbounds/tunnel.md", + link: "/en/config/inbounds/tunnel.md" }, { text: "HTTP", link: "/en/config/inbounds/http.md" }, - { text: "Shadowsocks", link: "/en/config/inbounds/shadowsocks.md" }, + { + text: "Shadowsocks", + link: "/en/config/inbounds/shadowsocks.md" + }, { text: "Socks", link: "/en/config/inbounds/socks.md" }, { text: "Trojan", link: "/en/config/inbounds/trojan.md" }, { text: "VLESS (XTLS Vision Seed)", - link: "/en/config/inbounds/vless.md", + link: "/en/config/inbounds/vless.md" }, { text: "VMess", link: "/en/config/inbounds/vmess.md" }, { text: "Wireguard", link: "/en/config/inbounds/wireguard.md" }, - { text: "TUN", link: "/en/config/inbounds/tun.md" }, - ], + { text: "TUN", link: "/en/config/inbounds/tun.md" } + ] }, { text: "Outbound Protocols", @@ -71,21 +80,24 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "DNS", link: "/en/config/outbounds/dns.md" }, { text: "Freedom (fragment, noises)", - link: "/en/config/outbounds/freedom.md", + link: "/en/config/outbounds/freedom.md" }, { text: "HTTP", link: "/en/config/outbounds/http.md" }, { text: "Loopback", link: "/en/config/outbounds/loopback.md" }, - { text: "Shadowsocks", link: "/en/config/outbounds/shadowsocks.md" }, + { + text: "Shadowsocks", + link: "/en/config/outbounds/shadowsocks.md" + }, { text: "Socks", link: "/en/config/outbounds/socks.md" }, { text: "Trojan", link: "/en/config/outbounds/trojan.md" }, { text: "VLESS (XTLS Vision Seed)", - link: "/en/config/outbounds/vless.md", + link: "/en/config/outbounds/vless.md" }, { text: "VMess", link: "/en/config/outbounds/vmess.md" }, { text: "Wireguard", link: "/en/config/outbounds/wireguard.md" }, - { text: "Hysteria", link: "/en/config/outbounds/hysteria.md" }, - ], + { text: "Hysteria", link: "/en/config/outbounds/hysteria.md" } + ] }, { text: "Transports", @@ -95,15 +107,18 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "RAW", link: "/en/config/transports/raw.md" }, { text: "XHTTP: Beyond REALITY", - link: "/en/config/transports/xhttp.md", + link: "/en/config/transports/xhttp.md" }, { text: "mKCP", link: "/en/config/transports/mkcp.md" }, { text: "gRPC", link: "/en/config/transports/grpc.md" }, { text: "WebSocket", link: "/en/config/transports/websocket.md" }, - { text: "HTTPUpgrade", link: "/en/config/transports/httpupgrade.md" }, - { text: "Hysteria", link: "/en/config/transports/hysteria.md" }, - ], - }, + { + text: "HTTPUpgrade", + link: "/en/config/transports/httpupgrade.md" + }, + { text: "Hysteria", link: "/en/config/transports/hysteria.md" } + ] + } ], "/en/document/": [ { @@ -114,8 +129,11 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Installation", link: "/en/document/install.md" }, { text: "Configuration & Run", link: "/en/document/config.md" }, { text: "Command Arguments", link: "/en/document/command.md" }, - { text: "Contribute to Project X", link: "/en/document/document.md" }, - ], + { + text: "Contribute to Project X", + link: "/en/document/document.md" + } + ] }, { text: "Absolute Beginner's Guide", @@ -124,41 +142,41 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "[Chapter 1] Preface", - link: "/en/document/level-0/ch01-preface.md", + link: "/en/document/level-0/ch01-preface.md" }, { text: "[Chapter 2] Preparation", - link: "/en/document/level-0/ch02-preparation.md", + link: "/en/document/level-0/ch02-preparation.md" }, { text: "[Chapter 3] Remote Login (SSH)", - link: "/en/document/level-0/ch03-ssh.md", + link: "/en/document/level-0/ch03-ssh.md" }, { text: "[Chapter 4] Security", - link: "/en/document/level-0/ch04-security.md", + link: "/en/document/level-0/ch04-security.md" }, { text: "[Chapter 5] Website Building", - link: "/en/document/level-0/ch05-webpage.md", + link: "/en/document/level-0/ch05-webpage.md" }, { text: "[Chapter 6] Certificate Management", - link: "/en/document/level-0/ch06-certificates.md", + link: "/en/document/level-0/ch06-certificates.md" }, { text: "[Chapter 7] Xray Server", - link: "/en/document/level-0/ch07-xray-server.md", + link: "/en/document/level-0/ch07-xray-server.md" }, { text: "[Chapter 8] Xray Clients", - link: "/en/document/level-0/ch08-xray-clients.md", + link: "/en/document/level-0/ch08-xray-clients.md" }, { text: "[Chapter 9] Appendix", - link: "/en/document/level-0/ch09-appendix.md", - }, - ], + link: "/en/document/level-0/ch09-appendix.md" + } + ] }, { text: "Beginner Skills", @@ -167,26 +185,29 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Analysis of Fallbacks", - link: "/en/document/level-1/fallbacks-lv1.md", + link: "/en/document/level-1/fallbacks-lv1.md" }, { text: "Analysis of Routing (Part 1)", - link: "/en/document/level-1/routing-lv1-part1.md", + link: "/en/document/level-1/routing-lv1-part1.md" }, { text: "Analysis of Routing (Part 2)", - link: "/en/document/level-1/routing-lv1-part2.md", + link: "/en/document/level-1/routing-lv1-part2.md" + }, + { + text: "Working Modes of Xray", + link: "/en/document/level-1/work.md" }, - { text: "Working Modes of Xray", link: "/en/document/level-1/work.md" }, { text: "SNI Fallback", - link: "/en/document/level-1/fallbacks-with-sni.md", + link: "/en/document/level-1/fallbacks-with-sni.md" }, { text: "Traffic Splitting via DNS", - link: "/en/document/level-1/routing-with-dns.md", - }, - ], + link: "/en/document/level-1/routing-with-dns.md" + } + ] }, { text: "Advanced Skills", @@ -195,38 +216,38 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Transparent Proxy Basics", - link: "/en/document/level-2/transparent_proxy/transparent_proxy.md", + link: "/en/document/level-2/transparent_proxy/transparent_proxy.md" }, { text: "TProxy Transparent Proxy", - link: "/en/document/level-2/tproxy.md", + link: "/en/document/level-2/tproxy.md" }, { text: "TProxy (IPv4 and IPv6)", - link: "/en/document/level-2/tproxy_ipv4_and_ipv6.md", + link: "/en/document/level-2/tproxy_ipv4_and_ipv6.md" }, { text: "Hide Fingerprint with Nginx/Haproxy TLS Tunnel", - link: "/en/document/level-2/nginx_or_haproxy_tls_tunnel.md", + link: "/en/document/level-2/nginx_or_haproxy_tls_tunnel.md" }, { text: "GID Transparent Proxy", - link: "/en/document/level-2/iptables_gid.md", + link: "/en/document/level-2/iptables_gid.md" }, { text: "Outbound Traffic Redirection", - link: "/en/document/level-2/redirect.md", + link: "/en/document/level-2/redirect.md" }, { text: "Enhance Security with Cloudflare Warp", - link: "/en/document/level-2/warp.md", + link: "/en/document/level-2/warp.md" }, { text: "Traffic Statistics", - link: "/en/document/level-2/traffic_stats.md", - }, - ], - }, + link: "/en/document/level-2/traffic_stats.md" + } + ] + } ], "/en/development/": [ { @@ -238,22 +259,31 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Design Goals", link: "/en/development/intro/design.md" }, { text: "Development Guidelines", - link: "/en/development/intro/guide.md", - }, - ], + link: "/en/development/intro/guide.md" + } + ] }, { text: "Protocol Details", collapsed: false, items: [ - { text: "VLESS Protocol", link: "/en/development/protocols/vless.md" }, - { text: "VMess Protocol", link: "/en/development/protocols/vmess.md" }, + { + text: "VLESS Protocol", + link: "/en/development/protocols/vless.md" + }, + { + text: "VMess Protocol", + link: "/en/development/protocols/vmess.md" + }, { text: "Mux.Cool Protocol", - link: "/en/development/protocols/muxcool.md", + link: "/en/development/protocols/muxcool.md" }, - { text: "mKCP Protocol", link: "/en/development/protocols/mkcp.md" }, - ], - }, - ], -}; + { + text: "mKCP Protocol", + link: "/en/development/protocols/mkcp.md" + } + ] + } + ] +} diff --git a/.vitepress/menus/sidebar.mts b/.vitepress/menus/sidebar.mts index 454143d8..a1503b11 100644 --- a/.vitepress/menus/sidebar.mts +++ b/.vitepress/menus/sidebar.mts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" export const sidebar: DefaultTheme.Config["sidebar"] = { "/config/": [ @@ -11,11 +11,11 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Fallback 回落", link: "/config/features/fallback.md" }, { text: "Browser Dialer", - link: "/config/features/browser_dialer.md", + link: "/config/features/browser_dialer.md" }, { text: "环境变量", link: "/config/features/env.md" }, - { text: "多文件配置", link: "/config/features/multiple.md" }, - ], + { text: "多文件配置", link: "/config/features/multiple.md" } + ] }, { text: "基础配置", @@ -32,10 +32,13 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "反向代理", link: "/config/reverse.md" }, { text: "路由", link: "/config/routing.md" }, { text: "统计信息", link: "/config/stats.md" }, - { text: "传输方式(uTLS、REALITY)", link: "/config/transport.md" }, + { + text: "传输方式(uTLS、REALITY)", + link: "/config/transport.md" + }, { text: "Metrics", link: "/config/metrics.md" }, - { text: "连接观测", link: "/config/observatory.md" }, - ], + { text: "连接观测", link: "/config/observatory.md" } + ] }, { text: "入站协议", @@ -44,7 +47,7 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Tunnel(dokodemo-door)", - link: "/config/inbounds/tunnel.md", + link: "/config/inbounds/tunnel.md" }, { text: "HTTP", link: "/config/inbounds/http.md" }, { text: "Shadowsocks", link: "/config/inbounds/shadowsocks.md" }, @@ -52,12 +55,12 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Trojan", link: "/config/inbounds/trojan.md" }, { text: "VLESS(XTLS Vision Seed)", - link: "/config/inbounds/vless.md", + link: "/config/inbounds/vless.md" }, { text: "VMess", link: "/config/inbounds/vmess.md" }, { text: "Wireguard", link: "/config/inbounds/wireguard.md" }, - { text: "TUN", link: "/config/inbounds/tun.md" }, - ], + { text: "TUN", link: "/config/inbounds/tun.md" } + ] }, { text: "出站协议", @@ -68,7 +71,7 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "DNS", link: "/config/outbounds/dns.md" }, { text: "Freedom(fragment、noises)", - link: "/config/outbounds/freedom.md", + link: "/config/outbounds/freedom.md" }, { text: "HTTP", link: "/config/outbounds/http.md" }, { text: "Loopback", link: "/config/outbounds/loopback.md" }, @@ -77,12 +80,12 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Trojan", link: "/config/outbounds/trojan.md" }, { text: "VLESS(XTLS Vision Seed)", - link: "/config/outbounds/vless.md", + link: "/config/outbounds/vless.md" }, { text: "VMess", link: "/config/outbounds/vmess.md" }, { text: "Wireguard", link: "/config/outbounds/wireguard.md" }, - { text: "Hysteria", link: "/config/outbounds/hysteria.md" }, - ], + { text: "Hysteria", link: "/config/outbounds/hysteria.md" } + ] }, { text: "底层传输", @@ -92,15 +95,15 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "RAW", link: "/config/transports/raw.md" }, { text: "XHTTP: Beyond REALITY", - link: "/config/transports/xhttp.md", + link: "/config/transports/xhttp.md" }, { text: "mKCP", link: "/config/transports/mkcp.md" }, { text: "gRPC", link: "/config/transports/grpc.md" }, { text: "WebSocket", link: "/config/transports/websocket.md" }, { text: "HTTPUpgrade", link: "/config/transports/httpupgrade.md" }, - { text: "Hysteria", link: "/config/transports/hysteria.md" }, - ], - }, + { text: "Hysteria", link: "/config/transports/hysteria.md" } + ] + } ], "/document/": [ { @@ -111,8 +114,8 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "下载安装", link: "/document/install.md" }, { text: "配置运行", link: "/document/config.md" }, { text: "命令参数", link: "/document/command.md" }, - { text: "为 Project X 的文档贡献", link: "/document/document.md" }, - ], + { text: "为 Project X 的文档贡献", link: "/document/document.md" } + ] }, { text: "小小白白话文", @@ -121,41 +124,41 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "【第 1 章】 小小白白话文", - link: "/document/level-0/ch01-preface.md", + link: "/document/level-0/ch01-preface.md" }, { text: "【第 2 章】原料准备篇", - link: "/document/level-0/ch02-preparation.md", + link: "/document/level-0/ch02-preparation.md" }, { text: "【第 3 章】远程登录篇", - link: "/document/level-0/ch03-ssh.md", + link: "/document/level-0/ch03-ssh.md" }, { text: "【第 4 章】安全防护篇", - link: "/document/level-0/ch04-security.md", + link: "/document/level-0/ch04-security.md" }, { text: "【第 5 章】网站建设篇", - link: "/document/level-0/ch05-webpage.md", + link: "/document/level-0/ch05-webpage.md" }, { text: "【第 6 章】证书管理篇", - link: "/document/level-0/ch06-certificates.md", + link: "/document/level-0/ch06-certificates.md" }, { text: "【第 7 章】Xray 服务器篇", - link: "/document/level-0/ch07-xray-server.md", + link: "/document/level-0/ch07-xray-server.md" }, { text: "【第 8 章】Xray 客户端篇", - link: "/document/level-0/ch08-xray-clients.md", + link: "/document/level-0/ch08-xray-clients.md" }, { text: "【第 9 章】附录", - link: "/document/level-0/ch09-appendix.md", - }, - ], + link: "/document/level-0/ch09-appendix.md" + } + ] }, { text: "入门技巧", @@ -164,26 +167,26 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "回落 (fallbacks) 功能简析", - link: "/document/level-1/fallbacks-lv1.md", + link: "/document/level-1/fallbacks-lv1.md" }, { text: "路由 (routing) 功能简析(上)", - link: "/document/level-1/routing-lv1-part1.md", + link: "/document/level-1/routing-lv1-part1.md" }, { text: "路由 (routing) 功能简析(下)", - link: "/document/level-1/routing-lv1-part2.md", + link: "/document/level-1/routing-lv1-part2.md" }, { text: "Xray 的工作模式", link: "/document/level-1/work.md" }, { text: "SNI 回落", - link: "/document/level-1/fallbacks-with-sni.md", + link: "/document/level-1/fallbacks-with-sni.md" }, { text: "用 DNS 实现精准境内外分流", - link: "/document/level-1/routing-with-dns.md", - }, - ], + link: "/document/level-1/routing-with-dns.md" + } + ] }, { text: "进阶技巧", @@ -192,26 +195,29 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "透明代理入门", - link: "/document/level-2/transparent_proxy/transparent_proxy.md", + link: "/document/level-2/transparent_proxy/transparent_proxy.md" }, { text: "TProxy 透明代理", link: "/document/level-2/tproxy.md" }, { text: "TProxy 透明代理(ipv4 and ipv6)", - link: "/document/level-2/tproxy_ipv4_and_ipv6.md", + link: "/document/level-2/tproxy_ipv4_and_ipv6.md" }, { text: "Nginx 或 Haproxy 搭建 TLS 隧道隐藏指纹", - link: "/document/level-2/nginx_or_haproxy_tls_tunnel.md", + link: "/document/level-2/nginx_or_haproxy_tls_tunnel.md" + }, + { + text: "GID 透明代理", + link: "/document/level-2/iptables_gid.md" }, - { text: "GID 透明代理", link: "/document/level-2/iptables_gid.md" }, { text: "出站流量重定向", link: "/document/level-2/redirect.md" }, { text: "通过 Cloudflare Warp 增强代理安全性", - link: "/document/level-2/warp.md", + link: "/document/level-2/warp.md" }, - { text: "流量统计", link: "/document/level-2/traffic_stats.md" }, - ], - }, + { text: "流量统计", link: "/document/level-2/traffic_stats.md" } + ] + } ], "/development/": [ { @@ -221,8 +227,8 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "编译", link: "/development/intro/compile.md" }, { text: "设计目标", link: "/development/intro/design.md" }, - { text: "开发规范", link: "/development/intro/guide.md" }, - ], + { text: "开发规范", link: "/development/intro/guide.md" } + ] }, { text: "协议详解", @@ -232,10 +238,10 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "VMess 协议", link: "/development/protocols/vmess.md" }, { text: "Mux.Cool 协议", - link: "/development/protocols/muxcool.md", + link: "/development/protocols/muxcool.md" }, - { text: "mKCP 协议", link: "/development/protocols/mkcp.md" }, - ], - }, - ], -}; + { text: "mKCP 协议", link: "/development/protocols/mkcp.md" } + ] + } + ] +} diff --git a/.vitepress/menus/sidebar.ru.mts b/.vitepress/menus/sidebar.ru.mts index 386c3c42..903c7e86 100644 --- a/.vitepress/menus/sidebar.ru.mts +++ b/.vitepress/menus/sidebar.ru.mts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from "vitepress"; +import type { DefaultTheme } from "vitepress" export const sidebar: DefaultTheme.Config["sidebar"] = { "/ru/config/": [ @@ -9,25 +9,25 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Глубокий анализ XTLS", - link: "/ru/config/features/xtls.md", + link: "/ru/config/features/xtls.md" }, { text: "Fallback", - link: "/ru/config/features/fallback.md", + link: "/ru/config/features/fallback.md" }, { text: "Browser Dialer", - link: "/ru/config/features/browser_dialer.md", + link: "/ru/config/features/browser_dialer.md" }, { text: "Переменные окружения", - link: "/ru/config/features/env.md", + link: "/ru/config/features/env.md" }, { text: "Конфигурация из нескольких файлов", - link: "/ru/config/features/multiple.md", - }, - ], + link: "/ru/config/features/multiple.md" + } + ] }, { text: "Базовая конфигурация", @@ -41,7 +41,7 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Входящие подключения", link: "/ru/config/inbound.md" }, { text: "Исходящие подключения", - link: "/ru/config/outbound.md", + link: "/ru/config/outbound.md" }, { text: "Локальные политики", link: "/ru/config/policy.md" }, { text: "Обратный прокси", link: "/ru/config/reverse.md" }, @@ -49,14 +49,14 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "Статистика", link: "/ru/config/stats.md" }, { text: "Способы передачи", - link: "/ru/config/transport.md", + link: "/ru/config/transport.md" }, { text: "Метрики", link: "/ru/config/metrics.md" }, { text: "Мониторинг подключений", - link: "/ru/config/observatory.md", - }, - ], + link: "/ru/config/observatory.md" + } + ] }, { text: "Входящие подключения", @@ -65,23 +65,23 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Tunnel (dokodemo-door)", - link: "/ru/config/inbounds/tunnel.md", + link: "/ru/config/inbounds/tunnel.md" }, { text: "HTTP", link: "/ru/config/inbounds/http.md" }, { text: "Shadowsocks", - link: "/ru/config/inbounds/shadowsocks.md", + link: "/ru/config/inbounds/shadowsocks.md" }, { text: "Socks", link: "/ru/config/inbounds/socks.md" }, { text: "Trojan", link: "/ru/config/inbounds/trojan.md" }, { text: "VLESS (XTLS Vision Seed)", - link: "/ru/config/inbounds/vless.md", + link: "/ru/config/inbounds/vless.md" }, { text: "VMess", link: "/ru/config/inbounds/vmess.md" }, { text: "Wireguard", link: "/ru/config/inbounds/wireguard.md" }, - { text: "TUN", link: "/ru/config/inbounds/tun.md" }, - ], + { text: "TUN", link: "/ru/config/inbounds/tun.md" } + ] }, { text: "Исходящие подключения", @@ -90,35 +90,35 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Blackhole", - link: "/ru/config/outbounds/blackhole.md", + link: "/ru/config/outbounds/blackhole.md" }, { text: "DNS", link: "/ru/config/outbounds/dns.md" }, { text: "Freedom (fragment, noises)", - link: "/ru/config/outbounds/freedom.md", + link: "/ru/config/outbounds/freedom.md" }, { text: "HTTP", link: "/ru/config/outbounds/http.md" }, { text: "Loopback", link: "/ru/config/outbounds/loopback.md" }, { text: "Shadowsocks", - link: "/ru/config/outbounds/shadowsocks.md", + link: "/ru/config/outbounds/shadowsocks.md" }, { text: "Socks", link: "/ru/config/outbounds/socks.md" }, { text: "Trojan", link: "/ru/config/outbounds/trojan.md" }, { text: "VLESS (XTLS Vision Seed)", - link: "/ru/config/outbounds/vless.md", + link: "/ru/config/outbounds/vless.md" }, { text: "VMess", link: "/ru/config/outbounds/vmess.md" }, { text: "Wireguard", - link: "/ru/config/outbounds/wireguard.md", + link: "/ru/config/outbounds/wireguard.md" }, { text: "Hysteria 2", - link: "/ru/config/outbounds/hysteria.md", - }, - ], + link: "/ru/config/outbounds/hysteria.md" + } + ] }, { text: "Способы передачи", @@ -128,24 +128,24 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { { text: "RAW", link: "/ru/config/transports/raw.md" }, { text: "XHTTP: За пределами REALITY", - link: "/ru/config/transports/xhttp.md", + link: "/ru/config/transports/xhttp.md" }, { text: "mKCP", link: "/ru/config/transports/mkcp.md" }, { text: "gRPC", link: "/ru/config/transports/grpc.md" }, { text: "WebSocket", - link: "/ru/config/transports/websocket.md", + link: "/ru/config/transports/websocket.md" }, { text: "HTTPUpgrade", - link: "/ru/config/transports/httpupgrade.md", + link: "/ru/config/transports/httpupgrade.md" }, { text: "Hysteria", - link: "/ru/config/transports/hysteria.md", - }, - ], - }, + link: "/ru/config/transports/hysteria.md" + } + ] + } ], "/ru/document/": [ { @@ -155,15 +155,15 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Загрузка и установка", - link: "/ru/document/install.md", + link: "/ru/document/install.md" }, { text: "Настройка и запуск", link: "/ru/document/config.md" }, { text: "Параметры команды", link: "/ru/document/command.md" }, { text: "Вклад в документацию Project X", - link: "/ru/document/document.md", - }, - ], + link: "/ru/document/document.md" + } + ] }, { text: "Простыми словами", @@ -172,41 +172,41 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "[Глава 1] Руководство для новичков простым языком", - link: "/ru/document/level-0/ch01-preface.md", + link: "/ru/document/level-0/ch01-preface.md" }, { text: "[Глава 2] Подготовка", - link: "/ru/document/level-0/ch02-preparation.md", + link: "/ru/document/level-0/ch02-preparation.md" }, { text: "[Глава 3] Удаленный вход", - link: "/ru/document/level-0/ch03-ssh.md", + link: "/ru/document/level-0/ch03-ssh.md" }, { text: "[Глава 4] Защита безопасности", - link: "/ru/document/level-0/ch04-security.md", + link: "/ru/document/level-0/ch04-security.md" }, { text: "[Глава 5] Создание веб-сайта", - link: "/ru/document/level-0/ch05-webpage.md", + link: "/ru/document/level-0/ch05-webpage.md" }, { text: "[Глава 6] Управление сертификатами", - link: "/ru/document/level-0/ch06-certificates.md", + link: "/ru/document/level-0/ch06-certificates.md" }, { text: "[Глава 7] Сервер Xray", - link: "/ru/document/level-0/ch07-xray-server.md", + link: "/ru/document/level-0/ch07-xray-server.md" }, { text: "[Глава 8] Клиент Xray", - link: "/ru/document/level-0/ch08-xray-clients.md", + link: "/ru/document/level-0/ch08-xray-clients.md" }, { text: "[Глава 9] Приложение", - link: "/ru/document/level-0/ch09-appendix.md", - }, - ], + link: "/ru/document/level-0/ch09-appendix.md" + } + ] }, { text: "Советы для начинающих", @@ -215,29 +215,29 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Краткий анализ функции Fallbacks", - link: "/ru/document/level-1/fallbacks-lv1.md", + link: "/ru/document/level-1/fallbacks-lv1.md" }, { text: "Краткий анализ функции маршрутизации (Часть 1)", - link: "/ru/document/level-1/routing-lv1-part1.md", + link: "/ru/document/level-1/routing-lv1-part1.md" }, { text: "Краткий анализ функции маршрутизации (Часть 2)", - link: "/ru/document/level-1/routing-lv1-part2.md", + link: "/ru/document/level-1/routing-lv1-part2.md" }, { text: "Режимы работы Xray", - link: "/ru/document/level-1/work.md", + link: "/ru/document/level-1/work.md" }, { text: "SNI Fallback", - link: "/ru/document/level-1/fallbacks-with-sni.md", + link: "/ru/document/level-1/fallbacks-with-sni.md" }, { text: "Достижение точного разделения трафика (внутренний/международный) с помощью DNS", - link: "/ru/document/level-1/routing-with-dns.md", - }, - ], + link: "/ru/document/level-1/routing-with-dns.md" + } + ] }, { text: "Продвинутые советы", @@ -246,38 +246,38 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Введение в прозрачный прокси", - link: "/ru/document/level-2/transparent_proxy/transparent_proxy.md", + link: "/ru/document/level-2/transparent_proxy/transparent_proxy.md" }, { text: "Прозрачный прокси TProxy", - link: "/ru/document/level-2/tproxy.md", + link: "/ru/document/level-2/tproxy.md" }, { text: "Прозрачный прокси TProxy (IPv4 и IPv6)", - link: "/ru/document/level-2/tproxy_ipv4_and_ipv6.md", + link: "/ru/document/level-2/tproxy_ipv4_and_ipv6.md" }, { text: "Создание TLS-туннеля с Nginx или Haproxy для скрытия отпечатков", - link: "/ru/document/level-2/nginx_or_haproxy_tls_tunnel.md", + link: "/ru/document/level-2/nginx_or_haproxy_tls_tunnel.md" }, { text: "Прозрачный прокси GID", - link: "/ru/document/level-2/iptables_gid.md", + link: "/ru/document/level-2/iptables_gid.md" }, { text: "Перенаправление исходящего трафика", - link: "/ru/document/level-2/redirect.md", + link: "/ru/document/level-2/redirect.md" }, { text: "Улучшение безопасности прокси с помощью Cloudflare Warp", - link: "/ru/document/level-2/warp.md", + link: "/ru/document/level-2/warp.md" }, { text: "Статистика трафика", - link: "/ru/document/level-2/traffic_stats.md", - }, - ], - }, + link: "/ru/document/level-2/traffic_stats.md" + } + ] + } ], "/ru/development/": [ { @@ -287,17 +287,17 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Компиляция", - link: "/ru/development/intro/compile.md", + link: "/ru/development/intro/compile.md" }, { text: "Дизайн", - link: "/ru/development/intro/design.md", + link: "/ru/development/intro/design.md" }, { text: "Принципы разработки", - link: "/ru/development/intro/guide.md", - }, - ], + link: "/ru/development/intro/guide.md" + } + ] }, { text: "Детали протоколов", @@ -305,21 +305,21 @@ export const sidebar: DefaultTheme.Config["sidebar"] = { items: [ { text: "Протокол VLESS", - link: "/ru/development/protocols/vless.md", + link: "/ru/development/protocols/vless.md" }, { text: "Протокол VMess", - link: "/ru/development/protocols/vmess.md", + link: "/ru/development/protocols/vmess.md" }, { text: "Протокол Mux.Cool", - link: "/ru/development/protocols/muxcool.md", + link: "/ru/development/protocols/muxcool.md" }, { text: "Протокол mKCP", - link: "/ru/development/protocols/mkcp.md", - }, - ], - }, - ], -}; + link: "/ru/development/protocols/mkcp.md" + } + ] + } + ] +} diff --git a/.vitepress/theme/components/BackToTop.vue b/.vitepress/theme/components/BackToTop.vue index 196fd828..70676082 100644 --- a/.vitepress/theme/components/BackToTop.vue +++ b/.vitepress/theme/components/BackToTop.vue @@ -1,25 +1,25 @@