Skip to content

Commit

Permalink
fix: 修复 TUIC URI
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Feb 15, 2025
1 parent 8fc755f commit 3eb0816
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.16.44",
"version": "2.16.45",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
"main": "src/main.js",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions backend/src/core/proxy-utils/parsers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,18 +865,18 @@ function URI_TUIC() {

for (const addon of addons.split('&')) {
let [key, value] = addon.split('=');
key = key.replace(/_/, '-');
key = key.replace(/_/g, '-');
value = decodeURIComponent(value);
if (['alpn'].includes(key)) {
proxy[key] = value ? value.split(',') : undefined;
} else if (['allow_insecure'].includes(key)) {
} else if (['allow-insecure'].includes(key)) {
proxy['skip-cert-verify'] = /(TRUE)|1/i.test(value);
} else if (['fast_open'].includes(key)) {
} else if (['fast-open'].includes(key)) {
proxy.tfo = true;
} else if (['disable_sni', 'reduce_rtt'].includes(key)) {
proxy[key.replace(/_/g, '-')] = /(TRUE)|1/i.test(value);
} else if (['disable-sni', 'reduce-rtt'].includes(key)) {
proxy[key] = /(TRUE)|1/i.test(value);
} else {
proxy[key.replace(/_/g, '-')] = value;
proxy[key] = value;
}
}

Expand Down

0 comments on commit 3eb0816

Please sign in to comment.