{
  "log": {
    "disabled": false,
    "level": "info",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "tag": "google",
        "type": "https",
        "server": "8.8.8.8",
        "detour": "PROXY"
      },
      {
        "tag": "ali",
        "type": "https",
        "server": "223.5.5.5"
      },
      {
        "tag": "fakeip",
        "type": "fakeip",
        "inet4_range": "198.18.0.0/15",
        "inet6_range": "fc00::/18"
      }
    ],
    "rules": [
      {
        "clash_mode": "Direct",
        "action": "route",
        "server": "ali"
      },
      {
        "clash_mode": "Global",
        "action": "route",
        "server": "fakeip"
      },
      {
        "rule_set": "ads_domain",
        "action": "reject"
      },
      {
        "query_type": [
          "A",
          "AAAA"
        ],
        "action": "route",
        "server": "fakeip",
        "rewrite_ttl": 1
      },
      {
        "rule_set": "proxy_domain",
        "action": "route",
        "server": "google"
      },
      {
        "rule_set": "cn_domain",
        "action": "route",
        "server": "ali"
      }
    ],
    "final": "google",
    "independent_cache": true
  },
  "route": {
    "default_domain_resolver": {
      "server": "ali"
    },
    "rules": [
      {
        "action": "sniff",
        "sniffer": [
          "http",
          "tls",
          "quic",
          "dns"
        ],
        "timeout": "500ms"
      },
      {
        "type": "logical",
        "mode": "or",
        "rules": [
          {
            "port": 53
          },
          {
            "protocol": "dns"
          }
        ],
        "action": "hijack-dns"
      },
      {
        "ip_is_private": true,
        "action": "route",
        "outbound": "Direct"
      },
      {
        "clash_mode": "Global",
        "action": "route",
        "outbound": "GLOBAL"
      },
      {
        "clash_mode": "Direct",
        "action": "route",
        "outbound": "Direct"
      },
      {
        "rule_set": "ads_domain",
        "action": "route",
        "outbound": "AdBlock"
      },
      {
        "rule_set": "youtube_domain",
        "action": "route",
        "outbound": "YouTube"
      },
      {
        "rule_set": "openai_domain",
        "action": "route",
        "outbound": "Only-Ai"
      },
      {
        "type": "logical",
        "mode": "and",
        "rules": [
          {
            "rule_set": "proxy_domain"
          },
          {
            "invert": true,
            "rule_set": [
              "cn_domain",
              "google_domain",
              "telegram_domain",
              "youtube_domain",
              "openai_domain"
            ]
          }
        ],
        "action": "route",
        "outbound": "PROXY"
      },
      {
        "action": "resolve"
      },
      {
        "rule_set": [
          "telegram_ip",
          "telegram_domain"
        ],
        "action": "route",
        "outbound": "Telegram"
      },
      {
        "rule_set": [
          "google_ip",
          "google_domain"
        ],
        "action": "route",
        "outbound": "Google"
      },
      {
        "rule_set": [
          "cn_ip",
          "cn_domain"
        ],
        "action": "route",
        "outbound": "CHINA"
      }
    ],
    "rule_set": [
      {
        "tag": "ads_domain",
        "type": "remote",
        "format": "source",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/AWAvenue/AWAvenue_Domain.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "cn_ip",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/china/china_IP.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "cn_domain",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/china/china_Domain.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "google_ip",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/google/google_IP.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "google_domain",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/google/google_Domain.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "openai_domain",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/Ai/Ai_Domain.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "proxy_domain",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/proxy/proxy_Domain.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "telegram_ip",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/telegram/telegram_IP.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "telegram_domain",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/telegram/telegram_Domain.srs",
        "download_detour": "Direct"
      },
      {
        "tag": "youtube_domain",
        "type": "remote",
        "format": "binary",
        "url": "https://xiaohai-proxy.445568.xyz/rule/singbox/youtube/youtube_Domain.srs",
        "download_detour": "Direct"
      }
    ],
    "final": "Final",
    "auto_detect_interface": true
  },
  "outbounds": [
    {
      "tag": "Only-Ai",
      "type": "selector",
      "outbounds": [
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "PROXY",
        "Direct"
      ],
      "default": "PROXY"
    },
    {
      "tag": "YouTube",
      "type": "selector",
      "outbounds": [
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "PROXY",
        "Direct"
      ],
      "default": "PROXY"
    },
    {
      "tag": "Google",
      "type": "selector",
      "outbounds": [
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "PROXY",
        "Direct"
      ],
      "default": "PROXY"
    },
    {
      "tag": "Telegram",
      "type": "selector",
      "outbounds": [
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "PROXY",
        "Direct"
      ],
      "default": "PROXY"
    },
    {
      "tag": "AdBlock",
      "type": "selector",
      "outbounds": [
        "Ads-Block",
        "Direct"
      ],
      "default": "Ads-Block"
    },
    {
      "tag": "PROXY",
      "type": "selector",
      "outbounds": [
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "Direct"
      ],
      "default": "All-Auto"
    },
    {
      "tag": "CHINA",
      "type": "selector",
      "outbounds": [
        "Direct",
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "PROXY"
      ],
      "default": "Direct"
    },
    {
      "tag": "Final",
      "type": "selector",
      "outbounds": [
        "HK-Auto",
        "HK-Link",
        "TW-Auto",
        "TW-Link",
        "JP-Auto",
        "JP-Link",
        "SG-Auto",
        "SG-Link",
        "US-Auto",
        "US-Link",
        "EU-Auto",
        "EU-Link",
        "All-Auto",
        "All-Link",
        "PROXY",
        "Direct"
      ],
      "default": "PROXY"
    },
    {
      "tag": "GLOBAL",
      "type": "selector",
      "outbounds": [
        "Direct",
        "PROXY",
        "HK-Link",
        "TW-Link",
        "JP-Link",
        "SG-Link",
        "US-Link",
        "EU-Link",
        "All-Link"
      ],
      "default": "Direct"
    },
    {
      "tag": "HK-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "TW-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "JP-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "SG-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "US-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "EU-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "All-Link",
      "type": "selector",
      "outbounds": []
    },
    {
      "tag": "HK-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "TW-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "JP-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "SG-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "US-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "EU-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "All-Auto",
      "type": "urltest",
      "outbounds": [],
      "url": "http://www.gstatic.com/generate_204",
      "interval": "1m",
      "tolerance": 50
    },
    {
      "tag": "Ads-Block",
      "type": "block"
    },
    {
      "tag": "Direct",
      "type": "direct"
    }
  ],
  "inbounds": [
    {
  "type": "tun",
  "address": [
    "172.19.0.0/30",
    "fdfe:dcba:9876::0/126"
  ],
  "stack": "system",
  "auto_route": true,
  "auto_redirect": true,
  "strict_route": true,
  "platform": {
    "http_proxy": {
      "enabled": true,
      "server": "0.0.0.0",
      "server_port": 7890
    }
  }
    },
    {
      "type": "mixed",
      "listen": "0.0.0.0",
      "listen_port": 7890
    }
  ],
  "experimental": {
    "clash_api": {
      "external_controller": "0.0.0.0:9090",
      "external_ui": "ui",
      "external_ui_download_url": "https://gh.445568.xyz/https://github.com/Zephyruso/zashboard/releases/latest/download/dist-cdn-fonts.zip",
      "external_ui_download_detour": "Direct"
    },
    "cache_file": {
      "enabled": true,
      "store_fakeip": true
    }
  }
}
