feat(配置模板): 优化 DustinWin 模板“省流节点”正则,增加 1x 倍率节点支持#1266
Open
gaoqi125 wants to merge 25 commits intojuewuy:devfrom
Open
feat(配置模板): 优化 DustinWin 模板“省流节点”正则,增加 1x 倍率节点支持#1266gaoqi125 wants to merge 25 commits intojuewuy:devfrom
gaoqi125 wants to merge 25 commits intojuewuy:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本次提交旨在完善 DustinWin 规则模板系列中的“省流节点”策略组匹配逻辑。通过在 include 字段追加 1x 与 1.0x 的正则声明,使该策略组能够自动向下兼容并收录基础倍率节点。
事实依据与逻辑推导
现状缺陷:原有的匹配规则为 "include": "0\.[1-5]|低倍率|省流|大流量"。该正则仅能捕获 0.x 的极低倍率节点及特定的中文命名节点。
实际应用事实:在大量主流服务商的节点命名规范中,标准流量消耗的基础节点通常被命名为 1x 或 1.0x。由于原生规则的缺失,导致此类标准省流节点无法被正确分配至“省流节点”组。
精准匹配边界:通过增加精确的 1x|1\.0x 匹配条件,可以有效覆盖上述基础节点。同时,该正则的定界机制在物理层面上排除了 2.x、2.5x 等高倍率溢价节点被误抓的可能性。
具体修改内容
在涉及 DustinWin 规则适配的 .json 模板文件中,定位 "tag": "📉 省流节点" 策略组,将其 include 字段统一由:
"include": "0\.[1-5]|低倍率|省流|大流量"
更新为:
"include": "0\.[1-5]|低倍率|省流|大流量|1x|1\.0x"
本地验证结果
语法树校验:.json 结构完整,转义符 \ 使用规范,符合 Sing-box/Clash 内核对正则的加载标准。
路由效果:基于 ShellCrash 实际环境测试,配置生成后无 duplicate tag 等异常,节点分类精准落地。对原生逻辑无破坏性影响。