mode: rule
mixed-port: 7890
allow-lan: true
log-level: info
ipv6: true
external-controller: ""
unified-delay: true
bind-address: "*"
profile:
  store-selected: true
rule-anchor:
  ip:
    type: http
    interval: 86400
    behavior: ipcidr
    format: mrs
  domain:
    type: http
    interval: 86400
    behavior: domain
    format: mrs
tun:
  auto-detect-interface: true
  auto-route: true
  device: Mihomo
  dns-hijack:
    - any:53
  mtu: 1500
  # 早期方案使用 MTU 1350；最终配置改为通过 route-exclude-address 绕过内网地址，因此 TUN MTU 恢复为 1500。
  route-exclude-address:
    - 10.0.0.0/8
    - 172.16.0.0/12
    - 192.168.0.0/16
  stack: gvisor
  strict-route: true
  enable: true
geox-url:
  geoip: https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat
  geosite: https://testingcf.jsdelivr.net/gh/v2fly/domain-list-community@release/dlc.dat
  mmdb: https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb
dns:
  default-nameserver:
    - "223.5.5.5"
    - "120.53.53.53"
  direct-nameserver:
    - "https://223.5.5.5/dns-query"
    - "https://doh.pub/dns-query"
  direct-nameserver-follow-policy: true
  enable: true
  enhanced-mode: fake-ip
  fake-ip-filter:
    - geosite:connectivity-check
    - geosite:private
    - "*.lan"
    - "*.local"
    - "*.arpa"
    - time.*.com
    - ntp.*.com
    - localhost.ptlogin2.qq.com
    - +.shanghaitech.edu.cn
    - +.geekpie.club
    - +.opentech.top
    - +.github.com
  fake-ip-filter-mode: blacklist
  fake-ip-range: 198.18.0.1/16
  fallback:
    - https://dns11.quad9.net/dns-query
    - https://dns.google/dns-query
  fallback-filter:
    domain:
      - +.google.com
      - +.facebook.com
      - +.youtube.com
    geoip: true
    geoip-code: CN
    ipcidr:
      - 240.0.0.0/4
      - 0.0.0.0/32
  ipv6: true
  listen: 0.0.0.0:53
  nameserver:
    - "https://223.5.5.5/dns-query"
    - "https://doh.pub/dns-query"
    - "https://dns11.quad9.net/dns-query"
  nameserver-policy:
    +.edu.cn:
      - "https://223.5.5.5/dns-query"
      - "https://doh.pub/dns-query"
    +.packyapi.com:
      - "https://223.5.5.5/dns-query"
      - "https://doh.pub/dns-query"
    +.shanghaitech.edu.cn:
      - "https://223.5.5.5/dns-query"
      - "https://doh.pub/dns-query"
    geosite:cn:
      - "https://223.5.5.5/dns-query"
      - "https://doh.pub/dns-query"
    geosite:private:
      - "https://223.5.5.5/dns-query"
      - "https://doh.pub/dns-query"
  prefer-h3: true
  proxy-server-nameserver:
    - "https://223.5.5.5/dns-query"
    - "https://doh.pub/dns-query"
  respect-rules: true
  use-hosts: true
  use-system-hosts: false
prepend-proxy-groups:
  - name: GLOBAL
    type: select
    proxies:
      - 填你自己的机场代理组名称
      - 如果你有几个的话可以在这里添加
tcp-concurrent: true
prepend-rules:
  - DOMAIN-KEYWORD,quad9,DIRECT
  - GEOSITE,geolocation-!cn@cn,DIRECT
  - GEOSITE,geolocation-!cn,GLOBAL
  - GEOSITE,geolocation-cn@!cn,GLOBAL
  - GEOSITE,geolocation-cn,DIRECT
  - GEOSITE,tld-cn,DIRECT
  - GEOIP,LAN,DIRECT,no-resolve
  - GEOIP,CN,DIRECT,no-resolve
  - DOMAIN-SUFFIX,google.com,GLOBAL
  - DOMAIN-SUFFIX,googleapis.com,GLOBAL
  - DOMAIN-SUFFIX,chatgpt.com,GLOBAL
  - DOMAIN-SUFFIX,github.com,DIRECT
  - DOMAIN-SUFFIX,shanghaitech.edu.cn,DIRECT
  - DOMAIN-SUFFIX,nju.edu.cn,DIRECT
  - DOMAIN-SUFFIX,tsinghua.edu.cn,DIRECT
  - DOMAIN-SUFFIX,battle.net,DIRECT
  - DOMAIN-SUFFIX,packyapi.com,DIRECT
  - DOMAIN-SUFFIX,deepseek.com,DIRECT
  - IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
  - IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
  - IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
