feat: Surge 默认开启 Shadowsocks 2022

This commit is contained in:
xream 2025-01-13 14:00:38 +08:00
parent c963c872ff
commit 02946ec81c

View File

@ -53,7 +53,7 @@ export default function Surge_Producer() {
return { produce }; return { produce };
} }
function shadowsocks(proxy, includeUnsupportedProxy) { function shadowsocks(proxy) {
const result = new Result(proxy); const result = new Result(proxy);
result.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`); result.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`);
if (!proxy.cipher) { if (!proxy.cipher) {
@ -87,9 +87,8 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
'chacha20', 'chacha20',
'chacha20-ietf', 'chacha20-ietf',
'none', 'none',
...(includeUnsupportedProxy '2022-blake3-aes-128-gcm',
? ['2022-blake3-aes-128-gcm', '2022-blake3-aes-256-gcm'] '2022-blake3-aes-256-gcm',
: []),
].includes(proxy.cipher) ].includes(proxy.cipher)
) { ) {
throw new Error(`cipher ${proxy.cipher} is not supported`); throw new Error(`cipher ${proxy.cipher} is not supported`);