@
Kepy 用最新 v1.12 写一个
{
  "dns": {
    "servers": [
         //dns 节点忽略,自己填
     ],
    "rules": [
         //dns 规则忽略,自己填
     ],
    "strategy": "ipv4_only"
  },
  "inbounds": [
    {
      "type": "tun",
      "address": "172.19.0.1/30",
      "auto_route": true,
      "auto_redirect": true,
      "strict_route": false
    },
    {
      "type": "mixed",
      "tag": "mixed",
      "listen": "0.0.0.0",
      "listen_port": 1080
    }
  ],
  "outbounds": [
    {
      "type": "anytls",
      "tag": "anytls-out",
      //外网出口,细节省略
    },
    {
      "type": "wireguard",
      "tag": "home-out",
      //家里出口,细节省略
    },
    {
      "type": "direct",
      "tag": "direct"
      //直连出口
    },
    {
      "type": "block",
      "tag": "block"
    }
  ],
  "route": {
    "rules": [
      {
        "action": "sniff"
      },
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "protocol": "dns"
          },
          {
            "port": 53
          }
        ],
        "action": "hijack-dns"
      },
      {
        "ip_cidr": [
          "154.23.161.57/32"
        ],
        "outbound": "direct"
      },
      {
        "ip_cidr": [
          "10.10.0.0/24"
        ],
        "outbound": "home-out"
        //指定网段走家里出口
      },
      {
        "process_name": [
          "ToDesk.exe"
        ],
        "outbound": "direct"
       //指定进程走直连
      },
      {
        "domain_suffix": [
          "
bilibili.com",
          "
douyin.com"
        ],
        "outbound": "anytls-out"
       //指定域名后缀走外网出口 anytls-out
      },
      {
        "rule_set": "geosite-geolocation-cn",
        "outbound": "direct"
       //国内网站走直连, 其实这个就可以覆盖 
bilibili.com, 
douyin.com      },
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "rule_set": "geoip-cn"
          },
          {
            "rule_set": "geosite-geolocation-!cn",
            "invert": true
          }
        ],
        "outbound": "direct"
       //没有收集到网站,但是中国 ip 的走直连
      }
    ],
    "rule_set": [
      {
        "type": "remote",
        "tag": "geosite-category-ads-all",
        "format": "binary",
        "url": "
https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs"
      },
      {
        "type": "remote",
        "tag": "geoip-cn",
        "format": "binary",
        "url": "
https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs"
      },
      {
        "type": "remote",
        "tag": "geosite-geolocation-cn",
        "format": "binary",
        "url": "
https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs"
      },
      {
        "type": "remote",
        "tag": "geosite-geolocation-!cn",
        "format": "binary",
        "url": "
https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs"
      }
    ],
    "default_domain_resolver": "local",
    "auto_detect_interface": true
  }
}