# Clash Meta for Android (Mihomo) — 双协议配置
# 生成日期: 2026-04-29
# 规则来源: MetaCubeX/meta-rules-dat

# ===== 基础设置 =====
mixed-port: 7890
port: 7891
socks-port: 7892
allow-lan: false
bind-address: "*"
mode: rule
log-level: info
ipv6: false

# ===== DNS 设置（Android 上不设 listen，由 VPN 模式接管） =====
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
  nameserver:
    - https://doh.alidns.com/dns-query
    - https://doh.pub/dns-query
  fallback:
    - https://dns.google/dns-query
    - https://cloudflare-dns.com/dns-query
  fallback-filter:
    geoip: true
    geoip-code: CN
    ipcidr:
      - 240.0.0.0/4

# ===== 代理节点 =====
proxies:
  - name: "HK-Hysteria2"
    type: hysteria2
    server: hk.sercypress.cn
    port: 8443
    password: xQ4Zhj4FMghsIGHi1b8EOfxj
    sni: hk.sercypress.cn
    skip-cert-verify: false
    alpn:
      - h3
    up: "30 Mbps"
    down: "100 Mbps"

  - name: "HK-Reality"
    type: vless
    server: hk.sercypress.cn
    port: 50888
    uuid: 78061f24-730e-4b1e-abad-54c2c50df43b
    flow: xtls-rprx-vision
    network: tcp
    tls: true
    servername: www.microsoft.com
    reality-opts:
      public-key: 1nmA-xRWCwDIKtMnAQw0fpbbXPxtGmP7zYWr52MlFjg
      short-id: 92981822eab65778

# ===== 策略组 =====
proxy-groups:
  - name: "🚀 节点选择"
    type: select
    proxies:
      - HK-Hysteria2
      - HK-Reality
      - DIRECT

  - name: "🎬 流媒体"
    type: select
    proxies:
      - HK-Hysteria2
      - HK-Reality
      - DIRECT

# ===== 规则集 =====
rule-providers:
  google:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.yaml"
    path: ./providers/google.yaml
    interval: 86400

  telegram:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/telegram.yaml"
    path: ./providers/telegram.yaml
    interval: 86400

  netflix:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/netflix.yaml"
    path: ./providers/netflix.yaml
    interval: 86400

  geolocation-!cn:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/geolocation-!cn.yaml"
    path: ./providers/geolocation-!cn.yaml
    interval: 86400

  cn:
    type: http
    behavior: classical
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.yaml"
    path: ./providers/cn.yaml
    interval: 86400

  cnip:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/cn.yaml"
    path: ./providers/cnip.yaml
    interval: 86400

# ===== 路由规则 =====
rules:
  - RULE-SET,google,🚀 节点选择
  - RULE-SET,telegram,🚀 节点选择
  - RULE-SET,netflix,🎬 流媒体
  - RULE-SET,geolocation-!cn,🚀 节点选择
  - RULE-SET,cn,DIRECT
  - RULE-SET,cnip,DIRECT
  - MATCH,🚀 节点选择
