fix: 修复 surge mac 未开启 mihomo 时, 对于不支持的节点未报错, 导致出现 proxy 为 undefined 的问题

This commit is contained in:
xream
2024-10-29 18:31:02 +08:00
parent aac72fb9a3
commit b048ecdfff
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,10 @@ export default function SurgeMac_Producer() {
`${proxy.name} is not supported on ${targetPlatform}, try to use Mihomo(SurgeMac - External Proxy Program) instead`,
);
return mihomo(proxy, type, opts);
} else {
throw new Error(
`Surge for macOS 可手动指定链接参数 target=SurgeMac 或在 同步配置 中指定 SurgeMac 来启用 mihomo 支援 Surge 本身不支持的协议`,
);
}
}
}