From 44d72523cebb50b4b6b917d675d079f0e7ee6663 Mon Sep 17 00:00:00 2001 From: xream Date: Fri, 18 Apr 2025 12:24:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AnyTLS=20URI=20=E6=94=AF=E6=8C=81=20UDP?= =?UTF-8?q?=20=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/parsers/index.js | 2 ++ backend/src/core/proxy-utils/producers/uri.js | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 12bb139..035454b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.19.24", + "version": "2.19.25", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/parsers/index.js b/backend/src/core/proxy-utils/parsers/index.js index aba65bb..49a131e 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -744,6 +744,8 @@ function URI_AnyTLS() { proxy[key] = value ? value.split(',') : undefined; } else if (['insecure'].includes(key)) { proxy['skip-cert-verify'] = /(TRUE)|1/i.test(value); + } else if (['udp'].includes(key)) { + proxy[key] = /(TRUE)|1/i.test(value); } else { proxy[key] = value; } diff --git a/backend/src/core/proxy-utils/producers/uri.js b/backend/src/core/proxy-utils/producers/uri.js index ebe34ba..7413bad 100644 --- a/backend/src/core/proxy-utils/producers/uri.js +++ b/backend/src/core/proxy-utils/producers/uri.js @@ -589,6 +589,10 @@ export default function URI_Producer() { if (proxy[key]) { anytlsParams.push(`insecure=1`); } + } else if (['udp'].includes(key)) { + if (proxy[key]) { + anytlsParams.push(`udp=1`); + } } else if (proxy[key]) { anytlsParams.push( `${i.replace(/-/g, '_')}=${encodeURIComponent(