mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-10 11:03:13 +00:00
65 lines
886 B
Markdown
65 lines
886 B
Markdown
|
#### 探测模式
|
||
|
|
||
|
```json
|
||
|
{
|
||
|
"inbounds": [
|
||
|
{
|
||
|
"type": "tun",
|
||
|
"inet4_address": "172.19.0.1/30",
|
||
|
"auto_route": true,
|
||
|
"sniff": true // 必须
|
||
|
}
|
||
|
],
|
||
|
"outbounds": [
|
||
|
{
|
||
|
"type": "direct"
|
||
|
},
|
||
|
{
|
||
|
"type": "dns",
|
||
|
"tag": "dns-out"
|
||
|
}
|
||
|
],
|
||
|
"route": {
|
||
|
"rules": [
|
||
|
{
|
||
|
"protocol": "dns",
|
||
|
"outbound": "dns-out"
|
||
|
}
|
||
|
],
|
||
|
"auto_detect_interface": true
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
|
||
|
#### 端口模式
|
||
|
|
||
|
```json
|
||
|
{
|
||
|
"inbounds": [
|
||
|
{
|
||
|
"type": "tun",
|
||
|
"inet4_address": "172.19.0.1/30",
|
||
|
"auto_route": true,
|
||
|
"sniff": true // 非必须
|
||
|
}
|
||
|
],
|
||
|
"outbounds": [
|
||
|
{
|
||
|
"type": "direct"
|
||
|
},
|
||
|
{
|
||
|
"type": "dns",
|
||
|
"tag": "dns-out"
|
||
|
}
|
||
|
],
|
||
|
"route": {
|
||
|
"rules": [
|
||
|
{
|
||
|
"port": 53,
|
||
|
"outbound": "dns-out"
|
||
|
}
|
||
|
],
|
||
|
"auto_detect_interface": true
|
||
|
}
|
||
|
}
|
||
|
```
|