feat: AnyTLS URI 支持 UDP 参数

This commit is contained in:
xream 2025-04-18 12:24:31 +08:00
parent b60995f7ac
commit 44d72523ce
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
3 changed files with 7 additions and 1 deletions

View File

@ -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": {

View File

@ -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;
}

View File

@ -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(