From c434a152cbcf73ee5baf087780ee224cc4f0441a Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sun, 15 Jun 2025 18:45:56 +0800 Subject: [PATCH] Refactor fake-ip-filter to use external rule provider Replaces the inline fake-ip-filter domain list with a reference to a new rule-set provider. Adds the 'fake-ip-filter' rule provider configuration pointing to an external .mrs file for improved maintainability. --- META.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/META.js b/META.js index 717c306..38b61f2 100644 --- a/META.js +++ b/META.js @@ -191,20 +191,7 @@ const dns = { "enhanced-mode": "fake-ip", "fake-ip-range": "198.18.0.1/16", "fake-ip-filter-mode": "blacklist", - "fake-ip-filter": [ - "+.lan", - "+.local", - "+.direct", - "time.*.com", - "ntp.*.com", - "+.msftconnecttest.com", - "+.msftncsi.com", - "localhost.ptlogin2.qq.com", - "localhost.sec.qq.com", - "localhost.work.weixin.qq.com", - "stun.*.*", - "stun.*.*.*", - ], + "fake-ip-filter": ["rule-set:fake-ip-filter"], "default-nameserver": [ "119.29.29.29", "223.5.5.5", @@ -507,6 +494,13 @@ function generateServiceRuleProviders(services, defaultConfig) { } const ruleProviders = { + "fake-ip-filter": { + ...ruleProviderDefaults, + format: "mrs", + behavior: "domain", + url: "https://cdn.jsdelivr.net/gh/xixu-me/RFM@universal/fake-ip-filter.mrs", + path: "./rulesets/fake-ip-filter.mrs", + }, applications: { ...ruleProviderDefaults, format: "yaml",