# 名称: Chunlion_Rule-Set_DNS-Leak # 项目地址:https://github.com/Chunlion/Clash_Rule-Set # 说明: ①本文件适用于Mihomo核心的工具使用; ②使用前需补充完整 “订阅链接” 与 “机场名”; ③订阅链接和机场名请勿随意泄露,以免造成不必要的麻烦; # 原作者频道:https://t.me/Seven1gogogo,项目地址:https://github.com/Seven1echo/Yaml,此分流文件添加了我需要的规则(PayPal、Crypto、Games、Emby、去广告等),并且做了防止DNS泄露的配置,欢迎参考修改。 # ※※※※※※※※※※※※※※※ 锚点区域 ※※※※※※※※※※※※※※※ # ① 订阅锚点 Anchor_PR: &Anchor_PR {type: http, interval: 86400, proxy: DIRECT, health-check: {enable: true, url: 'https://www.gstatic.com/generate_204', interval: 300, expected-status: 204}, filter: "^(?i)(?!.*(群|返利|邀请|客服|工单|官网|网站|网址|邮箱|订阅|套餐|流量|到期|过期|剩余|重置|通知|更新|作者|频道|获取|下次|版本|官址|已用|联系|贩卖|倒卖|地址|说明|教程|关注|加入|http|expire|traffic|reset|subscription|remaining|used|total|email|panel|channel|author)).*$"} # ② 出站锚点 Anchor_OB: &Anchor_OB {type: select, proxies: [一键代理, 全局均衡, 家宽节点, 香港手动, 日本手动, 澳门手动, 台湾手动, 韩国手动, 新加坡手动, 美国手动, 欧洲手动, 香港自动, 日本自动, 澳门自动, 台湾自动, 韩国自动, 新加坡自动, 美国自动, 欧洲自动, 香港故转, 日本故转, 澳门故转, 台湾故转, 韩国故转, 新加坡故转, 美国故转, 欧洲故转, 其他手动]} Anchor_SP: &Anchor_SP {type: select, proxies: [一键代理, 全局均衡, 家宽节点, 香港手动, 日本手动, 澳门手动, 台湾手动, 韩国手动, 新加坡手动, 美国手动, 欧洲手动, 香港自动, 日本自动, 澳门自动, 台湾自动, 韩国自动, 新加坡自动, 美国自动, 欧洲自动, 香港故转, 日本故转, 澳门故转, 台湾故转, 韩国故转, 新加坡故转, 美国故转, 欧洲故转, 其他手动, DIRECT]} Anchor_AI: &Anchor_AI {type: select, proxies: [家宽节点, 美国手动, 一键代理, 全局均衡, 香港手动, 日本手动, 澳门手动, 台湾手动, 韩国手动, 新加坡手动, 欧洲手动, 香港自动, 日本自动, 澳门自动, 台湾自动, 韩国自动, 新加坡自动, 美国自动, 欧洲自动, 香港故转, 日本故转, 澳门故转, 台湾故转, 韩国故转, 新加坡故转, 美国故转, 欧洲故转, 其他手动]} Anchor_UK: &Anchor_UK {type: select, proxies: [欧洲手动,美国手动,其他手动]} # ③ 策略锚点 Anchor_HS: &Anchor_HS {type: select, empty-fallback: REJECT, include-all: true, exclude-type: direct} Anchor_FB: &Anchor_FB {type: fallback, empty-fallback: REJECT, expected-status: 204, url: 'https://www.gstatic.com/generate_204', interval: 180, lazy: false, timeout: 2000, max-failed-times: 2, hidden: true} Anchor_UT: &Anchor_UT {type: url-test, empty-fallback: REJECT, expected-status: 204, url: 'https://www.gstatic.com/generate_204', interval: 300, lazy: false, tolerance: 30, timeout: 2000, max-failed-times: 3, hidden: true, include-all: true, exclude-type: direct} Anchor_LB: &Anchor_LB {type: load-balance, strategy: sticky-sessions, empty-fallback: REJECT, expected-status: 204, url: 'https://www.gstatic.com/generate_204', interval: 300, lazy: true, timeout: 2000, max-failed-times: 3, hidden: true, include-all: true, exclude-type: direct} # ④ 规则锚点 Anchor_DN: &Anchor_DN {type: http, interval: 86400, size-limit: 8388608, proxy: 一键代理, behavior: domain, format: mrs} Anchor_IP: &Anchor_IP {type: http, interval: 86400, size-limit: 8388608, proxy: 一键代理, behavior: ipcidr, format: mrs} Anchor_CL: &Anchor_CL {type: http, interval: 86400, size-limit: 8388608, proxy: 一键代理, behavior: classical, format: text} # ⑤ 区域锚点 # 地区词决定归属;IEPL / IPLC / BGP / Game / 倍率等线路标签不参与地区判断。 # 没有明确地区词的节点进入“其他”分组,避免把线路标签误当成地区特征。 Anchor_HK: &Anchor_HK '^(?i)(?=.*(香港|🇭🇰|\bHK\b|Hong(?:\s?Kong)?|\bHKG\b|\bHKT\b|\bHKBN\b)).*$' Anchor_MO: &Anchor_MO '^(?i)(?=.*(澳门|澳門|🇲🇴|\bMO\b|\bMFM\b|Macao|Macau)).*$' Anchor_TW: &Anchor_TW '^(?i)(?=.*(台湾|台灣|🇹🇼|\bTW\b|\bTPE\b|\bTSA\b|\bKHH\b|Taiwan|Taipei|Kaohsiung)).*$' Anchor_JP: &Anchor_JP '^(?i)(?=.*(日本|🇯🇵|\bJP\b|Japan|Tokyo|Osaka|Fukuoka|\bTYO\b|\bOSA\b|\bNRT\b|\bHND\b|\bKIX\b|\bCTS\b|\bFUK\b)).*$' Anchor_KR: &Anchor_KR '^(?i)(?=.*(韩国|韓國|🇰🇷|首尔|首爾|\bKR\b|\bKOR\b|Korea|Seoul|\bSEL\b|\bICN\b)).*$' Anchor_SG: &Anchor_SG '^(?i)(?=.*(新加坡|🇸🇬|\bSG\b|Singapore|\bSGP\b|\bSIN\b|\bXSP\b)).*$' Anchor_US: &Anchor_US '^(?i)(?=.*(美国|美國|🇺🇸|\bUS\b|\bUSA\b|\bNA\b|United\s?States|America|\bSJC\b|\bJFK\b|\bLAX\b|\bORD\b|\bATL\b|\bDFW\b|\bSFO\b|\bMIA\b|\bSEA\b|\bIAD\b)).*$' Anchor_HOME: &Anchor_HOME '^(?i)(?=.*(家宽|🏠|家庭宽带|宽带|住宅|民宅|\bResidential\b|\bHome\b|\bISP\b|Broadband)).*$' Anchor_EU: &Anchor_EU '^(?i)(?=.*(奥地利|奥地利共和国|比利时|保加利亚|克罗地亚|塞浦路斯|捷克|丹麦|爱沙尼亚|芬兰|法国|德国|希腊|匈牙利|爱尔兰|意大利|拉脱维亚|立陶宛|卢森堡|荷兰|波兰|葡萄牙|罗马尼亚|斯洛伐克|斯洛文尼亚|西班牙|瑞典|英国|London|United\s?Kingdom|England|Germany|France|Netherlands|Amsterdam|Frankfurt|Paris|\bLON\b|\bUK\b|\bGB\b|\bGBR\b|🇧🇪|🇨🇿|🇩🇰|🇫🇮|🇫🇷|🇩🇪|🇮🇪|🇮🇹|🇱🇹|🇱🇺|🇳🇱|🇵🇱|🇸🇪|🇬🇧|\bCDG\b|\bFRA\b|\bAMS\b|\bMAD\b|\bBCN\b|\bFCO\b|\bMUC\b|\bBRU\b|\bLHR\b|\bLGW\b)).*$' Anchor_OT: &Anchor_OT '^(?i)(?!.*(DIRECT|直接连接|香港|澳门|澳門|台湾|台灣|日本|韩国|韓國|首尔|首爾|新加坡|美国|美國|奥地利|比利时|保加利亚|克罗地亚|塞浦路斯|捷克|丹麦|爱沙尼亚|芬兰|法国|德国|希腊|匈牙利|爱尔兰|意大利|拉脱维亚|立陶宛|卢森堡|荷兰|波兰|葡萄牙|罗马尼亚|斯洛伐克|斯洛文尼亚|西班牙|瑞典|英国|Hong(?:\s?Kong)?|Taiwan|Taipei|Kaohsiung|Macau|Macao|Japan|Tokyo|Osaka|Fukuoka|Korea|Seoul|Singapore|United\s?States|America|United\s?Kingdom|England|London|Germany|France|Netherlands|Amsterdam|Frankfurt|Paris|🇭🇰|🇲🇴|🇹🇼|🇸🇬|🇯🇵|🇰🇷|🇺🇸|🇬🇧|🇧🇪|🇨🇿|🇩🇰|🇫🇮|🇫🇷|🇩🇪|🇮🇪|🇮🇹|🇱🇹|🇱🇺|🇳🇱|🇵🇱|🇸🇪|\bHK\b|\bHKG\b|\bHKT\b|\bHKBN\b|\bMO\b|\bMFM\b|\bTW\b|\bTPE\b|\bTSA\b|\bKHH\b|\bJP\b|\bTYO\b|\bOSA\b|\bNRT\b|\bHND\b|\bKIX\b|\bCTS\b|\bFUK\b|\bKR\b|\bKOR\b|\bSEL\b|\bICN\b|\bSG\b|\bSGP\b|\bSIN\b|\bXSP\b|\bUS\b|\bUSA\b|\bNA\b|\bUK\b|\bGB\b|\bGBR\b|\bLON\b|\bSJC\b|\bJFK\b|\bLAX\b|\bORD\b|\bATL\b|\bDFW\b|\bSFO\b|\bMIA\b|\bSEA\b|\bIAD\b|\bCDG\b|\bFRA\b|\bAMS\b|\bMAD\b|\bBCN\b|\bFCO\b|\bMUC\b|\bBRU\b|\bLHR\b|\bLGW\b)).*$' # ※※※※※※※※※※※※※※※ 节点订阅 ※※※※※※※※※※※※※※※ # 将 “订阅链接” 与 “机场名” 替换为所用机场信息; 订阅条数不够可新增,注意开头缩进,不同条数前方 “机场名” 不能重复; 末尾的 “机场名” 作用为每个节点添加机场名称前缀,可自定义。 proxy-providers: 机场1: {<<: *Anchor_PR, url: '订阅链接', override: {additional-prefix: '机场1 '}} #机场2: {<<: *Anchor_PR, url: '订阅链接', override: {additional-prefix: '机场2 '}} #机场3: {<<: *Anchor_PR, url: '订阅链接', override: {additional-prefix: '机场3 '}} # ※※※※※※※※※※※※※※※ 核心配置 ※※※※※※※※※※※※※※※ # 基础配置 mixed-port: 7893 # 监听端口 HTTP + SOCKS5 混合代理端口 mode: rule # 工作模式 rule(规则模式)/ global(全局模式)/ direct(直连模式) find-process-mode: strict # 进程匹配 Windows / Clash Verge Rev 更适合保持 strict allow-lan: false # 局域连接 桌面端默认关闭,避免暴露代理入口 bind-address: 127.0.0.1 # 监听接口 仅监听本机回环地址 tcp-concurrent: true # 并发连接 提升多任务性能 unified-delay: true # 统一延迟 减少节点延迟抖动 keep-alive-idle: 600 # 保活空闲 TCP Keep Alive 最大空闲时间,降低移动设备频繁探测 keep-alive-interval: 60 # 保活探测 TCP Keep Alive 探测间隔 log-level: info # 日志级别 silent(静默)/ error(错误)/ warning(警告)/ info(信息)/ debug(调试) ipv6: false # 网络协议 是否启用 IPv6 支持 profile: store-selected: true # 保存选择 记住上次选择的节点和策略组 store-fake-ip: true # 保存映射 Fake-IP 映射以加快 DNS 命中 # NTP 校时 ntp: enable: true # 内核校时 修正 Mihomo 内部时间偏差 write-to-system: false # 系统写时 OpenWrt 以 root 运行时可改为 true server: time.apple.com # 时间服务器 port: 123 # NTP 端口 interval: 30 # 校时间隔 单位:分钟 dialer-proxy: DIRECT # 直连校时 不依赖代理节点 # 管理面板 external-controller: 127.0.0.1:9090 # 面板地址 external-ui: ui # 面板目录 secret: "123456" # 面板密码 面板与 API 的访问凭据(默认 123456,建议自行修改) external-ui-url: https://github.com/Zephyruso/zashboard/releases/latest/download/dist-no-fonts.zip geo-auto-update: true # 自动更新 geodata geo-update-interval: 24 # 更新间隔 单位:小时 geodata-mode: true # 数据分流 使用 geosite / geoip 数据库 geox-url: geosite: https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat geoip: https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat mmdb: https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.metadb asn: https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/GeoLite2-ASN.mmdb # TUN配置 tun: enable: true # 网卡模式 是否启用 TUN 虚拟网卡模式 stack: mixed # 协议类型 网络栈:system(系统栈)/ gvisor(内置用户态栈)/ mixed(混合) dns-hijack: [any:53, "tcp://any:53"] # 劫持请求 劫持所有 UDP/TCP 53 端口的 DNS 请求 auto-detect-interface: true # 自动出口 自动识别默认出口网络接口 (仅内核模式有效) auto-route: true # 自动路由 自动添加系统路由表 (仅内核模式有效) auto-redirect: true # 自动定向 自动将流量重定向至 TUN (仅 Linux 生效) strict-route: false # 路由模式 严格路由模式 endpoint-independent-nat: true # 端点无关 NAT(提高 NAT 类型兼容性,适用于 P2P 和游戏) route-exclude-address-set: [cn_ip] # 绕过大陆 匹配大陆 IP-CIDR 的流量不进入 TUN # 嗅探功能 sniffer: enable: true # 启用嗅探 提升透明代理 / TUN 场景下的域名分流准确性 override-destination: false # 覆盖目标 全局不覆盖目标地址,降低误嗅探导致异常的概率 parse-pure-ip: false # 纯 IP 嗅探 不强制嗅探所有纯 IP 连接,减少游戏、P2P、IoT、远控异常 force-dns-mapping: true # 强制映射 兼容 redir-host 的 DNS 映射流量;Fake-IP 模式下保留无副作用 sniff: HTTP: ports: [80, 8080-8880] # 嗅探参数 HTTP 明文流量及常见 Web / 代理端口段 override-destination: true # 覆盖目标 HTTP 明文流量可安全使用嗅探域名覆盖原始目标 TLS: ports: [443, 8443] # 嗅探参数 HTTPS / TLS SNI,常用端口及备用端口 QUIC: ports: [443, 8443] # 嗅探参数 QUIC / HTTP/3 常用端口及备用端口 force-domain: - "+.netflix.com" # 强制嗅探 Netflix 主域名 - "+.nflxvideo.net" # 强制嗅探 Netflix 视频 CDN - "+.media.dssott.com" # 强制嗅探 Disney+ 流媒体 skip-domain: - "+.apple.com" # 跳过嗅探 苹果服务,减少推送、iCloud、系统服务异常 - "Mijia Cloud" # 跳过嗅探 米家云服务,避免设备通信异常 - "dlg.io.mi.com" # 跳过嗅探 小米设备通信 - "+.oray.com" # 跳过嗅探 花生壳服务,避免远程访问异常 - "+.sunlogin.net" # 跳过嗅探 向日葵远程控制,避免远控连接异常 skip-dst-address: - 127.0.0.0/8 # 跳过目标 本机回环 - 10.0.0.0/8 # 跳过目标 私有网络 - 172.16.0.0/12 # 跳过目标 私有网络 - 192.168.0.0/16 # 跳过目标 私有网络 - 169.254.0.0/16 # 跳过目标 IPv4 链路本地 - 100.64.0.0/10 # 跳过目标 CGNAT / Tailscale - ::1/128 # 跳过目标 IPv6 回环 - fc00::/7 # 跳过目标 IPv6 私有网络 - fe80::/10 # 跳过目标 IPv6 链路本地 # hosts 配置 hosts: 'services.googleapis.cn': ['services.googleapis.com'] # Google Play 使用全球服务域名 # DNS 设置(开启严格路由可以仅保留nameserver) dns: enable: true # 解析服务 启用 Clash 内置 DNS 服务 use-hosts: true # 配置 Hosts DNS 查询遵循配置文件中的 hosts use-system-hosts: true # 系统 Hosts DNS 查询同时遵循系统 hosts cache-algorithm: arc # 缓存算法 自适应替换缓存(较LRU命中率更优) listen: 127.0.0.1:7874 # 监听服务 仅监听本机,避免 DNS 暴露到局域网 ipv6: false # 网络协议 关闭 IPv6 DNS 解析支持(防止DNS泄露) enhanced-mode: fake-ip # 增强模式 FDNS 增强模式(Fake-IP,用于防止 DNS 泄露) fake-ip-range: 198.18.0.1/16 # 虚拟地址 Fake-IP 虚拟地址池范围 fake-ip-filter-mode: blacklist # 过滤模式 Fake-IP 过滤模式(命中规则则返回真实 IP) respect-rules: true # 遵循规则 强制遵循规则顺序 prefer-h3: false # 关闭 HTTP/3 支持 fake-ip-filter: - "rule-set:fakeip_filter" # 真实解析 外部维护的 Fake-IP 兼容域名 - "rule-set:vowifi" # 真实解析 VoWiFi 网关与鉴权域名 - "+.ts.net" # Tailscale MagicDNS - "+.pub.3gppnetwork.org" # VoWiFi ePDG - "+.lan" # 真实解析 局域网域名,避免路由器、NAS、打印机访问异常 - "+.local" # 真实解析 mDNS / Bonjour / 本地域名 - "geosite:cn" # 真实解析 国内域名,配合国内直连规则使用(与 rule-set:cn_domain 同源,保留一份即可) - "geosite:private" # 真实解析 私有网络 / 内网相关域名(与 rule-set:private_domain 同源,保留一份即可) - "rule-set:add_direct_domain" # 真实解析 自定义直连域名规则集 - "+.msftconnecttest.com" # 真实解析 Windows 网络连接测试 - "+.msftncsi.com" # 真实解析 Windows NCSI 网络状态检测 - "localhost.ptlogin2.qq.com" # 真实解析 QQ 登录相关 - "localhost.sec.qq.com" # 真实解析 QQ 安全登录相关 - "+.in-addr.arpa" # 真实解析 IPv4 反向解析 - "+.ip6.arpa" # 真实解析 IPv6 反向解析 - "stun.*" # 真实解析 常见 STUN 服务 - "+.stun.*.*" # 真实解析 多级 STUN 域名 - "+.turn.*.*" # 真实解析 TURN 中继服务 - "+.ntp.org" # 真实解析 NTP 时间同步服务 - "time.windows.com" # 真实解析 Windows 时间同步 - "time.apple.com" # 真实解析 Apple 时间同步 - "time-ios.apple.com" # 真实解析 iOS 时间同步 - "time.google.com" # 真实解析 Google 时间同步 default-nameserver: - 223.5.5.5 # 默认 DNS 阿里云,用于解析 DoH / DoT 服务器域名 - 119.29.29.29 # 默认 DNS 腾讯,用于解析 DoH / DoT 服务器域名 proxy-server-nameserver: - https://dns.alidns.com/dns-query # 节点解析 解析代理节点域名,避免解析节点域名时产生循环 - https://doh.pub/dns-query # 节点解析 腾讯 DoH,作为代理节点域名解析备用 direct-nameserver: - 223.5.5.5 # 直连解析 直连域名使用国内 DNS 重新解析 - 119.29.29.29 # 直连解析 直连域名备用 DNS direct-nameserver-follow-policy: true # 策略跟随 直连解析时遵循 nameserver-policy nameserver-policy: "rule-set:add_direct_domain": [223.5.5.5, 119.29.29.29] # 策略解析 自定义直连域名使用国内 DNS "geosite:cn,private": [223.5.5.5, 119.29.29.29] # 策略解析 国内 / 私有域名使用国内 DNS(cn_domain / private_domain 规则集与其同源,无需重复) nameserver: - https://dns.alidns.com/dns-query # 默认解析 阿里 DoH,普通域名默认解析 - https://doh.pub/dns-query # 默认解析 腾讯 DoH,普通域名备用解析 # 本配置不启用 fallback / fallback-filter;Fake-IP 代理连接通常由代理侧解析。 # respect-rules 控制 DNS 连接路由,不替代 fallback 的解析回退功能。 # ※※※※※※※※※※※※※※※ 代理策略组 ※※※※※※※※※※※※※※※ # 策略组(按服务分组) proxy-groups: - {name: 一键代理, type: select, proxies: [全局均衡, 家宽节点, 香港手动, 日本手动, 澳门手动, 台湾手动, 韩国手动, 新加坡手动, 美国手动, 欧洲手动, 香港自动, 日本自动, 澳门自动, 台湾自动, 韩国自动, 新加坡自动, 美国自动, 欧洲自动, 香港故转, 日本故转, 澳门故转, 台湾故转, 韩国故转, 新加坡故转, 美国故转, 欧洲故转, 其他手动], icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/Rocket.png} - {name: Streaming, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/YouTube.png} - {name: GitHub, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/04ProxySoft/github(1).png} - {name: Google, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/Google.png} - {name: AI Services, <<: *Anchor_AI, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/AI.png} - {name: Emby, <<: *Anchor_SP, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Emby.png} - {name: Apple, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/Apple.png} - {name: Telegram, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/Telegram.png} - {name: Twitter, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/Twitter.png} - {name: TikTok, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/TikTok.png} - {name: Microsoft, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/Microsoft.png} - {name: PayPal, <<: *Anchor_SP, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/04ProxySoft/paypal(2).png} - {name: Crypto, <<: *Anchor_SP, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/04ProxySoft/Bitcoin.png} - {name: Games, <<: *Anchor_SP, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Game.png} - {name: VoWiFi, <<: *Anchor_UK, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/WiFi.png} - {name: 兜底流量, <<: *Anchor_OB, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Final.png} # 策略组(按区域分组) # 全局均衡组 - {name: 全局均衡, <<: *Anchor_LB} # 家宽组 - {name: 家宽节点, <<: *Anchor_HS, filter: *Anchor_HOME, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/05icon/home.png} # 香港组 - {name: 香港故转, <<: *Anchor_FB, proxies: [香港手动, 香港自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Hongkong(3).png} - {name: 香港手动, <<: *Anchor_HS, filter: *Anchor_HK, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Hongkong(3).png} - {name: 香港自动, <<: *Anchor_UT, filter: *Anchor_HK, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Hongkong(3).png} # 日本组 - {name: 日本故转, <<: *Anchor_FB, proxies: [日本手动, 日本自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Japan(2).png} - {name: 日本手动, <<: *Anchor_HS, filter: *Anchor_JP, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Japan(2).png} - {name: 日本自动, <<: *Anchor_UT, filter: *Anchor_JP, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Japan(2).png} # 澳门组 - {name: 澳门故转, <<: *Anchor_FB, proxies: [澳门手动, 澳门自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Macao.png} - {name: 澳门手动, <<: *Anchor_HS, filter: *Anchor_MO, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Macao.png} - {name: 澳门自动, <<: *Anchor_UT, filter: *Anchor_MO, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Macao.png} # 台湾组 - {name: 台湾故转, <<: *Anchor_FB, proxies: [台湾手动, 台湾自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/taiwan(4).png} - {name: 台湾手动, <<: *Anchor_HS, filter: *Anchor_TW, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/taiwan(4).png} - {name: 台湾自动, <<: *Anchor_UT, filter: *Anchor_TW, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/taiwan(4).png} # 韩国组 - {name: 韩国故转, <<: *Anchor_FB, proxies: [韩国手动, 韩国自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Korea(2).png} - {name: 韩国手动, <<: *Anchor_HS, filter: *Anchor_KR, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Korea(2).png} - {name: 韩国自动, <<: *Anchor_UT, filter: *Anchor_KR, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/Korea(2).png} # 新加坡组 - {name: 新加坡故转, <<: *Anchor_FB, proxies: [新加坡手动, 新加坡自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/singapore.png} - {name: 新加坡手动, <<: *Anchor_HS, filter: *Anchor_SG, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/singapore.png} - {name: 新加坡自动, <<: *Anchor_UT, filter: *Anchor_SG, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/singapore.png} # 美国组 - {name: 美国故转, <<: *Anchor_FB, proxies: [美国手动, 美国自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/US(2).png} - {name: 美国手动, <<: *Anchor_HS, filter: *Anchor_US, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/US(2).png} - {name: 美国自动, <<: *Anchor_UT, filter: *Anchor_US, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/US(2).png} # 欧洲组 - {name: 欧洲故转, <<: *Anchor_FB, proxies: [欧洲手动, 欧洲自动], icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/EuropeanUnion(2).png} - {name: 欧洲手动, <<: *Anchor_HS, filter: *Anchor_EU, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/EuropeanUnion(2).png} - {name: 欧洲自动, <<: *Anchor_UT, filter: *Anchor_EU, icon: https://raw.githubusercontent.com/lige47/QuanX-icon-rule/main/icon/01Country/EuropeanUnion(2).png} # 其他组 - {name: 其他手动, <<: *Anchor_HS, filter: *Anchor_OT, icon: https://raw.githubusercontent.com/Seven1echo/Yaml/main/icons/OT.png} # ※※※※※※※※※※※※※※※ 规则匹配 ※※※※※※※※※※※※※※※ rules: - AND,((NETWORK,UDP),(DST-PORT,443),(NOT,((OR,((GEOSITE,cn),(GEOSITE,private),(GEOIP,private),(RULE-SET,cn_ip)))))),REJECT # 仅屏蔽境外 UDP 443;国内和私网继续按后续规则分流 # 服务分流 - RULE-SET,ads_domain,REJECT # 屏蔽广告 - RULE-SET,private_domain,DIRECT # Private - RULE-SET,private_ip,DIRECT,no-resolve # Private - RULE-SET,vowifi,VoWiFi # VoWiFi - RULE-SET,microsoft_cn,DIRECT # Microsoft中国 - RULE-SET,apple_cn,DIRECT # Apple中国 - RULE-SET,speedtest_domain,DIRECT # Speedtest - RULE-SET,ai,AI Services # AI Services - RULE-SET,github_domain,GitHub # GitHub - RULE-SET,youtube_domain,Streaming # YouTube - RULE-SET,google_domain,Google # Google - GEOSITE,category-games@cn,DIRECT # 国内游戏 - GEOSITE,category-games,Games # 游戏 - RULE-SET,onedrive_domain,Microsoft # OneDrive - RULE-SET,microsoft_domain,Microsoft # 微软服务 - RULE-SET,appletv_domain,Streaming # Apple TV+ - RULE-SET,emby_domain,Emby # Emby - RULE-SET,apple_domain,Apple # 苹果服务 - RULE-SET,telegram_domain,Telegram # Telegram - RULE-SET,douyin_domain,DIRECT # 抖音直连 - RULE-SET,tiktok_domain,TikTok # TikTok - RULE-SET,twitter_domain,Twitter # Twitter - RULE-SET,netflix_domain,Streaming # Netflix - RULE-SET,disney_domain,Streaming # Disney+ - RULE-SET,spotify_domain,Streaming # Spotify - RULE-SET,crypto_domain,Crypto # 加密货币 - RULE-SET,paypal_domain,PayPal # PayPal - RULE-SET,finance_domain,PayPal # 金融平台 - RULE-SET,add_emby,Emby # Emby 补充 - RULE-SET,add_direct_domain,DIRECT # 直连域名 - RULE-SET,emby_ip,Emby,no-resolve # Emby IP - RULE-SET,google_ip,Google,no-resolve # Google - RULE-SET,telegram_ip,Telegram,no-resolve # Telegram - RULE-SET,twitter_ip,Twitter,no-resolve # Twitter - RULE-SET,netflix_ip,Streaming,no-resolve # Netflix - RULE-SET,cn_domain,DIRECT # 中国域名 - RULE-SET,cn_ip,DIRECT,no-resolve # 中国IP - RULE-SET,geolocation-!cn,一键代理 # 排除国内 - MATCH,兜底流量 # 兜底规则 # 规则来源 rule-providers: #国内直连 microsoft_cn: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/microsoft@cn.mrs"} apple_cn: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/apple@cn.mrs"} #域名规则 fakeip_filter: { <<: *Anchor_DN, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/fakeip-filter.mrs"} ads_domain: { <<: *Anchor_DN, url: "https://anti-ad.net/mihomo.mrs"} private_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/private.mrs"} speedtest_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/ookla-speedtest.mrs"} ai: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/category-ai-!cn.mrs"} github_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/github.mrs"} youtube_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/youtube.mrs"} google_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/google.mrs"} onedrive_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/onedrive.mrs"} microsoft_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/microsoft.mrs"} appletv_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/apple-tvplus.mrs"} emby_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/666OS/rules@release/mihomo/domain/Emby.mrs"} add_emby: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/Chunlion/Clash-Icons@main/Emby.mrs"} apple_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/apple.mrs"} telegram_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/telegram.mrs"} douyin_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/douyin.mrs"} tiktok_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/tiktok.mrs"} twitter_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/twitter.mrs"} netflix_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/netflix.mrs"} disney_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/disney.mrs"} spotify_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/spotify.mrs"} crypto_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/category-cryptocurrency.mrs"} paypal_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/paypal.mrs"} finance_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/category-finance.mrs"} geolocation-!cn: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/geolocation-!cn.mrs"} cn_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/cn.mrs"} add_direct_domain: { <<: *Anchor_DN, url: "https://cdn.jsdelivr.net/gh/Seven1echo/Yaml@main/rules/Seven1_Direct_Domain.mrs"} #IP规则 private_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geoip/private.mrs"} google_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geoip/google.mrs"} emby_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/666OS/rules@release/mihomo/ip/Emby.mrs"} telegram_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geoip/telegram.mrs"} twitter_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geoip/twitter.mrs"} netflix_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geoip/netflix.mrs"} vowifi: { <<: *Anchor_CL, url: "https://raw.githubusercontent.com/Chunlion/Clash_Rule-Set/main/rules/UK-wifi-call.list"} cn_ip: { <<: *Anchor_IP, url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geoip/cn.mrs"} # ※※※※※※※※※※※※※※※ 配置结束 ※※※※※※※※※※※※※※※