From 354c2c0b1bae44ea675c6fccf369e515a70f375b Mon Sep 17 00:00:00 2001 From: xream Date: Mon, 13 Jan 2025 14:00:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Surge=20=E9=BB=98=E8=AE=A4=E5=BC=80?= =?UTF-8?q?=E5=90=AF=20Shadowsocks=202022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/core/proxy-utils/producers/surge.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/core/proxy-utils/producers/surge.js b/backend/src/core/proxy-utils/producers/surge.js index dfa262c..01c89e8 100644 --- a/backend/src/core/proxy-utils/producers/surge.js +++ b/backend/src/core/proxy-utils/producers/surge.js @@ -53,7 +53,7 @@ export default function Surge_Producer() { return { produce }; } -function shadowsocks(proxy, includeUnsupportedProxy) { +function shadowsocks(proxy) { const result = new Result(proxy); result.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`); if (!proxy.cipher) { @@ -87,9 +87,8 @@ function shadowsocks(proxy, includeUnsupportedProxy) { 'chacha20', 'chacha20-ietf', 'none', - ...(includeUnsupportedProxy - ? ['2022-blake3-aes-128-gcm', '2022-blake3-aes-256-gcm'] - : []), + '2022-blake3-aes-128-gcm', + '2022-blake3-aes-256-gcm', ].includes(proxy.cipher) ) { throw new Error(`cipher ${proxy.cipher} is not supported`);