mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-10-04 12:58:19 +03:00
Check json format in CI
This commit is contained in:
+34
-36
@@ -150,28 +150,26 @@ The default value `UseIP` allows querying both A + AAAA records. When a query in
|
||||
`UseSystem` adapts to the operating system's network environment. Before querying, it checks whether there are IPv4 and IPv6 default gateways, thereby limiting the capabilities of all servers and setting the default query type. It checks in real-time on graphical OS environments and only once on command-line environments.
|
||||
|
||||
```json
|
||||
"dns": {
|
||||
"servers": [
|
||||
"https://1.1.1.1/dns-query",
|
||||
{
|
||||
"address": "https://8.8.8.8/dns-query",
|
||||
"domains": [
|
||||
"geosite:netflix"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv4" // netflix domain queries A record
|
||||
},
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": [
|
||||
"geosite:openai"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv6" // openai domain queries AAAA record
|
||||
}
|
||||
],
|
||||
"queryStrategy": "UseIP" // Globally query both A and AAAA records
|
||||
}
|
||||
{
|
||||
"dns": {
|
||||
"servers": [
|
||||
"https://1.1.1.1/dns-query",
|
||||
{
|
||||
"address": "https://8.8.8.8/dns-query",
|
||||
"domains": ["geosite:netflix"],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv4" // netflix domain queries A record
|
||||
},
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": ["geosite:openai"],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv6" // openai domain queries AAAA record
|
||||
}
|
||||
],
|
||||
"queryStrategy": "UseIP" // Globally query both A and AAAA records
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
::: tip TIP 1
|
||||
@@ -189,20 +187,20 @@ Global `"queryStrategy": "UseIP"` does not conflict with sub-item `"queryStrateg
|
||||
Global `"queryStrategy": "UseIP"` does not conflict with sub-item `"queryStrategy": "UseIPv4"`.
|
||||
|
||||
```json
|
||||
"dns": {
|
||||
"servers": [
|
||||
"https://1.1.1.1/dns-query",
|
||||
{
|
||||
"address": "https://8.8.8.8/dns-query",
|
||||
"domains": [
|
||||
"geosite:netflix"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv6" // Global "UseIPv4" conflicts with sub-item "UseIPv6"
|
||||
}
|
||||
],
|
||||
"queryStrategy": "UseIPv4"
|
||||
}
|
||||
{
|
||||
"dns": {
|
||||
"servers": [
|
||||
"https://1.1.1.1/dns-query",
|
||||
{
|
||||
"address": "https://8.8.8.8/dns-query",
|
||||
"domains": ["geosite:netflix"],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv6" // Global "UseIPv4" conflicts with sub-item "UseIPv6"
|
||||
}
|
||||
],
|
||||
"queryStrategy": "UseIPv4"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The sub-item query for the Netflix domain returns an empty response due to the conflicting `"queryStrategy"` value. The Netflix domain is then queried by `https://1.1.1.1/dns-query`, returning an A record.
|
||||
|
||||
@@ -11,11 +11,13 @@ Currently, you can use the fallback feature by configuring `fallbacks` when usin
|
||||
## Fallbacks Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
> `fallbacks`: \[ [FallbackObject](#fallbackobject) \]
|
||||
|
||||
+34
-36
@@ -403,45 +403,43 @@ Weight value. The larger the value, the less likely the corresponding node is to
|
||||
### Load Balancer Configuration Example
|
||||
|
||||
```json
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"inboundTag": [
|
||||
"in"
|
||||
],
|
||||
"balancerTag": "round"
|
||||
}
|
||||
],
|
||||
"balancers" : [
|
||||
{
|
||||
"selector": [
|
||||
"out"
|
||||
],
|
||||
"strategy": {
|
||||
"type":"roundRobin"
|
||||
},
|
||||
"tag": "round"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"inbounds": [
|
||||
{
|
||||
// Inbound config
|
||||
"tag": "in"
|
||||
}
|
||||
{
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"inboundTag": ["in"],
|
||||
"balancerTag": "round"
|
||||
}
|
||||
],
|
||||
|
||||
"outbounds": [
|
||||
{
|
||||
// Outbound config
|
||||
"tag": "out1"
|
||||
"balancers": [
|
||||
{
|
||||
"selector": ["out"],
|
||||
"strategy": {
|
||||
"type": "roundRobin"
|
||||
},
|
||||
{
|
||||
// Outbound config
|
||||
"tag": "out2"
|
||||
}
|
||||
"tag": "round"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"inbounds": [
|
||||
{
|
||||
// Inbound config
|
||||
"tag": "in"
|
||||
}
|
||||
],
|
||||
|
||||
"outbounds": [
|
||||
{
|
||||
// Outbound config
|
||||
"tag": "out1"
|
||||
},
|
||||
{
|
||||
// Outbound config
|
||||
"tag": "out2"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Predefined Domain List
|
||||
|
||||
@@ -108,7 +108,7 @@ Configure Xray `dokodemo-door` to listen on port 12345, enable `followRedirect`
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
Your Server Configuration
|
||||
// Your Server Configuration
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -95,17 +95,13 @@ lsmod | grep wireguard
|
||||
```json
|
||||
{
|
||||
"api": {
|
||||
"services": [
|
||||
"HandlerService",
|
||||
"LoggerService",
|
||||
"StatsService"
|
||||
],
|
||||
"services": ["HandlerService", "LoggerService", "StatsService"],
|
||||
"tag": "api"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": <port>,
|
||||
"port": 12345, // <port>
|
||||
"protocol": "dokodemo-door",
|
||||
"settings": {
|
||||
"rewriteAddress": "127.0.0.1"
|
||||
@@ -127,13 +123,13 @@ lsmod | grep wireguard
|
||||
"tag": "wg0",
|
||||
"streamSettings": {
|
||||
"sockopt": {
|
||||
"mark": // <mark>
|
||||
"mark": 255 // <mark>
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"domainStrategy": "UseIPv6"
|
||||
}
|
||||
}, // Users with fwmark set to <mark> use the specified strategy "UseIPv6" or "UseIPv4"
|
||||
}, // Users with fwmark set to <mark> use the specified strategy "UseIPv6" or "UseIPv4"
|
||||
// <--Please choose between different schemes--> Scheme 2: sendThrough
|
||||
{
|
||||
"tag": "wg0",
|
||||
@@ -174,9 +170,7 @@ lsmod | grep wireguard
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"inboundTag": [
|
||||
"api"
|
||||
],
|
||||
"inboundTag": ["api"],
|
||||
"outboundTag": "api"
|
||||
},
|
||||
{
|
||||
@@ -188,9 +182,7 @@ lsmod | grep wireguard
|
||||
},
|
||||
{
|
||||
"outboundTag": "blocked",
|
||||
"protocol": [
|
||||
"bittorrent"
|
||||
]
|
||||
"protocol": ["bittorrent"]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -125,7 +125,7 @@ The configuration file should listen on port 12345 and enable tproxy:
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
Your_Server_Configuration
|
||||
// Your Server Configuration
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ bash -c "$(curl -L wgcf-cli.vercel.app)"
|
||||
|
||||
1. Run `wgcf-cli register` to register. Output:
|
||||
|
||||
```json
|
||||
```
|
||||
❯ wgcf-cli register
|
||||
{
|
||||
"endpoint": {
|
||||
@@ -151,7 +151,7 @@ Recommended routing strategy: `IPIfNonMatch`.
|
||||
|
||||
Add the following to your existing routing rules:
|
||||
|
||||
```json
|
||||
```
|
||||
{
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
@@ -195,7 +195,7 @@ Add the following to your existing routing rules:
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"address": "My_Server_IP",
|
||||
"port": My_Port,
|
||||
"port": 12345, // My_Port
|
||||
"id": "My_UUID",
|
||||
"security": "auto"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user