{
  "log": {
    "level": "info",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "tag": "bootstrap",
        "address": "1.1.1.1",
        "detour": "direct"
      },
      {
        "tag": "local",
        "address": "223.5.5.5",
        "detour": "direct"
      },
      {
        "tag": "local-backup",
        "address": "119.29.29.29",
        "detour": "direct"
      },
      {
        "tag": "remote",
        "address": "https://1.1.1.1/dns-query",
        "address_resolver": "bootstrap",
        "detour": "proxy"
      },
      {
        "tag": "remote-google",
        "address": "https://dns.google/dns-query",
        "address_resolver": "bootstrap",
        "detour": "proxy"
      },
      {
        "tag": "fakeip",
        "address": "fakeip"
      }
    ],
    "rules": [
      {
        "query_type": [
          "AAAA"
        ],
        "action": "reject"
      },
      {
        "rule_set": "geosite-category-ads-all",
        "action": "reject"
      },
      {
        "domain": [
          "localhost"
        ],
        "domain_suffix": [
          "lan",
          "local",
          "localdomain",
          "home.arpa"
        ],
        "action": "route",
        "server": "local"
      },
      {
        "domain_suffix": [
          "bing.com",
          "copilot.microsoft.com",
          "copilot.cloud.microsoft",
          "githubcopilot.com",
          "tv.apple.com",
          "news.apple.com"
        ],
        "action": "route",
        "server": "fakeip"
      },
      {
        "rule_set": "geosite-github",
        "action": "route",
        "server": "fakeip"
      },
      {
        "rule_set": [
          "geosite-private",
          "geosite-apple",
          "geosite-microsoft",
          "geosite-geolocation-cn"
        ],
        "action": "route",
        "server": "local"
      },
      {
        "rule_set": [
          "geosite-openai",
          "geosite-google",
          "geosite-youtube",
          "geosite-telegram",
          "geosite-geolocation-!cn"
        ],
        "action": "route",
        "server": "fakeip"
      }
    ],
    "final": "remote",
    "strategy": "ipv4_only",
    "fakeip": {
      "enabled": true,
      "inet4_range": "198.18.0.0/15"
    }
  },
  "ntp": {
    "enabled": true,
    "server": "time.apple.com",
    "server_port": 123,
    "interval": "30m",
    "detour": "direct"
  },
  "inbounds": [
    {
      "type": "tun",
      "tag": "tun-in",
      "address": [
        "172.19.0.1/30"
      ],
      "auto_route": true,
      "strict_route": true,
      "stack": "system"
    }
  ],
  "outbounds": [
    {
      "type": "selector",
      "tag": "proxy",
      "outbounds": [
        "自动选择",
        "自建节点-1",
        "自建节点-1-IPv6",
        "自建节点-2"
      ],
      "default": "自动选择",
      "interrupt_exist_connections": false
    },
    {
      "type": "urltest",
      "tag": "自动选择",
      "outbounds": [
        "自建节点-1",
        "自建节点-1-IPv6",
        "自建节点-2"
      ],
      "url": "https://www.gstatic.com/generate_204",
      "interval": "3m",
      "tolerance": 50,
      "idle_timeout": "30m",
      "interrupt_exist_connections": false
    },
    {
      "type": "vless",
      "tag": "自建节点-1",
      "server": "203.0.113.10",
      "server_port": 443,
      "uuid": "00000000-0000-0000-0000-000000000000",
      "flow": "xtls-rprx-vision",
      "tls": {
        "enabled": true,
        "server_name": "www.microsoft.com",
        "utls": {
          "enabled": true,
          "fingerprint": "chrome"
        },
        "reality": {
          "enabled": true,
          "public_key": "YOUR_REALITY_PUBLIC_KEY_NODE1",
          "short_id": "YOUR_REALITY_SHORT_ID_NODE1"
        }
      },
      "packet_encoding": "xudp"
    },
    {
      "type": "vless",
      "tag": "自建节点-1-IPv6",
      "server": "2001:db8:52c0:41d5::1697",
      "server_port": 443,
      "uuid": "00000000-0000-0000-0000-000000000000",
      "flow": "xtls-rprx-vision",
      "tls": {
        "enabled": true,
        "server_name": "www.microsoft.com",
        "utls": {
          "enabled": true,
          "fingerprint": "chrome"
        },
        "reality": {
          "enabled": true,
          "public_key": "YOUR_REALITY_PUBLIC_KEY_NODE1",
          "short_id": "YOUR_REALITY_SHORT_ID_NODE1"
        }
      },
      "packet_encoding": "xudp"
    },
    {
      "type": "vless",
      "tag": "自建节点-2",
      "server": "203.0.113.20",
      "server_port": 443,
      "uuid": "00000000-0000-0000-0000-000000000000",
      "flow": "xtls-rprx-vision",
      "tls": {
        "enabled": true,
        "server_name": "www.microsoft.com",
        "utls": {
          "enabled": true,
          "fingerprint": "chrome"
        },
        "reality": {
          "enabled": true,
          "public_key": "YOUR_REALITY_PUBLIC_KEY_NODE2",
          "short_id": "YOUR_REALITY_SHORT_ID_NODE2"
        }
      },
      "packet_encoding": "xudp"
    },
    {
      "type": "direct",
      "tag": "direct"
    }
  ],
  "route": {
    "rules": [
      {
        "action": "sniff"
      },
      {
        "protocol": "quic",
        "action": "reject"
      },
      {
        "protocol": "dns",
        "action": "hijack-dns"
      },
      {
        "network": "udp",
        "port": 53,
        "action": "hijack-dns"
      },
      {
        "ip_is_private": true,
        "action": "route",
        "outbound": "direct"
      },
      {
        "rule_set": "geosite-category-ads-all",
        "action": "reject"
      },
      {
        "ip_cidr": "198.18.0.0/15",
        "action": "route",
        "outbound": "proxy"
      },
      {
        "domain_suffix": [
          "bing.com",
          "copilot.microsoft.com",
          "copilot.cloud.microsoft",
          "githubcopilot.com",
          "tv.apple.com",
          "news.apple.com"
        ],
        "action": "route",
        "outbound": "proxy"
      },
      {
        "rule_set": [
          "geosite-openai",
          "geosite-google",
          "geosite-youtube",
          "geosite-telegram"
        ],
        "action": "route",
        "outbound": "proxy"
      },
      {
        "rule_set": "geosite-github",
        "action": "route",
        "outbound": "proxy"
      },
      {
        "rule_set": [
          "geosite-private",
          "geosite-apple",
          "geosite-microsoft",
          "geosite-geolocation-cn"
        ],
        "action": "route",
        "outbound": "direct"
      },
      {
        "rule_set": "geosite-geolocation-!cn",
        "action": "route",
        "outbound": "proxy"
      },
      {
        "rule_set": "geoip-cn",
        "action": "route",
        "outbound": "direct"
      }
    ],
    "rule_set": [
      {
        "tag": "geosite-category-ads-all",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-category-ads-all.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-private",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-private.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-openai",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-openai.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-google",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-google.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-youtube",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-youtube.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-telegram",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-telegram.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-github",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-github.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-apple",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-apple.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-microsoft",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-microsoft.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-geolocation-!cn",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-geolocation-!cn.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geosite-geolocation-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geosite@rule-set/geosite-geolocation-cn.srs",
        "download_detour": "direct"
      },
      {
        "tag": "geoip-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://cdn.jsdelivr.net/gh/SagerNet/sing-geoip@rule-set/geoip-cn.srs",
        "download_detour": "direct"
      }
    ],
    "final": "proxy",
    "auto_detect_interface": true
  },
  "experimental": {
    "cache_file": {
      "enabled": true
    }
  }
}
