# ======================================================================== # Magic Catling2 优化配置配合1.2.2+ 姥舅 # # -- Mihomo v1.19.29+ # # 看下面有教程的字,哪些复制哪些粘贴 # # # # 总就四步:复制DNS粘贴,填写订阅地址在下面,上传这份yaml,选择这份yaml启动 # # ========================================================================= # ============================= - fake-ip 的规则 - ========================= dns: enable: true ipv6: false cache-algorithm: arc enhanced-mode: fake-ip listen: :23453 fake-ip-range: 198.18.0.1/16 fake-ip-range6: fd6c:91f3:2b7a::/48 fake-ip-filter-mode: rule respect-rules: false prefer-h3: false fake-ip-filter: - RULE-SET,private,real-ip - RULE-SET,category-pt,real-ip - RULE-SET,apple@cn,real-ip - RULE-SET,cn,real-ip - RULE-SET,cloudflare@cn,real-ip - RULE-SET,microsoft@cn,real-ip default-nameserver: - 223.5.5.5 - 119.29.29.29 proxy-server-nameserver: - https://223.5.5.5/dns-query - https://119.29.29.29/dns-query nameserver: - https://223.5.5.5/dns-query - https://119.29.29.29/dns-query #==== - 复制粘贴而已,也不能删除 - ==== #==== -⒈ 复制上面DNS这个区域去MC插件里面的fake-ip的地方粘贴保存 - ====================== #==== -⒉ DNS粘贴好保存后,把这份加订阅的yaml在订阅配置第一行选择文件上传 - ============== #==== -⒊ 然后勾选DNS方案的fake-ip,高级设置下面代理设置选择:Redir TCP & Tproxy UDP 或者 Tproxy TCP & UDP,可以勾选V6或者不要 #==== -⒋ 然后在上面配置文件选择选择好这份上传的yaml然后点击总开关启动 - ================= port: 7890 proxies: # =============== - 机场配置模块 - ============ # 锚点 - 代理提供者模板 - 订阅源基础配置 provider_config: &provider_config { type: http, interval: 86400, proxy: DIRECT, health-check: { enable: true, url: "http://www.apple.com/library/test/success.html", interval: 300, lazy: true } } # ============= - 加订阅链接位置 - ============ proxy-providers: # 第一个机场 优质服务商: url: '填写你的机场订阅链接在这双引号里面' <<: *provider_config user-agent: "clash.meta.mihomo" #默认或者修改这里为你机场的UA override: additional-prefix: "[优质]" udp: true #如果不能用就改:false # 第二个机场 次优服务商: url: '填写你的机场订阅链接在这双引号里面' <<: *provider_config user-agent: "clash.meta.mihomo" #默认或者修改这里为你机场的UA override: additional-prefix: "[次优]" udp: true #如果不能用就改:false # 第三个机场 备用服务商: url: '填写你的机场订阅链接在这双引号里面' <<: *provider_config user-agent: "clash.meta.mihomo" #默认或者修改这里为你机场的UA override: additional-prefix: "[备用]" udp: true #如果不能用就改:false # ============= - ⚓️ 锚点区开始 - ============= # 锚点 - 自动选择策略 url_test: &url_test { type: url-test, interval: 300, tolerance: 50, lazy: true,empty-fallback: "REJECT", url: "http://www.apple.com/library/test/success.html", disable-udp: false, timeout: 3000, max-failed-times: 3, hidden: false, include-all: true } # 锚点 - 故障转移测速策略模块 FallBack: &FallBack { type: fallback, interval: 120, lazy: true,empty-fallback: "REJECT", url: 'http://www.apple.com/library/test/success.html', disable-udp: false, timeout: 2000, max-failed-times: 4, hidden: true } # 锚点 - 负载均衡测速策略模块 LoadBalanceCH: &LoadBalanceCH { type: load-balance, interval: 120, lazy: true,empty-fallback: "REJECT", url: 'http://www.apple.com/library/test/success.html', disable-udp: false, strategy: consistent-hashing, timeout: 2000, max-failed-times: 3, hidden: true } # ============= - 策略组代理列表 - =============== # 锚点 - 直连优先 prefer_direct: &prefer_direct { type: select, proxies: [ DIRECT, 默认代理, 自动选择, 全球手动 ] } # 锚点 - 默认代理 prefer_moren: &prefer_moren { type: select, proxies: [ 自动选择, 香港, 美国, 日本, 台湾, 新加坡, 韩国, 荒郊地区, 全球手动, DIRECT ] } # 锚点 - 代理优先 prefer_proxy: &prefer_proxy { type: select, proxies: [ 默认代理, 智能故转, 故障转移, 负载均衡, 自动选择, 香港, 美国, 日本, 台湾, 新加坡, 韩国, 荒郊地区, 全球手动, DIRECT ] } # ============= - 节点筛选列表 - ================= # 锚点 - 节点分组筛选模块 FilterHK: &FilterHK '^(?=.*((?i)🇭🇰|香港|港|(\b(HK|Hong|HKG|🇭🇰)\b)))(?!.*(排除1|排除2|5x)).*$' FilterTW: &FilterTW '^(?=.*((?i)🇨🇳|台湾|(\b(🇹🇼|TW|Taiwan|ROC|🇹🇼)\b)))(?!.*(排除1|排除2|5x)).*$' FilterSG: &FilterSG '^(?=.*((?i)🇸🇬|新加坡|狮|(\b(SG|Singapore|SIN|🇸🇬)\b)))(?!.*(排除1|排除2|5x)).*$' FilterJP: &FilterJP '^(?=.*((?i)🇯🇵|日本|川日|东京|大阪|泉日|埼玉|(\b(JP|Japan|NRT|HND|🇯🇵)\b)))(?!.*(排除1|排除2|5x)).*$' FilterKR: &FilterKR '^(?=.*((?i)🇰🇷|韩国|首尔|(\b(KR|Korea|SEL|🇰🇷)\b)))(?!.*(排除1|排除2|5x)).*$' FilterUS: &FilterUS '^(?=.*((?i)🇺🇸|美国|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|(\b(US|USA|United States|LAX|🇺🇸)\b)))(?!.*(排除1|排除2|5x)).*$' FilterOther: &FilterOther "^(?!.*(DIRECT|🇺🇸|美国|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|🇭🇰|香港|HK|Hong|🇯🇵|日本|川日|东京|大阪|泉日|埼玉|JP|Japan|🇨🇳|台湾|🇹🇼|TW|🇸🇬|新加坡|狮|SG|Singapore|🇰🇷|韩国|首尔|KR|Korea)).*$" FilterAll: &FilterAll '^(?!.*(DIRECT|群|邀请|返利|循环|官网|客服|网站|网址|获取|订阅|流量|到期|机场|下次|版本|官址|备用|过期|已用|联系|邮箱|工单|贩卖|通知|倒卖|防止|国内|地址|频道|无法|说明|使用|提示|特别|访问|支持|教程|关注|更新|作者|加入|USE|USED|TOTAL|EXPIRE|EMAIL|Panel|Channel|Author))' # ============ - ⚓️ 锚点区结束 - ================ # ============ - 域名策略组 - ================ proxy-groups: # 总模式: - { name: 默认代理, <<: *prefer_moren, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Proxy.png } # AI故转分组策略 - { name: 智能故转, <<: *FallBack,hidden: false, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/ULB.png, proxies: [ 美国故障, 日本故障, 新加坡故障 ] } - { name: 故障转移, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/ULB.png, proxies: [ 香港故障, 美国故障, 日本故障, 台湾故障, 韩国故障, 新加坡故障 ] } - { name: 负载均衡, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Auto.png, proxies: [ 香港负载, 美国负载, 日本负载, 台湾负载, 韩国负载, 新加坡负载 ] } - { name: 自动选择, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/SSID_1.png, proxies: [ 香港, 美国, 日本, 台湾, 韩国, 新加坡 ] } # 测速服务 - { name: Speedtest, <<: *prefer_proxy, include-all: true,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Speedtest.png, proxies: [ 默认代理 ] } # PT和BT下载 - { name: PT和BT下载, <<: *prefer_direct, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Server.png } # 漏网之鱼策略 - { name: 漏网之鱼, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Final.png } # AI 相关服务 - { name: AI集合, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Siri.png } - { name: Gemini, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/AI.png } - { name: ChatGPT, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/ChatGPT.png } # 国内 - { name: Apple, <<: *prefer_direct, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Apple.png } - { name: Bilibili, <<: *prefer_direct, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/bilibili.png } - { name: Microsoft, <<: *prefer_direct, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Microsoft.png } # 国外 - { name: GitHub, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/GitHub.png } - { name: Cloudflare, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Cloudflare.png } - { name: Google, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Google.png } - { name: YouTube, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/YouTube.png } - { name: 国外媒体集合, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/YouTube_Music.png } # 社交平台策略 - { name: Telegram, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Telegram.png } - { name: Whatsapp, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/WeChat.png } - { name: Twitter, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Twitter.png } - { name: Instagram, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Instagram.png } - { name: Facebook, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Facebook.png } - { name: 国外社交集合, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Global.png } # 音视频 - { name: Spotify, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Spotify.png } - { name: Netflix, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Netflix.png } - { name: TikTok, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/TikTok.png } - { name: Porn, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Pornhub.png } - { name: HBO, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/HBO_Max.png } - { name: Emby, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Emby.png } - { name: Disney, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Disney.png } # 港台媒体 - { name: 港台媒体, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/TVB.png } # 游戏服务 - { name: Xbox, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Xbox.png } - { name: Steam, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Steam.png } - { name: Nintendo, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Nintendo.png } - { name: PlayStation, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/PlayStation_1.png } # 兜底 - { name: 国外网站, <<: *prefer_proxy, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/United_Nations.png } - { name: 国内网站, <<: *prefer_direct, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/China.png } # ==== - 节点分组策略 - ==== # 自动测速场景 - { name: 香港, <<: *url_test, filter: *FilterHK,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/HK.png } - { name: 台湾, <<: *url_test, filter: *FilterTW,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/TW.png } - { name: 新加坡, <<: *url_test, filter: *FilterSG,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/SG.png } - { name: 日本, <<: *url_test, filter: *FilterJP,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/JP.png } - { name: 韩国, <<: *url_test, filter: *FilterKR,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/KR.png } - { name: 美国, <<: *url_test, filter: *FilterUS,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/US.png } - { name: 荒郊地区, type: select, include-all: true,filter: *FilterOther, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Global.png } - { name: 全球手动, type: select, include-all: true,filter: *FilterAll, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/America_Map.png } # 故障转移场景 - { name: 香港故障, <<: *FallBack, include-all: true, filter: *FilterHK,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/HK.png } - { name: 台湾故障, <<: *FallBack, include-all: true, filter: *FilterTW,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/TW.png } - { name: 新加坡故障, <<: *FallBack, include-all: true, filter: *FilterSG,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/SG.png } - { name: 日本故障, <<: *FallBack, include-all: true, filter: *FilterJP,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/JP.png } - { name: 韩国故障, <<: *FallBack, include-all: true, filter: *FilterKR,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/KR.png } - { name: 美国故障, <<: *FallBack, include-all: true, filter: *FilterUS,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/US.png } # 负载均衡场景 - { name: 香港负载, <<: *LoadBalanceCH, include-all: true, filter: *FilterHK,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/HK.png } - { name: 台湾负载, <<: *LoadBalanceCH, include-all: true, filter: *FilterTW,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/TW.png } - { name: 新加坡负载, <<: *LoadBalanceCH, include-all: true, filter: *FilterSG,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/SG.png } - { name: 日本负载, <<: *LoadBalanceCH, include-all: true, filter: *FilterJP,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/JP.png } - { name: 韩国负载, <<: *LoadBalanceCH, include-all: true, filter: *FilterKR,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/KR.png } - { name: 美国负载, <<: *LoadBalanceCH, include-all: true, filter: *FilterUS,icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/US.png } # ====== - 规则集模块 - ====== # 锚点 - 规则集模块 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, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.mrs } # PT/BT规则集 category-pt: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-pt.mrs } tracker: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/tracker.mrs } # AI域名规则集 gemini: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google-gemini.mrs } openai: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/openai.mrs } category-ai-!cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-ai-!cn.mrs } # 国内域名规则集 cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.mrs } bilibili: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/bilibili.mrs } apple@cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/apple@cn.mrs } microsoft@cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/microsoft@cn.mrs } # 国外域名规则集 google: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.mrs } youtube: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs } category-media: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-media.mrs } github: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/github.mrs } cloudflare: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cloudflare.mrs } cloudflare@cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cloudflare@cn.mrs } apple: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/apple.mrs } microsoft: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/microsoft.mrs } # External域名规则集 gfw: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/gfw.mrs } geolocation-!cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/geolocation-!cn.mrs } # Social域名社交总规则集 whatsapp: { <<: *domain, url: https://github.com/MetaCubeX/meta-rules-dat/raw/refs/heads/meta/geo/geosite/whatsapp.mrs } telegram: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/telegram.mrs } twitter: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/twitter.mrs } instagram: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/instagram.mrs } facebook: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/facebook.mrs } # 国外社交集合 media-!cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-social-media-!cn.mrs } # 音视频 spotify: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/spotify.mrs } netflix: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/netflix.mrs } tiktok: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/tiktok.mrs } porn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-porn.mrs } hbo: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/hbo.mrs } emby: { <<: *domain, url: https://github.com/666OS/rules/raw/release/mihomo/domain/Emby.mrs } disney: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/disney.mrs } # 港媒体 viu: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/viu.mrs } mytvsuper: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/mytvsuper.mrs } tvb: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/tvb.mrs } kktv: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/kktv.mrs } litv: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/litv.mrs } # 测速服务 speedtest: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/speedtest.mrs } # 游戏服务 xbox: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/xbox.mrs } steam@cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/steam@cn.mrs } steam: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/steam.mrs } nintendo@cn: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/nintendo@cn.mrs } nintendo: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/nintendo.mrs } playstation: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/playstation.mrs } # IP规则集 (GeoIP) cn_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/cn.mrs } # 内网规则集 private_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/private.mrs } # 企业规则集 google_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/google.mrs } telegram_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/telegram.mrs } twitter_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/twitter.mrs } facebook_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/facebook.mrs } netflix_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/netflix.mrs } cloudflare_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/cloudflare.mrs } apple_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/apple.mrs } emby_ip: { <<: *ip, url: https://github.com/666OS/rules/raw/release/mihomo/ip/Emby.mrs } # 广告规则集 category-ads-all: { <<: *domain, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-ads-all.mrs } ad_ip: { <<: *ip, url: https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/ad.mrs } # =============================== - 匹配逻辑 - ================================ rules: # 阻止 QUIC/APP内置DOH - AND,((NETWORK,UDP),(DST-PORT,443),(NOT,((RULE-SET,cn))),(NOT,((RULE-SET,cn_ip)))),REJECT # 1. 内网与私有网络 (直连) - RULE-SET,private_ip,DIRECT,no-resolve - RULE-SET,private,DIRECT # 2. PT/BT直连 - RULE-SET,tracker,PT和BT下载,no-resolve - RULE-SET,category-pt,PT和BT下载,no-resolve # 3. 广告拦截 (最高优先级) - RULE-SET,category-ads-all,REJECT - RULE-SET,ad_ip,REJECT,no-resolve # 4. 哔哩哔哩 - RULE-SET,bilibili,Bilibili # 5. Apple - RULE-SET,apple@cn,DIRECT - RULE-SET,apple,Apple # 6. 港台媒体 - RULE-SET,mytvsuper,港台媒体 - RULE-SET,viu,港台媒体 - RULE-SET,tvb,港台媒体 - RULE-SET,kktv,港台媒体 - RULE-SET,litv,港台媒体 # biliapi港B站 - DOMAIN-SUFFIX,biliapi.net,港台媒体 - DOMAIN-SUFFIX,biliapi.com,港台媒体 - DOMAIN-SUFFIX,bilivideo.com,港台媒体 # APPLEAI指定域名 - DOMAIN,guzzoni.apple.com,AI集合 - DOMAIN,mask-api.fe.apple-dns.net,AI集合 - DOMAIN,mask-api.icloud.com,AI集合 - DOMAIN,mask-t.apple-dns.net,AI集合 - DOMAIN,mask.apple-dns.net,AI集合 - DOMAIN-SUFFIX,apple-relay.apple.com,AI集合 - DOMAIN-SUFFIX,apple-relay.cloudflare.com,AI集合 - DOMAIN-SUFFIX,apple-relay.fastly-edge.com,AI集合 - DOMAIN-SUFFIX,apple-relay.mask.apple-dns.net,AI集合 - DOMAIN-SUFFIX,cp4.cloudflare.com,AI集合 - DOMAIN-SUFFIX,gateway.icloud.com,AI集合 - DOMAIN-SUFFIX,gspe1-ssl.ls.apple.com,AI集合 - DOMAIN-SUFFIX,ls.apple.com,AI集合 - DOMAIN-SUFFIX,mask-h2.icloud.com,AI集合 - DOMAIN-SUFFIX,mask.icloud.com,AI集合 - DOMAIN-SUFFIX,smoot.apple.com,AI集合 - DOMAIN-SUFFIX,apps.mzstatic.com,AI集合 # 7. AI 相关服务 - RULE-SET,gemini,Gemini - RULE-SET,openai,ChatGPT - RULE-SET,category-ai-!cn,AI集合 # 8. Cloudflare 相关 - RULE-SET,cloudflare@cn,DIRECT - RULE-SET,cloudflare,Cloudflare # 9. 国外媒体 (分流) - RULE-SET,github,GitHub - RULE-SET,porn,Porn - RULE-SET,hbo,HBO - RULE-SET,emby,Emby - RULE-SET,tiktok,TikTok - RULE-SET,disney,Disney - RULE-SET,youtube,YouTube - RULE-SET,spotify,Spotify - RULE-SET,netflix,Netflix - RULE-SET,google,Google - RULE-SET,speedtest,Speedtest - RULE-SET,category-media,国外媒体集合 # 10. 微软 - RULE-SET,microsoft@cn,DIRECT - RULE-SET,microsoft,Microsoft # 11. 社交平台 - RULE-SET,telegram,Telegram - RULE-SET,twitter,Twitter - RULE-SET,whatsapp,Whatsapp - RULE-SET,instagram,Instagram - RULE-SET,facebook,Facebook - RULE-SET,media-!cn,国外社交集合 # 12. 游戏服务 - RULE-SET,xbox,Xbox - RULE-SET,steam@cn,DIRECT - RULE-SET,steam,Steam - RULE-SET,nintendo@cn,DIRECT - RULE-SET,nintendo,Nintendo - RULE-SET,playstation,PlayStation # 13. 国内禁的网站 - RULE-SET,gfw,国外网站 # 14. 国外网站 - RULE-SET,geolocation-!cn,国外网站 # 15. 国内直连 - RULE-SET,cn,国内网站 # 16. IP 规则分流 (no-resolve) - RULE-SET,apple_ip,Apple,no-resolve - RULE-SET,telegram_ip,Telegram,no-resolve - RULE-SET,cloudflare_ip,Cloudflare,no-resolve - RULE-SET,emby_ip,Emby,no-resolve - RULE-SET,twitter_ip,Twitter,no-resolve - RULE-SET,facebook_ip,Facebook,no-resolve - RULE-SET,netflix_ip,Netflix,no-resolve - RULE-SET,google_ip,Google,no-resolve # 17. 国内直连兜底 (GeoIP & Geosite) - RULE-SET,cn_ip,国内网站 # 18. 最终兜底规则 - MATCH,漏网之鱼 # ========== EOF ============