feat: JSON 输出支持 produceType internal

This commit is contained in:
xream
2024-03-31 04:45:57 +08:00
parent abb6f2dec1
commit 163ad9ee09

View File

@@ -13,7 +13,8 @@ import singbox_Producer from './sing-box';
function JSON_Producer() {
const type = 'ALL';
const produce = (proxies) => JSON.stringify(proxies, null, 2);
const produce = (proxies, type) =>
type === 'internal' ? proxies : JSON.stringify(proxies, null, 2);
return { type, produce };
}