From 92377bbb693a8716cfda7f6cb6f90351ad518139 Mon Sep 17 00:00:00 2001 From: Roy Li Date: Sat, 21 Sep 2024 20:42:05 +0200 Subject: [PATCH] fix #281 --- src/utils/loon.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/utils/loon.ts b/src/utils/loon.ts index 20f83a4d2..d251cbfbb 100644 --- a/src/utils/loon.ts +++ b/src/utils/loon.ts @@ -116,18 +116,21 @@ export const getLoonNodes = function ( }`, nodeConfig.hostname, nodeConfig.port, - JSON.stringify(nodeConfig.uuid), - `transport=${nodeConfig.network}`, ] if (nodeConfig.type === NodeTypeEnum.Vmess) { config.push( nodeConfig.method === 'auto' - ? `method=chacha20-poly1305` - : `method=${nodeConfig.method}`, + ? `chacha20-poly1305` + : nodeConfig.method, ) } + config.push( + JSON.stringify(nodeConfig.uuid), + `transport=${nodeConfig.network}`, + ) + if (nodeConfig.network === 'ws' && nodeConfig.wsOpts) { const obfsHost = getHeader(nodeConfig.wsOpts.headers, 'Host')