Sfssup

# 端口
port: 7892
socks-port: 7893
mixed-port: 1080
redir-port: 7891
tproxy-port: 1536

# 全局配置
mode: rule
udp: true
ipv6: false
tcp-concurrent: true
unified-delay: true
find-process-mode: off
geodata-loader: memconservative
geosite-matcher: succinct
global-ua: mihomo
etag-support: true

# 日志
log-level: error

# 局域网配置
allow-lan: true
bind-address: "*"

# TCP连接保持活跃探测,修改此项以减少移动设备耗电问题
# 移动设备:true,否则:false
disable-keep-alive: true
keep-alive-interval: 60
keep-alive-idle: 600

# 外部控制 (API)
external-controller: 127.0.0.1:9090
secret: "telegram@ksc666"
external-ui: "./Web/zashboard"
external-ui-url: "https://github.com/Zephyruso/zashboard/releases/latest/download/dist-no-fonts.zip"

# 缓存
profile:
  store-selected: true
  store-fake-ip: true

ntp:
  enable: true
  write-to-system: false
  server: time.apple.com
  port: 123
  interval: 60
  dialer-proxy: DIRECT

tun:
  enable: false
  device: tun0
  stack: mixed
  dns-hijack: [any:53, tcp://any:53]
  auto-route: true
  strict-route: true
  auto-redirect: true
  auto-detect-interface: true
  route-exclude-address: [10.0.0.0/8,100.64.0.0/10,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16,198.18.0.0/15,"::/127","fc00::/7","fe80::/10","ff00::/8"]

sniffer:
  enable: true
  force-dns-mapping: true
  parse-pure-ip: true
  override-destination: true
  sniff: {HTTP: {ports: [80, 8080-8880], override-destination: true}, TLS: {ports: [443, 8443]}, QUIC: {ports: [443, 8443]}}
  skip-domain: [localhost,+.local,+.lan,+.push.apple.com,Mijia Cloud]

dns:
  enable: true
  listen: 0.0.0.0:1053
  respect-rules: true
  prefer-h3: false
  ipv6: false
  ipv6-timeout: 3000
  use-hosts: true
  use-system-hosts: true
  cache-algorithm: arc
  default-nameserver:
    - 223.5.5.5
    - 120.53.53.53
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.0/15
  fake-ip-range6: fc00::/18
  fake-ip-ttl: 60
  fake-ip-filter-mode: blacklist
  fake-ip-filter:
    # 本地网络
    - 'localhost'
    - '*.lan'
    - '*.local'
    - '*.arpa'
    # NTP
    - 'time.apple.com'
    - '+.pool.ntp.org'
    # Windows 网络连通性
    - '+.msftconnecttest.com'
    - '+.msftncsi.com'
    # Wi-Fi Calling / IMS
    - '+.pub.3gppnetwork.org'
    # QQ登录
    - 'localhost.ptlogin2.qq.com'
    - 'localhost.sec.qq.com'
    # 微信登录
    - 'localhost.*.weixin.qq.com'
    # 运营商一键登录
    - 'id6.me'
    - 'open.e.189.cn'
    - 'hmrz.wo.cn'
    - 'nishub1.10010.com'
    - 'enrichgw.10010.com'
    - '*.cmpassport.com'
    - '*.wosms.cn'
    # 规则集
    - rule-set:private
  nameserver-policy:
    "rule-set:httpdns,ads,AWAvenue,anti-AD": "rcode://success"
  nameserver:
    - https://8.8.8.8/dns-query#disable-qtype-65=true
    - https://1.1.1.1/dns-query#disable-qtype-65=true
  direct-nameserver-follow-policy: false
  direct-nameserver:
    - https://223.5.5.5/dns-query#disable-qtype-65=true
    - https://119.29.29.29/dns-query#disable-qtype-65=true
  proxy-server-nameserver:
    - https://223.6.6.6/dns-query#disable-qtype-65=true
    - https://1.12.12.12/dns-query#disable-qtype-65=true

proxies:

  - {name: 🌐 DNS劫持, type: dns}
  - {name: 🇨🇳 直连, type: direct, udp: true}
  
# 锚点
p: &p {type: http, interval: 86400, proxy: "SubUpdate", exclude-filter: "(?i)Russia", exclude-type: "http|ss", health-check: {enable: true, url: "https://www.gstatic.com/generate_204", interval: 1800, timeout: 3000, lazy: true}}
pr: &pr {type: select, proxies: [香港-自动选择, 香港-故障转移, 香港-负载均衡, 香港-手动选择, 台湾-自动选择, 台湾-故障转移, 台湾-负载均衡, 台湾-手动选择, 日本-自动选择, 日本-故障转移, 日本-负载均衡, 日本-手动选择, 韩国-自动选择, 韩国-故障转移, 韩国-负载均衡, 韩国-手动选择, 新加坡-自动选择, 新加坡-故障转移, 新加坡-负载均衡, 新加坡-手动选择, 英国-自动选择, 英国-故障转移, 英国-负载均衡, 英国-手动选择, 美国-自动选择, 美国-故障转移, 美国-负载均衡, 美国-手动选择, 其他-自动选择, 其他-故障转移, 其他-负载均衡, 其他-手动选择, 全部-自动选择, 全部-故障转移, 全部-负载均衡, 全部-手动选择, 神秘大国, Block]}
check: &check {url: "https://www.gstatic.com/generate_204", interval: 600, timeout: 3000, lazy: true, max-failed-times: 3, hidden: true}
smux: &smux {udp: true, tfo: true, mptcp: true, ip-version: ipv4-prefer, client-fingerprint: chrome, smux: {enabled: true, protocol: h2mux, max-connections: 6, min-streams: 3, max-streams: 6, statistic: false, only-tcp: false, padding: true}}

proxy-providers:
  # 以下是自用的几个机场推荐,复制 url: “官网” 注册后把自己的订阅链接替换进去即可
  # 如果你有更多机场订阅,按照相同格式 一行一个 添加即可,无需额外配置
  #   机场名: {<<: *p, url: "订阅地址", path: .路径与文件名, override: {复写 在节点名前面加上机场名,用以区分多个机场}}
  
  Miaona: {<<: *p, url: "https://miaona.org/#/register?code=EdpK1Vlo", path: ./proxy_providers/Miaona.yaml, override: {<<: *smux, additional-prefix: "Miaona|"}}
  魔戒: {<<: *p, url: "https://www.mojie.cyou/#/register?code=a0sBIylV", path: ./proxy_providers/魔戒.yaml, override: {<<: *smux, additional-prefix: "魔戒|"}}
  飞鸟云: {<<: *p, url: "https://www.feiniaoyun.xyz/#/register?code=1gZX21aI", path: ./proxy_providers/飞鸟云.yaml, override: {<<: *smux, additional-prefix: "飞鸟云|"}}
  良心云: {<<: *p, url: "https://xn--9kqz23b19z.com/#/register?code=VpXfaVUL", path: ./proxy_providers/良心云.yaml, override: {<<: *smux, additional-prefix: "良心云|"}}
  极速云: {<<: *p, url: "https://w2.rouhe88.com/#/register?code=Zl5IqVKd", path: ./proxy_providers/极速云.yaml, override: {<<: *smux, additional-prefix: "极速云|"}}
  顶级机场: {<<: *p, url: "https://xn--mes358a9urctx.com/#/register?code=AkCxVELH", path: ./proxy_providers/顶级机场.yaml, override: {<<: *smux, additional-prefix: "顶级机场|"}}
  
proxy-groups:
  
  # 代理组
  - {name: Speedtest, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/speedtest.svg}
  - {name: Google FCM, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/firebase.svg}
  - {name: Google, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/google_new.svg}
  - {name: Microsoft, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/microsoft.svg}
  - {name: Apple, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/apple.svg}
  - {name: AI, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/meta-ai.svg}
  - {name: Steam, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/steam.svg}
  - {name: Github, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/github.svg}
  - {name: Twitter, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/twitter_2.svg}
  - {name: Telegram, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/telegram.svg}
  - {name: Instagram, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/instagram.svg}
  - {name: Facebook, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/facebook_2.svg}
  - {name: TikTok, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/tiktok.svg}
  - {name: YouTube, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/youtube.svg}
  - {name: Spotify, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/spotify.svg}
  - {name: PikPak, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/pikpak.svg}
  - {name: MEGA, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/mega.svg}
  - {name: PayPal, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/PayPal.svg}
  - {name: SubUpdate, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/download.svg}
  - {name: Global, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/global.svg}
  - {name: Block, type: select, proxies: [REJECT-DROP, REJECT, PASS], icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/adguard.svg}
  - {name: Final, <<: *pr, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/Final_2.svg}
  - {name: 神秘大国, type: select, proxies: [🇨🇳 直连, 全部-手动选择, Block], default-selected: 🇨🇳 直连, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/china.svg}
  
  # 地区筛选
  - {name: 香港-手动选择, type: select, include-all-providers: true, filter: "(?i)港|hk|hong ?kong", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/hk.svg}
  - {name: 香港-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)港|hk|hong ?kong", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/hk.svg}
  - {name: 香港-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)港|hk|hong ?kong", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/hk.svg}
  - {name: 香港-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)港|hk|hong ?kong", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/hk.svg}
  - {name: 台湾-手动选择, type: select, include-all-providers: true, filter: "(?i)台|tw|tai ?wan|tai ?pei", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/tw.svg}
  - {name: 台湾-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)台|tw|tai ?wan|tai ?pei", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/tw.svg}
  - {name: 台湾-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)台|tw|tai ?wan|tai ?pei", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/tw.svg}
  - {name: 台湾-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)台|tw|tai ?wan|tai ?pei", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/tw.svg}
  - {name: 日本-手动选择, type: select, include-all-providers: true, filter: "(?i)日本|jp|japan|nippon", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/jp.svg}
  - {name: 日本-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)日本|jp|japan|nippon", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/jp.svg}
  - {name: 日本-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)日本|jp|japan|nippon", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/jp.svg}
  - {name: 日本-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)日本|jp|japan|nippon", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/jp.svg}
  - {name: 韩国-手动选择, type: select, include-all-providers: true, filter: "(?i)韩|kr|korea", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/kr.svg}
  - {name: 韩国-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)韩|kr|korea", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/kr.svg}
  - {name: 韩国-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)韩|kr|korea", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/kr.svg}
  - {name: 韩国-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)韩|kr|korea", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/kr.svg}
  - {name: 新加坡-手动选择, type: select, include-all-providers: true, filter: "(?i)新加坡|sg|singapore|狮城", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/sg.svg}
  - {name: 新加坡-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)新加坡|sg|singapore|狮城", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/sg.svg}
  - {name: 新加坡-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)新加坡|sg|singapore|狮城", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/sg.svg}
  - {name: 新加坡-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)新加坡|sg|singapore|狮城", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/sg.svg}
  - {name: 英国-手动选择, type: select, include-all-providers: true, filter: "(?i)UK|United ?Kingdom|英国|伦敦|London", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/UK.svg}
  - {name: 英国-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)UK|United ?Kingdom|英国|伦敦|London", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/UK.svg}
  - {name: 英国-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)UK|United ?Kingdom|英国|伦敦|London", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/UK.svg}
  - {name: 英国-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)UK|United ?Kingdom|英国|伦敦|London", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/UK.svg}
  - {name: 美国-手动选择, type: select, include-all-providers: true, filter: "(?i)美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/us.svg}
  - {name: 美国-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, filter: "(?i)美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/us.svg}
  - {name: 美国-故障转移, type: fallback, include-all-providers: true, <<: *check, filter: "(?i)美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/us.svg}
  - {name: 美国-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, filter: "(?i)美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/us.svg}
  - {name: 其他-手动选择, type: select, include-all-providers: true, exclude-filter: "(?i)港|hk|hong ?kong|台|tw|tai ?wan|tai ?pei|韩|kr|korea|日本|jp|japan|nippon|新加坡|sg|singapore|狮城|UK|United ?Kingdom|英国|伦敦|London|美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/other.svg}
  - {name: 其他-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, exclude-filter: "(?i)港|hk|hong ?kong|台|tw|tai ?wan|tai ?pei|韩|kr|korea|日本|jp|japan|nippon|新加坡|sg|singapore|狮城|UK|United ?Kingdom|英国|伦敦|London|美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/other.svg}
  - {name: 其他-故障转移, type: fallback, include-all-providers: true, <<: *check, exclude-filter: "(?i)港|hk|hong ?kong|台|tw|tai ?wan|tai ?pei|韩|kr|korea|日本|jp|japan|nippon|新加坡|sg|singapore|狮城|UK|United ?Kingdom|英国|伦敦|London|美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/other.svg}
  - {name: 其他-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, exclude-filter: "(?i)港|hk|hong ?kong|台|tw|tai ?wan|tai ?pei|韩|kr|korea|日本|jp|japan|nippon|新加坡|sg|singapore|狮城|UK|United ?Kingdom|英国|伦敦|London|美|us|united ?states", icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/other.svg}
  - {name: 全部-手动选择, type: select, include-all-providers: true, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/all.svg}
  - {name: 全部-自动选择, type: url-test, include-all-providers: true, <<: *check, tolerance: 10, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/all.svg}
  - {name: 全部-故障转移, type: fallback, include-all-providers: true, <<: *check, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/all.svg}
  - {name: 全部-负载均衡, type: load-balance, strategy: consistent-hashing, include-all-providers: true, <<: *check, icon: https://raw.githubusercontent.com/Sfssup/mihomo-set/main/icon/all.svg}

rule-anchor:

  ip: &ip {type: http, interval: 86400, behavior: ipcidr, format: mrs}
  domain: &domain {type: http, interval: 86400, behavior: domain, format: mrs}

rule-providers:
  
  # 域名
  private: {<<: *domain, path: ./rule_set/private.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.mrs"}
  telegram: {<<: *domain, path: ./rule_set/telegram.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/telegram.mrs"}
  github: {<<: *domain, path: ./rule_set/github.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/github.mrs"}
  youtube: {<<: *domain, path: ./rule_set/youtube.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs"}
  steam: {<<: *domain, path: ./rule_set/steam.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/steam.mrs"}
  ai-!cn: {<<: *domain, path: ./rule_set/category-ai-!cn.mrs, url: "https://github.com/MetaCubeX/meta-rules-dat/raw/refs/heads/meta/geo/geosite/category-ai-!cn.mrs"}
  google: {<<: *domain, path: ./rule_set/google.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.mrs"}
  googlefcm: {<<: *domain, path: ./rule_set/googlefcm.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/googlefcm.mrs"}
  mega: {<<: *domain, path: ./rule_set/mega.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/mega.mrs"}
  spotify: {<<: *domain, path: ./rule_set/spotify.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/spotify.mrs"}
  twitter: {<<: *domain, path: ./rule_set/twitter.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/twitter.mrs"}
  facebook: {<<: *domain, path: ./rule_set/facebook.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/facebook.mrs"}
  tiktok: {<<: *domain, path: ./rule_set/tiktok.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/tiktok.mrs"}
  pikpak: {<<: *domain, path: ./rule_set/pikpak.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/pikpak.mrs"}
  microsoft: {<<: *domain, path: ./rule_set/microsoft.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/microsoft.mrs"}
  apple: {<<: *domain, path: ./rule_set/apple.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/apple.mrs"}
  geolocation-!cn: {<<: *domain, path: ./rule_set/geolocation-!cn.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/geolocation-!cn.mrs"}
  paypal: {<<: *domain, path: ./rule_set/paypal.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/paypal.mrs"}
  speedtest: {<<: *domain, path: ./rule_set/speedtest.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-speedtest.mrs"}
  cn: {<<: *domain, path: ./rule_set/cn.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.mrs"}
  instagram: {<<: *domain, path: ./rule_set/instagram.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/instagram.mrs"}
  
  # 广告
  httpdns: {<<: *domain, path: ./rule_set/category-httpdns-cn.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-httpdns-cn.mrs"}
  ads: {<<: *domain, path: ./rule_set/category-ads-all.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-ads-all.mrs"}
  AWAvenue: {<<: *domain, path: ./rule_set/AWAvenue.mrs, url: "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main/Filters/AWAvenue-Ads-Rule-Clash.mrs"}
  anti-AD: {<<: *domain, path: ./rule_set/anti-AD.mrs, url: "https://raw.githubusercontent.com/privacy-protection-tools/anti-ad.github.io/master/docs/mihomo.mrs"}

  # iP
  private_ip: {<<: *ip, path: ./rule_set/private_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/private.mrs"}
  telegram_ip: {<<: *ip, path: ./rule_set/telegram_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/telegram.mrs"}
  google_ip: {<<: *ip, path: ./rule_set/google_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/google.mrs"}
  twitter_ip: {<<: *ip, path: ./rule_set/twitter_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/twitter.mrs"}
  facebook_ip: {<<: *ip, path: ./rule_set/facebook_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/facebook.mrs"}
  cn_ip: {<<: *ip, path: ./rule_set/cn_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/cn.mrs"}
  apple_ip: {<<: *ip, path: ./rule_set/apple_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/refs/heads/meta/geo-lite/geoip/apple.mrs"}
  
rules:
  - AND,((RULE-SET,geolocation-!cn),(DST-PORT,443),(NETWORK,UDP)),Block
  - DST-PORT,53,🌐 DNS劫持
  - RULE-SET,private,🇨🇳 直连
  - RULE-SET,httpdns,Block
  - RULE-SET,ads,Block
  - RULE-SET,AWAvenue,Block
  - RULE-SET,anti-AD,Block
  
  # 域名分流
  - RULE-SET,googlefcm,Google FCM
  - RULE-SET,telegram,Telegram
  - RULE-SET,github,Github
  - RULE-SET,youtube,YouTube
  - RULE-SET,ai-!cn,AI
  - RULE-SET,mega,MEGA
  - RULE-SET,pikpak,PikPak
  - RULE-SET,google,Google
  - RULE-SET,microsoft,Microsoft
  - RULE-SET,apple,Apple
  - RULE-SET,steam,Steam
  - RULE-SET,twitter,Twitter
  - RULE-SET,spotify,Spotify
  - RULE-SET,tiktok,TikTok
  - RULE-SET,instagram,Instagram
  - RULE-SET,paypal,PayPal
  - RULE-SET,facebook,Facebook
  - RULE-SET,speedtest,Speedtest
  - RULE-SET,geolocation-!cn,Global
  - RULE-SET,cn,神秘大国
  
  # IP分流
  - RULE-SET,private_ip,🇨🇳 直连,no-resolve
  - RULE-SET,telegram_ip,Telegram
  - RULE-SET,google_ip,Google
  - RULE-SET,apple_ip,Apple
  - RULE-SET,twitter_ip,Twitter
  - RULE-SET,facebook_ip,Facebook
  - RULE-SET,cn_ip,神秘大国
  
  # 兜底规则
  - MATCH,Final