From 3deee863e88eaebb082b05a2538d76454b980265 Mon Sep 17 00:00:00 2001 From: Fangliding Date: Sun, 17 May 2026 07:37:21 +0800 Subject: [PATCH] Normalize json snippets --- docs/config/api.md | 52 +++++++++++++++------------- docs/config/inbound.md | 7 ++-- docs/config/inbounds/vless.md | 6 ++-- docs/config/outbounds/vless.md | 8 +++-- docs/config/reverse.md | 32 +++++++++-------- docs/config/transports/sockopt.md | 24 +++++++------ docs/en/config/api.md | 52 +++++++++++++++------------- docs/en/config/inbound.md | 6 ++-- docs/en/config/inbounds/vless.md | 6 ++-- docs/en/config/outbounds/vless.md | 8 +++-- docs/en/config/reverse.md | 32 +++++++++-------- docs/en/config/transports/sockopt.md | 24 +++++++------ docs/ru/config/api.md | 52 +++++++++++++++------------- docs/ru/config/inbound.md | 7 ++-- docs/ru/config/inbounds/vless.md | 6 ++-- docs/ru/config/outbounds/vless.md | 8 +++-- docs/ru/config/reverse.md | 32 +++++++++-------- docs/ru/config/transports/sockopt.md | 24 +++++++------ 18 files changed, 216 insertions(+), 170 deletions(-) diff --git a/docs/config/api.md b/docs/config/api.md index 0fb7176c..69f2ce15 100644 --- a/docs/config/api.md +++ b/docs/config/api.md @@ -48,42 +48,44 @@ API 服务监听的 IP 和端口。这是一个可选配置项。 可以在 inbounds 配置中增加一个 api 的 inbound ```json -"inbounds": [ - { - "listen": "127.0.0.1", - "port": 10085, - "protocol": "dokodemo-door", - "settings": { - "rewriteAddress": "127.0.0.1" - }, - "tag": "api" - } -] +{ + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 10085, + "protocol": "dokodemo-door", + "settings": { + "rewriteAddress": "127.0.0.1" + }, + "tag": "api" + } + ] +} ``` 在路由配置中增加针对 api inbound 的路由规则 ```json -"routing": { - "rules": [ - { - "inboundTag": [ - "api" - ], - "outboundTag": "api" - } - ] +{ + "routing": { + "rules": [ + { + "inboundTag": ["api"], + "outboundTag": "api" + } + ] + } } ``` 在基础配置中增加 api ```json -"api": { - "tag": "api", - "services": [ - "StatsService" - ] +{ + "api": { + "tag": "api", + "services": ["StatsService"] + } } ``` diff --git a/docs/config/inbound.md b/docs/config/inbound.md index 649ebe37..bee54341 100644 --- a/docs/config/inbound.md +++ b/docs/config/inbound.md @@ -130,12 +130,13 @@ Xray只会嗅探 `destOverride` 中协议的域名用作路由,如果只想进 ::: ```json -"domainsExcluded": [ +{ + "domainsExcluded": [ "courier.push.apple.com", // iOS 推送通知 "Mijia Cloud", // 米家智能设备 "dlg.io.mi.com" -] - + ] +} ``` > `ipsExcluded`: [string] diff --git a/docs/config/inbounds/vless.md b/docs/config/inbounds/vless.md index d5f84df5..d808683a 100644 --- a/docs/config/inbounds/vless.md +++ b/docs/config/inbounds/vless.md @@ -128,8 +128,10 @@ VLESS 极简反向代理配置。 存在此项代表来自该用户的连接可以被用作可以用于建立反向代理隧道,同时禁用普通的正向代理用途。 ```json -"reverse": { - "tag": "r-outbound" +{ + "reverse": { + "tag": "r-outbound" + } } ``` diff --git a/docs/config/outbounds/vless.md b/docs/config/outbounds/vless.md index 1e5ec160..f796f454 100644 --- a/docs/config/outbounds/vless.md +++ b/docs/config/outbounds/vless.md @@ -112,9 +112,11 @@ VLESS 极简反向代理配置,会保留公网端的真实源 IP 信息。 存在此项代表该出站可以被用作 VLESS 反向代理出站,其会自动向服务端建立连接注册反向代理隧道。 ```json -"reverse": { - "tag": "r-inbound", - "sniffing" : {} +{ + "reverse": { + "tag": "r-inbound", + "sniffing": {} + } } ``` diff --git a/docs/config/reverse.md b/docs/config/reverse.md index 1e5c1fff..c458a737 100644 --- a/docs/config/reverse.md +++ b/docs/config/reverse.md @@ -121,13 +121,15 @@ 反向代理配置: ```json -"reverse": { - "bridges": [ - { - "tag": "bridge", - "domain": "reverse-proxy.xray.internal" - } - ] +{ + "reverse": { + "bridges": [ + { + "tag": "bridge", + "domain": "reverse-proxy.xray.internal" + } + ] + } } ``` @@ -198,13 +200,15 @@ outbound: 反向代理配置: ```json -"reverse": { - "portals": [ - { - "tag": "portal", - "domain": "reverse-proxy.xray.internal" // 必须和 bridge 的配置一样 - } - ] +{ + "reverse": { + "portals": [ + { + "tag": "portal", + "domain": "reverse-proxy.xray.internal" // 必须和 bridge 的配置一样 + } + ] + } } ``` diff --git a/docs/config/transports/sockopt.md b/docs/config/transports/sockopt.md index f241d43e..b0fa238b 100644 --- a/docs/config/transports/sockopt.md +++ b/docs/config/transports/sockopt.md @@ -240,15 +240,17 @@ PS: 如果有正常上网的域名流量被 AsIs 的 freedom 出站送过来, 使用前请确保你了解 Socket 编程。 ```json -"customSockopt": [ - { - "system": "linux", - "type": "str", - "level":"6", - "opt": "13", - "value": "bbr" - } -] +{ + "customSockopt": [ + { + "system": "linux", + "type": "str", + "level": "6", + "opt": "13", + "value": "bbr" + } + ] +} ``` > `system`: "" @@ -286,11 +288,13 @@ RFC-8305 实现的 happyEyeballs,仅适用于 TCP。当目标为域名时对 ### HappyEyeballsObject ```json -"happyEyeballs": { +{ + "happyEyeballs": { "tryDelayMs": 250, "prioritizeIPv6": false, "interleave": 1, "maxConcurrentTry": 4 + } } ``` diff --git a/docs/en/config/api.md b/docs/en/config/api.md index 102f0bbe..77ee79e8 100644 --- a/docs/en/config/api.md +++ b/docs/en/config/api.md @@ -48,42 +48,44 @@ The list of enabled APIs. See [API List](#supported-api-list) for available valu You can add an `api` inbound in the `inbounds` configuration: ```json -"inbounds": [ - { - "listen": "127.0.0.1", - "port": 10085, - "protocol": "dokodemo-door", - "settings": { - "rewriteAddress": "127.0.0.1" - }, - "tag": "api" - } -] +{ + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 10085, + "protocol": "dokodemo-door", + "settings": { + "rewriteAddress": "127.0.0.1" + }, + "tag": "api" + } + ] +} ``` Add a routing rule for the `api` inbound in the `routing` configuration: ```json -"routing": { - "rules": [ - { - "inboundTag": [ - "api" - ], - "outboundTag": "api" - } - ] +{ + "routing": { + "rules": [ + { + "inboundTag": ["api"], + "outboundTag": "api" + } + ] + } } ``` Add `api` in the basic configuration: ```json -"api": { - "tag": "api", - "services": [ - "StatsService" - ] +{ + "api": { + "tag": "api", + "services": ["StatsService"] + } } ``` diff --git a/docs/en/config/inbound.md b/docs/en/config/inbound.md index 799f6f70..6e4d8720 100644 --- a/docs/en/config/inbound.md +++ b/docs/en/config/inbound.md @@ -129,11 +129,13 @@ If you need to troubleshoot the cause of certain problems, you can test by disab ::: ```json -"domainsExcluded": [ +{ + "domainsExcluded": [ "courier.push.apple.com", // iOS push notifications "Mijia Cloud", // Mijia smart devices "dlg.io.mi.com" -] + ] +} ``` > `ipsExcluded`: [string] diff --git a/docs/en/config/inbounds/vless.md b/docs/en/config/inbounds/vless.md index 60352a03..0a28ec10 100644 --- a/docs/en/config/inbounds/vless.md +++ b/docs/en/config/inbounds/vless.md @@ -128,8 +128,10 @@ VLESS simplified reverse proxy configuration. The presence of this item indicates that connections from this user can be used to establish a reverse proxy tunnel, while disabling normal forward proxy usage. ```json -"reverse": { - "tag": "r-outbound" +{ + "reverse": { + "tag": "r-outbound" + } } ``` diff --git a/docs/en/config/outbounds/vless.md b/docs/en/config/outbounds/vless.md index 73debca1..fc129806 100644 --- a/docs/en/config/outbounds/vless.md +++ b/docs/en/config/outbounds/vless.md @@ -112,9 +112,11 @@ VLESS minimalist reverse proxy configuration. It preserves the real source IP in The existence of this item indicates that this outbound can be used as a VLESS reverse proxy outbound, and it will automatically establish a connection to the server to register the reverse proxy tunnel. ```json -"reverse": { - "tag": "r-inbound", - "sniffing" : {} +{ + "reverse": { + "tag": "r-inbound", + "sniffing": {} + } } ``` diff --git a/docs/en/config/reverse.md b/docs/en/config/reverse.md index 9d801d5a..552ec19c 100644 --- a/docs/en/config/reverse.md +++ b/docs/en/config/reverse.md @@ -121,13 +121,15 @@ The `bridge` usually requires two outbounds: one for connecting to the `portal` Reverse Proxy Configuration: ```json -"reverse": { - "bridges": [ - { - "tag": "bridge", - "domain": "reverse-proxy.xray.internal" - } - ] +{ + "reverse": { + "bridges": [ + { + "tag": "bridge", + "domain": "reverse-proxy.xray.internal" + } + ] + } } ``` @@ -199,13 +201,15 @@ The `portal` usually requires two inbounds: one to receive connections from the Reverse Proxy Configuration: ```json -"reverse": { - "portals": [ - { - "tag": "portal", - "domain": "reverse-proxy.xray.internal" // Must be the same as the bridge configuration - } - ] +{ + "reverse": { + "portals": [ + { + "tag": "portal", + "domain": "reverse-proxy.xray.internal" // Must be the same as the bridge configuration + } + ] + } } ``` diff --git a/docs/en/config/transports/sockopt.md b/docs/en/config/transports/sockopt.md index 285354c2..8d1fea9e 100644 --- a/docs/en/config/transports/sockopt.md +++ b/docs/en/config/transports/sockopt.md @@ -236,15 +236,17 @@ An array for advanced users to specify any needed socket option. In theory, all Make sure you understand socket programming before using it. ```json -"customSockopt": [ - { - "system": "linux", - "type": "str", - "level": "6", - "opt": "13", - "value": "bbr" - } -] +{ + "customSockopt": [ + { + "system": "linux", + "type": "str", + "level": "6", + "opt": "13", + "value": "bbr" + } + ] +} ``` > `system`: "" @@ -282,11 +284,13 @@ Do not use this together with the `domainStrategy` on a `Freedom` outbound, beca ### HappyEyeballsObject ```json -"happyEyeballs": { +{ + "happyEyeballs": { "tryDelayMs": 250, "prioritizeIPv6": false, "interleave": 1, "maxConcurrentTry": 4 + } } ``` diff --git a/docs/ru/config/api.md b/docs/ru/config/api.md index 32bb8cb3..da7b7eb4 100644 --- a/docs/ru/config/api.md +++ b/docs/ru/config/api.md @@ -52,42 +52,44 @@ IP-адрес и порт, на котором прослушивает API-се Можно добавить входящее подключение api в раздел inbounds: ```json -"inbounds": [ - { - "listen": "127.0.0.1", - "port": 10085, - "protocol": "dokodemo-door", - "settings": { - "rewriteAddress": "127.0.0.1" - }, - "tag": "api" - } -] +{ + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 10085, + "protocol": "dokodemo-door", + "settings": { + "rewriteAddress": "127.0.0.1" + }, + "tag": "api" + } + ] +} ``` Добавить правило маршрутизации для входящего подключения api в раздел routing: ```json -"routing": { - "rules": [ - { - "inboundTag": [ - "api" - ], - "outboundTag": "api" - } - ] +{ + "routing": { + "rules": [ + { + "inboundTag": ["api"], + "outboundTag": "api" + } + ] + } } ``` Добавить api в основные настройки: ```json -"api": { - "tag": "api", - "services": [ - "StatsService" - ] +{ + "api": { + "tag": "api", + "services": ["StatsService"] + } } ``` diff --git a/docs/ru/config/inbound.md b/docs/ru/config/inbound.md index cdb59567..533daa27 100644 --- a/docs/ru/config/inbound.md +++ b/docs/ru/config/inbound.md @@ -145,12 +145,13 @@ Xray будет использовать доменные имена, обнар ::: ```json -"domainsExcluded": [ +{ + "domainsExcluded": [ "courier.push.apple.com", // Push-уведомления iOS "Mijia Cloud", // Умные устройства Mijia "dlg.io.mi.com" -] - + ] +} ``` > `ipsExcluded`: [string] diff --git a/docs/ru/config/inbounds/vless.md b/docs/ru/config/inbounds/vless.md index dd87c3d6..d9e0ffce 100644 --- a/docs/ru/config/inbounds/vless.md +++ b/docs/ru/config/inbounds/vless.md @@ -141,8 +141,10 @@ XTLS доступен только в следующих комбинациях Наличие этого параметра означает, что соединение от данного пользователя может быть использовано для установления туннеля обратного прокси, при этом обычное использование в качестве прямого прокси отключается. ```json -"reverse": { - "tag": "r-outbound" +{ + "reverse": { + "tag": "r-outbound" + } } ``` diff --git a/docs/ru/config/outbounds/vless.md b/docs/ru/config/outbounds/vless.md index b2d2a23b..b69f24e0 100644 --- a/docs/ru/config/outbounds/vless.md +++ b/docs/ru/config/outbounds/vless.md @@ -114,9 +114,11 @@ Splice - это функция, предоставляемая ядром Linux, Наличие этого параметра означает, что данное исходящее соединение может быть использовано как исходящее соединение обратного прокси VLESS. Оно автоматически установит соединение с сервером для регистрации туннеля обратного прокси. ```json -"reverse": { - "tag": "r-inbound", - "sniffing" : {} +{ + "reverse": { + "tag": "r-inbound", + "sniffing": {} + } } ``` diff --git a/docs/ru/config/reverse.md b/docs/ru/config/reverse.md index 19d60a6e..a2bece53 100644 --- a/docs/ru/config/reverse.md +++ b/docs/ru/config/reverse.md @@ -121,13 +121,15 @@ Конфигурация обратного прокси: ```json -"reverse": { - "bridges": [ - { - "tag": "bridge", - "domain": "reverse-proxy.xray.internal" - } - ] +{ + "reverse": { + "bridges": [ + { + "tag": "bridge", + "domain": "reverse-proxy.xray.internal" + } + ] + } } ``` @@ -199,13 +201,15 @@ outbound: Конфигурация обратного прокси: ```json -"reverse": { - "portals": [ - { - "tag": "portal", - "domain": "reverse-proxy.xray.internal" // Должно совпадать с конфигурацией bridge - } - ] +{ + "reverse": { + "portals": [ + { + "tag": "portal", + "domain": "reverse-proxy.xray.internal" // Должно совпадать с конфигурацией bridge + } + ] + } } ``` diff --git a/docs/ru/config/transports/sockopt.md b/docs/ru/config/transports/sockopt.md index 8dddad41..a27b56be 100644 --- a/docs/ru/config/transports/sockopt.md +++ b/docs/ru/config/transports/sockopt.md @@ -234,15 +234,17 @@ Sockopt используется для настройки низкоуровн Используйте этот механизм только если понимаете socket programming. ```json -"customSockopt": [ - { - "system": "linux", - "type": "str", - "level": "6", - "opt": "13", - "value": "bbr" - } -] +{ + "customSockopt": [ + { + "system": "linux", + "type": "str", + "level": "6", + "opt": "13", + "value": "bbr" + } + ] +} ``` > `system`: "" @@ -280,11 +282,13 @@ Sockopt используется для настройки низкоуровн ### HappyEyeballsObject ```json -"happyEyeballs": { +{ + "happyEyeballs": { "tryDelayMs": 250, "prioritizeIPv6": false, "interleave": 1, "maxConcurrentTry": 4 + } } ```