Skip to content

Instantly share code, notes, and snippets.

@Loongphy
Last active May 27, 2025 03:40
Show Gist options
  • Save Loongphy/2f6dccc6a9ce7d7e9a46dae87a9b5872 to your computer and use it in GitHub Desktop.
Save Loongphy/2f6dccc6a9ce7d7e9a46dae87a9b5872 to your computer and use it in GitHub Desktop.
Mihomo Override geosite rules
proxy-groups:
- name: 🚀 默认
type: select
proxies: [🇭🇰 香港自动, 🇯🇵 日本自动, 🇺🇸 美国自动, 🇺🇸 美国, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🌐 全部, DIRECT]
- name: Ⓜ️ Microsoft
type: select
proxies: [DIRECT, 🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 💬 OpenAI
type: select
proxies: [🇺🇸 美国]
- name: 🔍 Google
type: select
proxies: [🇯🇵 日本自动, 🇸🇬 新加坡自动, 🇺🇸 美国, 🇺🇸 美国自动, 💬 OpenAI]
- name: 📹 YouTube
type: select
proxies: [🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 🎭 Mask
type: select
include-all: true
- name: 📲 Telegram
type: select
proxies: [🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 🐦 X
type: select
proxies: [🚀 默认, 🇭🇰 香港自动, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 📘 Facebook
type: select
proxies: [🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 📷 Instagram
type: select
proxies: [🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 💰 PayPal
type: select
proxies: [🚀 默认, 🇭🇰 香港, 🇯🇵 日本, 🇹🇼 台湾, 🇸🇬 新加坡, 🇺🇸 美国, 🌐 全部]
- name: 🇭🇰 香港自动
type: url-test
include-all: true
tolerance: 100
interval: 300
filter: "(?=.*?(香港|港|HK|Hong Kong|Hongkong|HKSAR)).*$"
- name: 🇺🇸 美国
type: select
include-all: true
filter: "(?=.*?(美国|美|美利坚|US|USA|(?i)States|(?i)America)).*$"
- name: 🇺🇸 美国自动
type: url-test
include-all: true
tolerance: 200
interval: 300
filter: "(?=.*?(美国|美|美利坚|US|USA|(?i)States|(?i)America)).*$"
- name: 🇭🇰 香港
type: select
include-all: true
filter: "(?=.*?(香港|港|HK|Hong Kong|Hongkong|HKSAR)).*$"
- name: 🇯🇵 日本
type: select
include-all: true
filter: "(?=.*?(日本|日(?!利亚)|Japan|Nippon|JP|Japanese)).*$"
- name: 🇯🇵 日本自动
type: url-test
include-all: true
tolerance: 100
interval: 300
filter: "(?=.*?(日本|日(?!利亚)|Japan|Nippon|JP|Japanese)).*$"
- name: 🇹🇼 台湾
type: select
include-all: true
filter: "(?=.*?(台湾|台|Taiwan|TW|ROC|Republic of China|Chinese Taipei)).*$"
- name: 🇸🇬 新加坡
type: select
include-all: true
filter: "(?=.*?(新加坡|新|Singapore|SG|Singapura)).*$"
- name: 🇸🇬 新加坡自动
type: url-test
include-all: true
tolerance: 200
interval: 300
filter: "(?=.*?(新加坡|新|Singapore|SG|Singapura)).*$"
- name: 🌐 全部
type: select
include-all: true
exclude-filter: "(?=.*?(流量|剩余|期|company-network|备用)).*$"
rules:
- GEOSITE,category-ads-all,REJECT
- DOMAIN-SUFFIX,linux.do,🚀 默认
- DOMAIN-SUFFIX,cursor.sh,🚀 默认
- DOMAIN-SUFFIX,cursor.com,🚀 默认
- PROCESS-NAME,SunBrowser.exe, 🎭 Mask
# - DOMAIN-SUFFIX, browserleaks.com, 🚀 默认
- PROCESS-PATH,C:\Users\Loong\AppData\Local\Microsoft\Edge SxS\Application\msedge.exe,🚀 默认
- GEOSITE,google-gemini,💬 OpenAI # 下方 Google 规则中包含 Gemini,需要提高优先级
- GEOIP,google,🔍 Google,no-resolve
- GEOSITE,google,🔍 Google
- GEOSITE,openai,💬 OpenAI
- GEOSITE,category-ai-!cn,💬 OpenAI
- GEOSITE,github,🚀 默认 # 与 Microsoft 冲突(Microsoft 包含 github),需要提高优先级
- GEOSITE,microsoft,Ⓜ️ Microsoft # 包含 Azure OpenAI,需放到 AI 下方
- GEOSITE,x,🐦 X
- GEOIP,twitter,🐦 X,no-resolve
- GEOSITE,apple@cn,DIRECT
- GEOIP,apple,DIRECT,no-resolve
- GEOSITE,steam@cn,DIRECT
- GEOSITE,category-games@cn,DIRECT
- GEOSITE,youtube,📹 YouTube
- GEOSITE,telegram,📲 Telegram
- GEOIP,telegram,📲 Telegram,no-resolve
- GEOSITE,facebook,📘 Facebook
- GEOIP,facebook,📘 Facebook,no-resolve
- GEOSITE,instagram,📷 Instagram
- GEOSITE,paypal,💰 PayPal
- GEOIP,private,DIRECT,no-resolve
- GEOSITE,private,DIRECT
- GEOIP,CN,DIRECT,no-resolve
- GEOSITE,cn,DIRECT
- MATCH,🚀 默认
@Loongphy
Copy link
Author

Loongphy commented May 19, 2025

dns:
  enable: true
  ipv6: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - +.lan
    - +.local
    - time.*.com
    - ntp.*.com
    - +.market.xiaomi.com
    - localhost.ptlogin2.qq.com
    - localhost.sec.qq.com
  use-hosts: false
  use-system-hosts: false
  default-nameserver:
    - 223.5.5.5
    - 119.29.29.29
  nameserver:
    - https://cloudflare-dns.com/dns-query#h3=true
    - https://dns.google/dns-query#h3=true
  proxy-server-nameserver:
    - https://cloudflare-dns.com/dns-query#h3=true
    - https://dns.alidns.com/dns-query#h3=true
  direct-nameserver:
    - https://dns.alidns.com/dns-query#h3=true
    - https://doh.pub/dns-query#h3=true
  nameserver-policy:
    geosite:private:
      - system
    geoip:private:
      - system
    geosite:cn:
      - https://dns.alidns.com/dns-query
      - https://doh.pub/dns-query
  respect-rules: false

@Loongphy
Copy link
Author

Loongphy commented May 22, 2025

2025年5月27日 更新

👉 迁移到 GitHub 仓库维护:https://github.com/Loongphy/mihomo-rules

  • Youtube 规则提高优先级,保证独立,不使用 Google 的分流规则

2025年5月22日 更新

  • 优化 Gemini 规则,现在与通用 OpenAI 规则使用同一分流规则,为了使用最新推出的功能,建议选择 US
  • 更新 DNS 配置,针对节点域名解析(proxy-server-nameserver)做了调整

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment