-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathReplace_China_MRS_With_GeoSite.conf
More file actions
32 lines (30 loc) · 1.49 KB
/
Copy pathReplace_China_MRS_With_GeoSite.conf
File metadata and controls
32 lines (30 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[YAML]
# Name: Replace China MRS With GeoSite
# Author: Aethersailor
# Project: Custom_OpenClash_Rules
# Description: 将 OpenClash 为大陆绕过自动添加的 oc-cn-domain MRS 替换为本地 geosite:cn
# Compatibility: 需 OpenClash 支持 [YAML] 数组差集、数组追加和键删除操作符,Mihomo 支持 GeoSite
# Action: 保留其他 Fake-IP Filter,删除自动 MRS 引用及 Provider,并追加一份 geosite:cn
# Conflicts: 仅适用于 fake-ip-filter-mode 为 blacklist 或未设置的配置
# Verification: 在最终运行配置中确认存在 geosite:cn,且不存在 rule-set:oc-cn-domain 与 oc-cn-domain Provider
#
# 功能:
# 1. 删除 OpenClash 自动添加的 rule-set:oc-cn-domain
# 2. 删除已有的 geosite:cn 后重新追加,避免重复
# 3. 删除不再使用的 rule-providers.oc-cn-domain
# 4. 保留其他 fake-ip-filter 项和 Rule Provider
#
# 限制:
# - 不会自动启用 Fake-IP 模式或“绕过中国大陆 IP”功能
# - 不适用于 fake-ip-filter-mode: rule 或 whitelist
# - 如果其他规则仍引用 oc-cn-domain,删除 Provider 会导致配置校验失败
# - 依赖当前 GeoSite 数据库包含 cn 分类,分类内容可能与 OpenClash 自动下载的 cn.mrs 不完全一致
# - OpenClash 的自动添加日志出现在本模块之前,即使最终配置已替换,启动日志仍可能显示已添加 MRS
dns:
fake-ip-filter-:
- 'rule-set:oc-cn-domain'
- 'geosite:cn'
fake-ip-filter+:
- 'geosite:cn'
rule-providers-:
oc-cn-domain: