routerOS 容器内安装 sing-box,使用的 Tun 模式, route 字段没搞懂匹配规则,咨询下大家

1次阅读

共计 1428 个字符,预计需要花费 4 分钟才能阅读完成。

配置规则如下,目前国外列表使用 fakeip 可以正常访问,国内没有添加列表,但是网站、APP 都正常访问,目前看国内都是直连,可是 final 明明使用了代理,这一点理解不了。

{
  "log": {
    "disabled": false,
    "level": "error",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "tag": "dns_local",
        "address": "114.114.114.114",
        "detour": "direct"
      },
      {
        "tag": "dns_proxy",
        "address": "https://8.8.8.8/dns-query",
        "address_resolver": "dns_local",
        "detour": "proxy"
      },
      {
        "tag": "dns_fakeip",
        "address": "fakeip"
      }
    ],
    "rules": [
      {
        "outbound": "any",
        "server": "dns_local",
        "disable_cache": true
      },
      {
        "rule_set": "geolocation-!cn",
        "server": "dns_fakeip"
      }
    ],
    "strategy": "ipv4_only",
    "fakeip": {
      "enabled": true,
      "inet4_range": "198.18.0.0/16"
    }
  },
  "route": {
    "rule_set": [
      {
        "tag": "geosite-geolocation-!cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
        "download_detour": "direct"
      }
    ],
    "rules": [
      {
        "inbound": "dns-in",
        "outbound": "dns-out"
      },
      {
        "protocol": "dns",
        "outbound": "dns-out"
      },
      {
        "port": 53,
        "outbound": "dns-out"
      },
      {
        "ip_is_private": true,
        "outbound": "direct"
      }
    ],
    "final": "proxy",
    "default_interface": "ether0"
  },
  "inbounds": [
    {
      "type": "direct",
      "tag": "dns-in",
      "listen": "0.0.0.0",
      "listen_port": 53
    },
    {
      "type": "tun",
      "tag": "tun-in",
      "inet4_address": "198.18.0.0/16",
      "strict_route": true,
      "stack": "system",
      "sniff": true,
      "sniff_override_destination": true
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "block",
      "tag": "block"
    },
    {
      "type": "dns",
      "tag": "dns-out"
    },
    {
       "tag": "proxy",
       "type": "vless",
       "flow": "","server":"",
       "server_port": 443 ,
       "uuid": ""
    }
  ]
}
正文完
 0