Skip to content

Commit

Permalink
fix: singbox
Browse files Browse the repository at this point in the history
The vless node in the sing-box configuration does not contain the
"security" field, and including it in the export will throw an error.
  • Loading branch information
cnsunyour committed Jun 9, 2024
1 parent 541b19d commit 2aea1c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/singbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2aea1c2

Please sign in to comment.