关于在梅林固件使用Xray-UI的一些问题

9月29号Xray-UI更新了新的版本,刚好需要搭建高速公路,就用这个试了试.

先说说我的需求
1.指定域名走代理
2.DNS不要泄露

入站创建了tun
出站创建了vless,driect,block
使用了xray-ui自带的DNS防泄漏功能.

但是创建出来的配置文件总是会把所有的dns查询走高速公路(sys:dns.upstream 规则影响),未按照我需要的进行分流.

其中sys:dns-out,sys:dns-in,sys:dns.intercept,sys:dns.upstream这些出入口和规则是XRAY-ui自己生成的(开了功能自带的DNS防泄漏). 但是我想搞一个通用的配置文件,让桌面版,手机版和路由器的xray-core能够通用.有没有好心的大佬帮忙斧正或者指导一下的

{
  "log": {
    "access": "/opt/share/xrayui/logs/xray_access.log",
    "error": "/opt/share/xrayui/logs/xray_error.log",
    "loglevel": "warning"
  },
  "dns": {
    "tag": "dnsQuery",
    "servers": [
      {
        "address": "223.5.5.5",
        "domains": [
          "geosite:cn"
        ]
      },
      {
        "address": "https://cloudflare-dns.com/dns-query",
        "rules": [5, 6, 7],
        "domains": [
          "geosite:openai",
          "geosite:anthropic",
          "geosite:google"
        ],
        "expectIPs": []
      },
      "223.5.5.5"
    ]
  },
  "inbounds": [
    {
      "protocol": "tun",
      "tag": "tun",
      "settings": {
        "name": "xray",
        "gateway": [
          "172.19.0.1/30"
        ]
      },
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls",
          "quic"
        ]
      }
    },
    {
      "protocol": "dokodemo-door",
      "listen": "127.0.0.1",
      "port": 53000,
      "tag": "sys:dns-in",
      "settings": {
        "address": "1.1.1.1",
        "port": 53,
        "network": "tcp,udp",
        "followRedirect": false
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "vless",
      "tag": "vless",
      "surl": "",
      "settings": {
        "vnext": [
          {
            "address": "",
            "port": 0,
            "users": [
              {
                "id": "",
                "email": "",
                "encryption": "none",
                "flow": "xtls-rprx-vision"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "security": "reality",
        "realitySettings": {
          "serverName": "",
          "fingerprint": "chrome",
          "publicKey": "",
          "shortId": ""
        }
      }
    },
    {
      "protocol": "freedom",
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "tag": "block"
    },
    {
      "protocol": "dns",
      "tag": "sys:dns-out"
    }
  ],
  "routing": {
    "rules": [
      {
        "idx": -3,
        "name": "sys:dns.intercept",
        "type": "field",
        "inboundTag": [
          "sys:dns-in"
        ],
        "outboundTag": "sys:dns-out"
      },
      {
        "idx": -2,
        "name": "sys:dns.upstream",
        "type": "field",
        "inboundTag": [
          "dnsQuery"
        ],
        "outboundTag": "vless"
      },
      {
        "idx": 2,
        "name": "阻断UDP443",
        "port": "443",
        "type": "field",
        "network": "udp",
        "outboundTag": "block"
      },
      {
        "idx": 3,
        "name": "绕过局域网",
        "domain": [
          "geosite:private"
        ],
        "ip": [
          "geoip:private"
        ],
        "type": "field",
        "inboundTag": [
          "tun"
        ],
        "outboundTag": "direct"
      },
      {
        "idx": 4,
        "name": "国内直连",
        "domain": [
          "geosite:cn"
        ],
        "ip": [
          "geoip:cn"
        ],
        "type": "field",
        "inboundTag": [
          "tun"
        ],
        "outboundTag": "direct"
      },
      {
        "idx": 5,
        "name": "代理长城",
        "domain": [
          "geosite:gfw"
        ],
        "type": "field",
        "inboundTag": [
          "tun"
        ],
        "outboundTag": "dmit-vless"
      },
      {
        "idx": 6,
        "name": "代理AI",
        "domain": [
          "geosite:openai",
          "geosite:anthropic"
        ],
        "type": "field",
        "inboundTag": [
          "tun"
        ],
        "outboundTag": "dmit-vless"
      },
      {
        "idx": 7,
        "name": "代理Google",
        "domain": [
          "geosite:google"
        ],
        "type": "field",
        "inboundTag": [
          "tun"
        ],
        "outboundTag": "vless"
      },
      {
        "idx": 8,
        "name": "兜底直连",
        "type": "field",
        "inboundTag": [
          "tun"
        ],
        "outboundTag": "direct"
      }
    ],
    "policies": []
  }
}