# url 里填写自己的订阅,名称不能重复
proxy-providers:
  banana:
    type: http
    url: "https://subhub.153561999.xyz/wakawakaee/download/collection/banana"
    interval: 86400
    path: ./banana.yaml
    health-check: {enable: true,url: "http://www.apple.com/library/test/success.html",interval: 300}
 
proxies: 
  - name: "直连"
    type: direct

mixed-port: 7890
ipv6: false
allow-lan: true
unified-delay: false
tcp-concurrent: true
external-controller: 127.0.0.1:9090
external-ui: ui
external-ui-url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"
keep-alive-interval: 1800

geodata-mode: true
geodata-loader: standard
geo-auto-update: false
geo-update-interval: 24
geox-url:
  geoip: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat"
  geosite: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
  mmdb: "https://cdn.jsdelivr.net/gh/soffchen/GeoIP2-CN@release/Country.mmdb"
  asn: "https://mirror.ghproxy.com/https://github.com/xishang0128/geoip/releases/download/latest/GeoLite2-ASN.mmdb"

find-process-mode: strict
global-client-fingerprint: chrome

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

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

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

dns:
  enable: true
  ipv6: false
  respect-rules: true
  enhanced-mode: fake-ip
  fake-ip-filter:
    - "*"
    - "+.lan"
    - "+.local"
    - "+.market.xiaomi.com"
  nameserver:
    - "https://120.53.53.53/dns-query"
    - "https://223.5.5.5/dns-query"
  proxy-server-nameserver:
    - "https://120.53.53.53/dns-query"
    - "https://223.5.5.5/dns-query"
  nameserver-policy:
    "rule-set:cn_domain,private_domain":
      - "https://120.53.53.53/dns-query"
      - "https://223.5.5.5/dns-query"
    "rule-set:geolocation-!cn":
      - "https://dns.cloudflare.com/dns-query"
      - "https://dns.google/dns-query"

proxy-groups:
  - name: 自建节点
    type: select
    proxies: [claw_nb,ksco_direct,ksco_sub]

  - name: 默认
    type: select
    proxies: [自动选择,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,直连]

  - name: Google
    type: select
    proxies: [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择]

  - name: Telegram
    type: select
    proxies: [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择]

  - name: Twitter
    type: select
    proxies: [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择]
  
  - name: StreamMedia
    type: select
    proxies: [🇸🇬新加坡,🏍️ emby]

  - name: YouTube
    type: select
    proxies: [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择,直连]

  - name: Amazon
    type: select
    proxies:  [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择,直连]

  - name: Github
    type: select
    proxies:  [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择,直连]

  - name: OpenAI
    type: select
    proxies:  [默认,自建节点,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国]

  - name: Microsoft
    type: select
    proxies:  [默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择,直连]
  
  - name: Copilot
    type: select
    proxies:  [默认,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择,直连]

  - name: 新闻流媒体
    type: select
    proxies:  [默认,🇸🇬新加坡,🇺🇸美国,🇭🇰香港,🇨🇳台湾,🇯🇵日本]

  - name: 国内
    type: select
    proxies:  [直连,默认,自建节点,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择]

  - name: 下载
    type: select
    proxies: [直连,默认,bestsub,自建节点]

  - name: 其他
    type: select
    proxies:  [默认,自建节点,bestsub,🇭🇰香港,🇨🇳台湾,🇯🇵日本,🇸🇬新加坡,🇺🇸美国,全部节点,自动选择,直连]


  #分隔,下面是地区分组
  - name: 🇭🇰香港
    type: url-test
    include-all-providers: true
    filter: "(?i)港|hk|hongkong|hong kong"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
    #lazy: true
          
  - name: 🇨🇳台湾
    type: url-test
    include-all-providers: true
    filter: "(?i)台|tw|taiwan"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
    #lazy: true    

  - name: 🇯🇵日本
    type: url-test
    include-all-providers: true
    filter: "(?i)日本|jp|japan"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
    #lazy: true    

  - name: 🇺🇸美国
    type: url-test
    include-all-providers: true
    filter: "(?i)美|us|unitedstates|united states"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
    #lazy: true    

  - name: 🇸🇬新加坡
    type: url-test
    include-all-providers: true
    filter: "(?i)(新|sg|singapore)"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
    #lazy: true    

  - name: claw_nb
    type: select
    include-all-providers: true
    filter: "(?i)(claw1|claw2|CNFaster|netcup|iij)"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50

  - name: ksco_sub
    type: select
    include-all-providers: true
    filter: "(?i)(blackbird)"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50

  - name: ksco_direct
    type: select
    include-all-providers: true
    filter: "(?i)(kscodirect)"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
  
  - name: bestsub
    type: select
    include-all-providers: true
    filter: "MB"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50

  - name: 🏍️ emby
    type: url-test
    include-all-providers: true
    filter: "Emby|netflix"
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 50
    #lazy: true 

  - name: 全部节点
    type: select
    include-all: true
    exclude-filter: 直连

  - name: 自动选择
    type: url-test
    include-all: true
    exclude-filter: 直连
    url: 'http://www.apple.com/library/test/success.html'
    interval: 300
    tolerance: 10

rules:
  - RULE-SET,private_ip,直连,no-resolve
  - RULE-SET,spotify_domain,国内
  - RULE-SET,115_domian,国内
  - RULE-SET,123_domian,国内
  - RULE-SET,copilot_domain,Copilot
  - RULE-SET,pikpak_domain,下载
  - RULE-SET,amazon_domain,Amazon
  - RULE-SET,github_domain,Github
  - RULE-SET,twitter_domain,Twitter
  - RULE-SET,netflix_domain,StreamMedia 
  - RULE-SET,youtube_domain,YouTube
  - RULE-SET,google_domain,Google
  - RULE-SET,telegram_domain,Telegram
  - RULE-SET,docker_domain,下载
  - RULE-SET,cnn_domain,新闻流媒体  
  - RULE-SET,abc_domain,新闻流媒体  
  - RULE-SET,bbc_domain,新闻流媒体
  - RULE-SET,cn_domain,国内
  - RULE-SET,openai_domain,OpenAI
  - RULE-SET,microsoft_domain,Microsoft
  - RULE-SET,geolocation-!cn,其他
  - RULE-SET,gfw_domain,其他 

  - RULE-SET,google_ip,Google
  - RULE-SET,telegram_ip,Telegram
  - RULE-SET,twitter_ip,Twitter
  - RULE-SET,netflix_ip,StreamMedia
  - RULE-SET,cn_ip,国内
  - MATCH,其他

  - GEOIP,lan,直连,no-resolve
  - GEOSITE,github,Github
  - GEOSITE,twitter,Twitter
  - GEOSITE,youtube,YouTube
  - GEOSITE,google,Google
  - GEOSITE,telegram,Telegram
  - GEOSITE,CN,国内
  - GEOSITE,geolocation-!cn,其他

  - GEOIP,google,Google
  - GEOIP,telegram,Telegram
  - GEOIP,twitter,Twitter
  - GEOIP,NETFLIX,StreamMedia
  - GEOIP,CN,国内

rule-anchor:
  ip: &ip {type: http, interval: 86400, behavior: ipcidr, format: text}
  domain: &domain {type: http, interval: 86400, behavior: domain, format: text}
rule-providers:
  private_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.list"
  cn_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.list"
  amazon_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/amazon.list"
  copilot_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Copilot/Copilot.list"
  github_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/github.list"
  twitter_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/twitter.list"
  netflix_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/netflix.list"
  spotify_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/spotify.list"
  youtube_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.list"
  google_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.list"
  telegram_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/telegram.list"
  ai_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/hughzone/clash/refs/heads/main/AI3.list"
  openai_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/openai.list"    
  microsoft_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/microsoft.list"      
  geolocation-!cn:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/geolocation-!cn.list"
  gfw_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/gfw.list"
  pikpak_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/pikpak.list"   
  115_domian:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/115.list"
  123_domian:
    <<: *domain
    url: "https://raw.githubusercontent.com/liubin21/clash_rules/refs/heads/main/123.list"
  docker_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/docker.list"
  bbc_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/meta/geo/geosite/bbc.list"
  abc_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/meta/geo/geosite/abc.list"
  cnn_domain:
    <<: *domain
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/CNN/CNN.list"
  wifi_uk_call:
    <<: *domain
    url: "https://raw.githubusercontent.com/iniwex5/tools/refs/heads/main/rules/UK-wifi-call.list"

  private_ip:
    <<: *ip
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/private.list"
  cn_ip:
    <<: *ip
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/cn.list"
  google_ip:
    <<: *ip
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/google.list"
  netflix_ip:
    <<: *ip
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/netflix.list"
  twitter_ip:
    <<: *ip
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/twitter.list"
  telegram_ip:
    <<: *ip
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/telegram.list"