fix: 修复 Loon UDP 参数

This commit is contained in:
xream 2024-02-07 15:14:24 +08:00
parent df0ac8a218
commit e40b9a77c4
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 19 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.14.212", "version": "2.14.213",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -83,7 +83,9 @@ function shadowsocks(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
// udp // udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp'); if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString(); return result.toString();
} }
@ -109,7 +111,9 @@ function shadowsocksr(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
// udp // udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp'); if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString(); return result.toString();
} }
@ -152,7 +156,9 @@ function trojan(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
// udp // udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp'); if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString(); return result.toString();
} }
@ -219,7 +225,9 @@ function vmess(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
// udp // udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp'); if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString(); return result.toString();
} }
@ -281,7 +289,9 @@ function vless(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
// udp // udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp'); if (proxy.udp) {
result.append(`,udp=true`);
}
return result.toString(); return result.toString();
} }
@ -304,8 +314,6 @@ function http(proxy) {
// tfo // tfo
result.appendIfPresent(`,tfo=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,tfo=${proxy.tfo}`, 'tfo');
// udp
result.appendIfPresent(`,udp-relay=${proxy.udp}`, 'udp');
return result.toString(); return result.toString();
} }
@ -390,7 +398,9 @@ function hysteria2(proxy) {
result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo'); result.appendIfPresent(`,fast-open=${proxy.tfo}`, 'tfo');
// udp // udp
result.appendIfPresent(`,udp=${proxy.udp}`, 'udp'); if (proxy.udp) {
result.append(`,udp=true`);
}
// download-bandwidth // download-bandwidth
result.appendIfPresent( result.appendIfPresent(