proxy-providers:
  MAGI:
    type: http
    path: ./providers/magi.yaml
    url: https://sub-store-backend.ddtw.site/download/MAGI?target=ClashMeta
    interval: 86400
  ASH:
    type: http
    path: ./providers/ash.yaml
    url: https://sub-store-backend.ddtw.site/download/ASH?target=ClashMeta
    interval: 86400
  YKK:
    type: http
    path: ./providers/ykk.yaml
    url: https://sub-store-backend.ddtw.site/download/YKK?target=ClashMeta
    interval: 86400

proxy-groups:
  - name: PROXY
    type: select
    use:
      - MAGI
      - ASH
      - YKK
  - name: GAME
    type: select
    proxies:
      - DIRECT
    use:
      - MAGI
      - ASH
      - YKK
  - name: Emby
    type: select
    use:
      - MAGI
      - ASH
      - YKK

mixed-port: 16077
port: 16078
socks-port: 16079
mode: rule
ipv6: false
allow-lan: false
log-level: error
find-process-mode: strict
client-fingerprint: chrome
tcp-concurrent: true
unified-delay: true

external-controller: 127.0.0.1:16080
external-ui: ./dashboard/
secret: Pq2e4t6uw

geodata-mode: true
geodata-loader: standard
geo-auto-update: true
geo-update-interval: 24
geox-url:
  geoip: "https://bandwagonhost.ddtw.site/Geodata/geoip.dat"
  geosite: "https://bandwagonhost.ddtw.site/Geodata/geosite.dat"
  mmdb: "https://bandwagonhost.ddtw.site/Geodata/country.mmdb"
  asn: "https://bandwagonhost.ddtw.site/Geodata/GeoLite2-ASN.mmdb"

dns:
  enable: true
  listen: 127.0.0.1:16053
  default-nameserver:
    - 119.29.29.29
    - 223.5.5.5
  nameserver:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query
  fallback:
    - tls://1.1.1.1
    - tls://8.8.8.8
  fallback-filter:
    geoip: true
    geoip-code: CN
    geosite:
      - gfw
  cache-algorithm: lru
  ipv6: false
  prefer-h3: false
  respect-rules: false
  use-hosts: true
  use-system-hosts: true
  enhanced-mode: redir-host
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter-mode: blacklist
  fake-ip-filter:
    - "*.lan"

sniffer:
  enable: false
  sniff:
    HTTP:
      ports: [80, 8080-8880]
    TLS:
      ports: [443, 8443]
    QUIC:
      ports: [443, 8443]
  skip-domain:
    - Mijia Cloud
    - "+.push.apple.com"

tun:
  enable: true
  stack: mixed
  auto-route: true
  auto-redirect: true
  auto-detect-interface: true
  dns-hijack:
    - any:53
    # - tcp://any:53

rules:
  # 域名规则
  - GEOSITE,steam@cn,DIRECT
  - GEOSITE,steam,PROXY
  - DOMAIN-SUFFIX,docstransfer.com,DIRECT
  - DOMAIN-SUFFIX,ddtw.site,DIRECT
  - DOMAIN-SUFFIX,ykk.emby.moe,Emby
  - DOMAIN-SUFFIX,ask.ash.yt,Emby
  - DOMAIN-SUFFIX,tv.ash.yt,Emby
  - DOMAIN-WILDCARD,*.ash.yt,Emby
  - DOMAIN-KEYWORD,googleapis,PROXY
  # 程序规则
  - PROCESS-PATH-REGEX,.*\\Games\\CN\\.*,DIRECT
  - PROCESS-PATH-REGEX,.*\\Games\\.*,GAME
  - PROCESS-PATH-REGEX,.*\\Bypass\\.*,DIRECT
  - PROCESS-PATH-REGEX,.*\\PikPak\\.*,DIRECT
  - PROCESS-PATH-REGEX,.*\\Thunder\ Network\\.*,DIRECT
  # 最终规则
  - GEOIP,private,DIRECT
  - GEOIP,cn,DIRECT
  - MATCH,PROXY
