feat: 文件支持 Mihomo 配置, 支持使用覆写; target 名称适配大小写和别名
Some checks failed
build / build (push) Has been cancelled

This commit is contained in:
xream
2025-01-03 23:37:50 +08:00
parent 95b7557635
commit 85a3e2ee54
6 changed files with 115 additions and 7 deletions

View File

@@ -180,7 +180,7 @@ export default function ClashMeta_Producer() {
delete proxy.id;
delete proxy.resolved;
delete proxy['no-resolve'];
if (type !== 'internal') {
if (type !== 'internal' || opts['delete-underscore-fields']) {
for (const key in proxy) {
if (proxy[key] == null || /^_/i.test(key)) {
delete proxy[key];

View File

@@ -20,20 +20,37 @@ function JSON_Producer() {
}
export default {
qx: QX_Producer(),
QX: QX_Producer(),
QuantumultX: QX_Producer(),
surge: Surge_Producer(),
Surge: Surge_Producer(),
SurgeMac: SurgeMac_Producer(),
Loon: Loon_Producer(),
Clash: Clash_Producer(),
meta: ClashMeta_Producer(),
clashmeta: ClashMeta_Producer(),
'clash.meta': ClashMeta_Producer(),
'Clash.Meta': ClashMeta_Producer(),
ClashMeta: ClashMeta_Producer(),
mihomo: ClashMeta_Producer(),
Mihomo: ClashMeta_Producer(),
uri: URI_Producer(),
URI: URI_Producer(),
v2: V2Ray_Producer(),
v2ray: V2Ray_Producer(),
V2Ray: V2Ray_Producer(),
json: JSON_Producer(),
JSON: JSON_Producer(),
stash: Stash_Producer(),
Stash: Stash_Producer(),
shadowrocket: Shadowrocket_Producer(),
Shadowrocket: Shadowrocket_Producer(),
ShadowRocket: Shadowrocket_Producer(),
surfboard: Surfboard_Producer(),
Surfboard: Surfboard_Producer(),
singbox: singbox_Producer(),
'sing-box': singbox_Producer(),
egern: Egern_Producer(),
Egern: Egern_Producer(),
};