From 2aea1c2b52b2ee527831cbef6a8b2fed20034628 Mon Sep 17 00:00:00 2001 From: Sunn Yao Date: Sun, 9 Jun 2024 23:02:17 +0800 Subject: [PATCH] fix: singbox The vless node in the sing-box configuration does not contain the "security" field, and including it in the export will throw an error. --- src/utils/singbox.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/singbox.ts b/src/utils/singbox.ts index 9e6020243..f5848c298 100644 --- a/src/utils/singbox.ts +++ b/src/utils/singbox.ts @@ -117,9 +117,9 @@ function nodeListMapper(nodeConfig: PossibleNodeConfigType) { case NodeTypeEnum.Vless: case NodeTypeEnum.Vmess: { - node.security = nodeConfig.method node.uuid = nodeConfig.uuid if (nodeConfig.type === NodeTypeEnum.Vmess) { + node.security = nodeConfig.method if (nodeConfig.alterId) { node.alter_id = Number(nodeConfig.alterId) }