Normalize json snippets

This commit is contained in:
Fangliding
2026-05-17 07:38:56 +08:00
parent 6832019145
commit 3deee863e8
18 changed files with 216 additions and 170 deletions
+27 -25
View File
@@ -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"]
}
}
```
+4 -3
View File
@@ -130,12 +130,13 @@ Xray只会嗅探 `destOverride` 中协议的域名用作路由,如果只想进
:::
```json
"domainsExcluded": [
{
"domainsExcluded": [
"courier.push.apple.com", // iOS 推送通知
"Mijia Cloud", // 米家智能设备
"dlg.io.mi.com"
]
]
}
```
> `ipsExcluded`: [string]
+4 -2
View File
@@ -128,8 +128,10 @@ VLESS 极简反向代理配置。
存在此项代表来自该用户的连接可以被用作可以用于建立反向代理隧道,同时禁用普通的正向代理用途。
```json
"reverse": {
"tag": "r-outbound"
{
"reverse": {
"tag": "r-outbound"
}
}
```
+5 -3
View File
@@ -112,9 +112,11 @@ VLESS 极简反向代理配置,会保留公网端的真实源 IP 信息。
存在此项代表该出站可以被用作 VLESS 反向代理出站,其会自动向服务端建立连接注册反向代理隧道。
```json
"reverse": {
"tag": "r-inbound",
"sniffing" : {}
{
"reverse": {
"tag": "r-inbound",
"sniffing": {}
}
}
```
+18 -14
View File
@@ -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 的配置一样
}
]
}
}
```
+14 -10
View File
@@ -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
}
}
```
+27 -25
View File
@@ -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"]
}
}
```
+4 -2
View File
@@ -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]
+4 -2
View File
@@ -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"
}
}
```
+5 -3
View File
@@ -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": {}
}
}
```
+18 -14
View File
@@ -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
}
]
}
}
```
+14 -10
View File
@@ -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
}
}
```
+27 -25
View File
@@ -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"]
}
}
```
+4 -3
View File
@@ -145,12 +145,13 @@ Xray будет использовать доменные имена, обнар
:::
```json
"domainsExcluded": [
{
"domainsExcluded": [
"courier.push.apple.com", // Push-уведомления iOS
"Mijia Cloud", // Умные устройства Mijia
"dlg.io.mi.com"
]
]
}
```
> `ipsExcluded`: [string]
+4 -2
View File
@@ -141,8 +141,10 @@ XTLS доступен только в следующих комбинациях
Наличие этого параметра означает, что соединение от данного пользователя может быть использовано для установления туннеля обратного прокси, при этом обычное использование в качестве прямого прокси отключается.
```json
"reverse": {
"tag": "r-outbound"
{
"reverse": {
"tag": "r-outbound"
}
}
```
+5 -3
View File
@@ -114,9 +114,11 @@ Splice - это функция, предоставляемая ядром Linux,
Наличие этого параметра означает, что данное исходящее соединение может быть использовано как исходящее соединение обратного прокси VLESS. Оно автоматически установит соединение с сервером для регистрации туннеля обратного прокси.
```json
"reverse": {
"tag": "r-inbound",
"sniffing" : {}
{
"reverse": {
"tag": "r-inbound",
"sniffing": {}
}
}
```
+18 -14
View File
@@ -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
}
]
}
}
```
+14 -10
View File
@@ -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
}
}
```