Skip to content

Commit

Permalink
fix: 修复 Loon UDP 参数
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Feb 7, 2024
1 parent df0ac8a commit e40b9a7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 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.14.212",
"version": "2.14.213",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
26 changes: 18 additions & 8 deletions backend/src/core/proxy-utils/producers/loon.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ function shadowsocks(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp');
if (proxy.udp) {
result.append(`,udp=true`);
}

return result.toString();
}
Expand All @@ -109,7 +111,9 @@ function shadowsocksr(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp');
if (proxy.udp) {
result.append(`,udp=true`);
}

return result.toString();
}
Expand Down Expand Up @@ -152,7 +156,9 @@ function trojan(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp');
if (proxy.udp) {
result.append(`,udp=true`);
}

return result.toString();
}
Expand Down Expand Up @@ -219,7 +225,9 @@ function vmess(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp');
if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString();
}

Expand Down Expand Up @@ -281,7 +289,9 @@ function vless(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp');
if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString();
}

Expand All @@ -304,8 +314,6 @@ function http(proxy) {
// tfo
result.appendIfPresent(`,tfo=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp-relay=${proxy.udp}`, 'udp');
return result.toString();
}

Expand Down Expand Up @@ -390,7 +398,9 @@ function hysteria2(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');

// udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp');
if (proxy.udp) {
result.append(`,udp=true`);
}

// download-bandwidth
result.appendIfPresent(
Expand Down

0 comments on commit e40b9a7

Please sign in to comment.