# https://magichub.top/download/clash/FlowerCloud.yaml
proxy-providers:
  Airport1:
    url: 'https://magichub.top/download/clash/list.yaml'
    type: http
    interval: 86400
    health-check:
      enable: true
      url: https://www.gstatic.com/generate_204
      interval: 300
    proxy: 直连

proxies:
  - { name: 直连, type: direct }

port: 7890
socks-port: 7891
redir-port: 7892
mixed-port: 7893
tproxy-port: 7894
allow-lan: true
bind-address: '*'
ipv6: false
unified-delay: true
tcp-concurrent: true
interface-name: eth0
log-level: warning
find-process-mode: 'off'
global-client-fingerprint: chrome
keep-alive-idle: 600
keep-alive-interval: 15
profile:
  store-selected: true
  store-fake-ip: true

external-controller: '0.0.0.0:9090'
external-ui: 'ui'
external-ui-name: zashboard
external-ui-url: 'https://ghfast.top/https://github.com/Zephyruso/zashboard/archive/refs/heads/gh-pages.zip'
external-controller-cors:
  allow-origins:
    - '*'
  allow-private-network: true

geodata-mode: true
geo-auto-update: true
geox-url:
  geoip: 'https://ghfast.top/https://github.com/Loyalsoldier/geoip/releases/latest/download/geoip.dat'
  geosite: 'https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat'
  mmdb: 'https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb'
  asn: 'https://ghfast.top/https://github.com/xishang0128/geoip/releases/download/latest/GeoLite2-ASN.mmdb'

# 嗅探
sniffer:
  enable: true
  sniff:
    HTTP:
      ports: [80, 8080-8880]
      override-destination: false
    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: false

# DNS模块
dns:
  enable: true
  ipv6: false
  listen: 0.0.0.0:53
  fake-ip-filter:
    - "*.lan"
    - "*.srv.nintendo.net"
    - "*.stun.playstation.net"
    - xbox.*.microsoft.com
    - "*.xboxlive.com"
    - "*.teafone.com"
    - "*.sktswe.net"
    - rtc.goodfone.co.kr
    - "*.chattti.com"
    - 'rule-set:private_domain,cn_domain,apple_domain'
    - '+.msftconnecttest.com'
    - '+.msftncsi.com'
    - 'time.*.com'
    - '+.market.xiaomi.com'
  nameserver:
    - 202.101.172.35
    - 202.101.172.46
    - 223.5.5.5
    - tls://223.5.5.5:853
    - tls://223.6.6.6:853
    - tls://120.53.53.53
    - tls://1.12.12.12

# 出站策略
proxy-groups:
  - {
      name: 🚀 默认代理,
      type: select,
      proxies:
        [
          🔯 香港故转,
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 📹 YouTube,
      type: select,
      proxies:
        [
          🔯 美国故转,
          🔯 香港故转,
          🔯 日本故转,
          🔯 狮城故转,
          ♻️ 美国自动,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🍀 Google,
      type: select,
      proxies:
        [
          🔯 香港故转,
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🤖 ChatGPT,
      type: select,
      proxies:
        [
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 👨🏿‍💻 GitHub,
      type: select,
      proxies:
        [
          🔯 香港故转,
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🐬 OneDrive,
      type: select,
      proxies:
        [
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🪟 Microsoft,
      type: select,
      proxies:
        [
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🎵 TikTok,
      type: select,
      proxies:
        [
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 📲 Telegram,
      type: select,
      proxies:
        [
          🔯 香港故转,
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🎥 NETFLIX,
      type: select,
      proxies:
        [
          🔯 狮城故转,
          🔯 香港故转,
          🔯 日本故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 💶 PayPal,
      type: select,
      proxies:
        [
          🔯 日本故转,
          🔯 香港故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - {
      name: 🐟 漏网之鱼,
      type: select,
      proxies:
        [
          🚀 默认代理,
          🔯 香港故转,
          🔯 日本故转,
          🔯 狮城故转,
          🔯 美国故转,
          ♻️ 香港自动,
          ♻️ 日本自动,
          ♻️ 狮城自动,
          ♻️ 美国自动,
          ♻️ 自动选择,
          🇭🇰 香港节点,
          🇯🇵 日本节点,
          🇸🇬 狮城节点,
          🇺🇲 美国节点,
          🌐 全部节点,
          直连,
        ],
    }
  - { name: 🇭🇰 香港节点, type: select, include-all: true, filter: '(?i)港|hk|hongkong|hong kong' }
  - { name: 🇯🇵 日本节点, type: select, include-all: true, filter: '(?i)日|jp|japan' }
  - { name: 🇸🇬 狮城节点, type: select, include-all: true, filter: '(?i)新加坡|坡|狮城|SG|Singapore' }
  - { name: 🇺🇲 美国节点, type: select, include-all: true, filter: '(?i)美|us|unitedstates|united states' }
  - {
      name: 🔯 香港故转,
      type: fallback,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(港|HK|(?i)Hong))^((?!(台|日|韩|新|深|美)).)*$',
    }
  - {
      name: 🔯 日本故转,
      type: fallback,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(日|JP|(?i)Japan))^((?!(港|台|韩|新|美)).)*$',
    }
  - {
      name: 🔯 狮城故转,
      type: fallback,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(新加坡|坡|狮城|SG|Singapore))^((?!(台|日|韩|深|美)).)*$',
    }
  - {
      name: 🔯 美国故转,
      type: fallback,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(美|US|(?i)States|America))^((?!(港|台|韩|新|日)).)*$',
    }
  - {
      name: ♻️ 香港自动,
      type: url-test,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(港|HK|(?i)Hong))^((?!(台|日|韩|新|深|美)).)*$',
    }
  - {
      name: ♻️ 日本自动,
      type: url-test,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(日|JP|(?i)Japan))^((?!(港|台|韩|新|美)).)*$',
    }
  - {
      name: ♻️ 狮城自动,
      type: url-test,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(新加坡|坡|狮城|SG|Singapore))^((?!(港|台|韩|日|美)).)*$',
    }
  - {
      name: ♻️ 美国自动,
      type: url-test,
      include-all: true,
      tolerance: 20,
      interval: 300,
      filter: '(?=.*(美|US|(?i)States|America))^((?!(港|台|日|韩|新)).)*$',
    }
  - { name: ♻️ 自动选择, type: url-test, include-all: true, tolerance: 20, interval: 300, filter: '^((?!(直连)).)*$' }
  - { name: 🌐 全部节点, type: select, include-all: true }

# 规则匹配
rules:
  - RULE-SET,private_ip,直连,no-resolve
  - RULE-SET,private_domain,直连
  - DOMAIN-SUFFIX,qichiyu.com,🚀 默认代理
  - RULE-SET,proxylite,🚀 默认代理
  - RULE-SET,ai,🤖 ChatGPT
  - RULE-SET,github_domain,👨🏿‍💻 GitHub
  - RULE-SET,youtube_domain,📹 YouTube
  - RULE-SET,google_domain,🍀 Google
  - RULE-SET,onedrive_domain,🐬 OneDrive
  - RULE-SET,microsoft_domain,🪟 Microsoft
  - RULE-SET,apple_domain,直连
  - RULE-SET,tiktok_domain,🎵 TikTok
  - RULE-SET,telegram_domain,📲 Telegram
  - RULE-SET,netflix_domain,🎥 NETFLIX
  - RULE-SET,paypal_domain,💶 PayPal
  - RULE-SET,apple_ip,直连
  - RULE-SET,google_ip,🍀 Google
  - RULE-SET,netflix_ip,🎥 NETFLIX
  - RULE-SET,telegram_ip,📲 Telegram
  - RULE-SET,geolocation-!cn,🚀 默认代理
  - RULE-SET,cn_domain,直连
  - RULE-SET,cn_ip,直连
  - MATCH,🐟 漏网之鱼

# 规则集
## type：可选http/file/inline  behavior：可选domain/ipcidr/classical format：可选yaml/text/mrs
rule-anchor:
  ip: &ip { type: http, interval: 86400, behavior: ipcidr, format: mrs }
  domain: &domain { type: http, interval: 86400, behavior: domain, format: mrs }
  class: &class { type: http, interval: 86400, behavior: classical, format: text }
rule-providers:
  private_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.mrs',
    }
  proxylite:
    {
      <<: *class,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/qichiyuhub/rule/refs/heads/main/proxy.list',
    }
  ai:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-ai-!cn.mrs',
    }
  youtube_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs',
    }
  google_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.mrs',
    }
  github_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/github.mrs',
    }
  telegram_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/telegram.mrs',
    }
  netflix_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/netflix.mrs',
    }
  paypal_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/paypal.mrs',
    }
  onedrive_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/onedrive.mrs',
    }
  microsoft_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/microsoft.mrs',
    }
  apple_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/apple.mrs',
    }
  speedtest_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/ookla-speedtest.mrs',
    }
  tiktok_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/tiktok.mrs',
    }
  geolocation-!cn:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/geolocation-!cn.mrs',
    }
  cn_domain:
    {
      <<: *domain,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.mrs',
    }

  private_ip:
    {
      <<: *ip,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/private.mrs',
    }
  cn_ip:
    {
      <<: *ip,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/cn.mrs',
    }
  google_ip:
    {
      <<: *ip,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/google.mrs',
    }
  telegram_ip:
    {
      <<: *ip,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/telegram.mrs',
    }
  netflix_ip:
    {
      <<: *ip,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/netflix.mrs',
    }
  apple_ip:
    {
      <<: *ip,
      url: 'https://ghfast.top/https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/apple.mrs',
    }