mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
external-controller: 127.0.0.1:9090

ipv6: false
tcp-concurrent: true

profile:
  store-selected: true
  store-fake-ip: true

dns:
  enable: true
  ipv6: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16

  default-nameserver:
    - 223.5.5.5
    - 119.29.29.29

  direct-nameserver:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query

  proxy-server-nameserver:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query

  nameserver:
    - https://dns.cloudflare.com/dns-query#自动优选
    - https://dns.google/dns-query#自动优选

  respect-rules: true

  fake-ip-filter:
    - "*.lan"
    - "*.local"
    - "*.localhost"
    - localhost
    - time.*.com
    - ntp.*.com
    - time.windows.com
    - time.apple.com
    - time.nist.gov
    - +.pool.ntp.org
    - "*.msftconnecttest.com"
    - "*.msftncsi.com"
    - captive.apple.com
    - connectivitycheck.gstatic.com


sniffer:
  enable: true
  force-dns-mapping: true
  parse-pure-ip: true
  override-destination: true

  sniff:
    HTTP:
      ports:
        - 80
        - 8080-8880

    TLS:
      ports:
        - 443
        - 8443

    QUIC:
      ports:
        - 443
        - 8443


proxy-groups:

  # 所有 HK / CN / JP / US / SGP / TW 节点自动参加测速
  - name: 自动优选
    type: url-test
    include-all: true
    filter: "(?i)(^|[-_ ])(HK|CN|JP|US|SGP|TW)([-_ ]|$)"
    url: https://www.gstatic.com/generate_204
    expected-status: 204
    interval: 180
    tolerance: 40
    timeout: 5000
    max-failed-times: 2
    lazy: true


  # 所有匹配节点自动加入,前面的可用节点优先
  - name: 故障转移
    type: fallback
    include-all: true
    filter: "(?i)(^|[-_ ])(HK|CN|JP|US|SGP|TW)([-_ ]|$)"
    url: https://www.gstatic.com/generate_204
    expected-status: 204
    interval: 60
    timeout: 5000
    max-failed-times: 2
    lazy: false


tun:
  enable: false
  stack: system

  dns-hijack:
    - any:53
    - tcp://any:53

  auto-route: true
  auto-detect-interface: true
  strict-route: false


rules:
  - GEOIP,Private,DIRECT
  - GEOSITE,CN,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,自动优选