mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-10-01 19:38:14 +03:00
Normalize json snippets
This commit is contained in:
+27
-25
@@ -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"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user