⚡️ refactor(core): 优化节点名称格式化逻辑

* 合并倍率、DIP 和 RESI 标识符展示方式
* 调整节点名称拼接逻辑以支持精简格式
* 更新节点名称输出格式说明注释
This commit is contained in:
orion committed 2026-10-31 00:00:15 +08:00
1 parent 5470c30f81
commit a94b9715a6
1 file changed
+5 -5
+5 -5
View File
@@ -1,6 +1,6 @@
/**
* Sub-Store 整合订阅统一重命名脚本
* - 输出:国旗 国家/地区缩写 序号 [倍率] [DIP] [RESI] [线路] - 机场名
* - 输出:国旗 国家/地区缩写 序号 [倍率 DIP RESI] 线路 - 机场名
* - 先按机场分组,再在机场内按国家/地区连续编号和集中排序
* - 实验性节点固定为 0.2x
*/
@@ -325,6 +325,8 @@ async function operator(proxies) {
const dedicatedIp = hasDedicatedIp(item.coreName);
const residential = hasResidential(item.coreName);
const lineLabel = lineLabelOf(item.coreName);
const features = [multiplier, dedicatedIp ? 'DIP' : '', residential ? 'RESI' : '']
.filter(Boolean).join(' ');
const regionLabel = item.regionCode === 'EMBY' ? 'EMBY' : item.regionCode;
const flag = item.regionCode === 'EMBY'
? '🏴‍☠️'
@@ -332,10 +334,8 @@ async function operator(proxies) {
item.proxy.name = [
[flag, regionLabel, sequence].filter(Boolean).join(' '),
multiplier ? `[${multiplier}]` : '',
dedicatedIp ? '[DIP]' : '',
residential ? '[RESI]' : '',
lineLabel ? `[${lineLabel}]` : '',
features ? `[${features}]` : '',
lineLabel,
item.airport ? `- ${item.airport}` : ''
].filter(Boolean).join(' ');
});