feat(core): ✨ 新增 Sub-Store 节点命名处理系统
本次变更引入了一套完整的节点自动化重命名方案,旨在提升 Sub-Store 订阅管理的标准化程度: 1. 新增三个机场专属处理脚本:peiqian-rename.js、yuetong-rename.js 及整合版 rename.js,用于精简节点名称和统一格式。 2. 优化 sntp-rename.js:增加了 CT(CF) 和 D(直连) 等线路特征识别。 3. 更新 README.md:详细说明了脚本的链式调用顺序与各自职责。 4. 核心逻辑改进:支持国家/城市短码转换、国旗位置归位及防重复注入机制。
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* YueTong 专用节点清理脚本
|
||||
* 只处理 _subName 为 YueTong 的节点,负责去掉“悦·”品牌前缀、钻石等装饰,以及压短 AI 解锁文案。
|
||||
*/
|
||||
function operator(proxies) {
|
||||
return proxies.map(proxy => {
|
||||
if (proxy._subName !== 'YueTong' || typeof proxy.name !== 'string') {
|
||||
return proxy;
|
||||
}
|
||||
|
||||
proxy.name = proxy.name
|
||||
.replace(/悦[·・]\s*/g, '')
|
||||
.replace(/AI解锁/g, 'AI')
|
||||
.replace(/[💎]/gu, '')
|
||||
.replace(/\s{2,}/g, ' ')
|
||||
.trim();
|
||||
|
||||
return proxy;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user