mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-04 11:13:59 +08:00
feat: 支持 QX udp-over-tcp=true/sp.v1/sp.v2
This commit is contained in:
parent
1f0463bfe2
commit
166f3cb447
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.19.21",
|
"version": "2.19.22",
|
||||||
"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": {
|
||||||
|
@ -157,7 +157,7 @@ aead = comma "aead" equals flag:bool { proxy.aead = flag; }
|
|||||||
|
|
||||||
udp_relay = comma "udp-relay" equals flag:bool { proxy.udp = flag; }
|
udp_relay = comma "udp-relay" equals flag:bool { proxy.udp = flag; }
|
||||||
udp_over_tcp = comma "udp-over-tcp" equals flag:bool { throw new Error("UDP over TCP is not supported"); }
|
udp_over_tcp = comma "udp-over-tcp" equals flag:bool { throw new Error("UDP over TCP is not supported"); }
|
||||||
udp_over_tcp_new = comma "udp-over-tcp" equals param:$[^=,]+ { if (param === "sp.v1") { proxy["udp-over-tcp"] = true; proxy["udp-over-tcp-version"] = 1; } else if (param === "true") { proxy["_ssr_python_uot"] = true; } else { throw new Error("Invalid value for udp-over-tcp"); } }
|
udp_over_tcp_new = comma "udp-over-tcp" equals param:$[^=,]+ { if (param === "sp.v1") { proxy["udp-over-tcp"] = true; proxy["udp-over-tcp-version"] = 1; } else if (param === "sp.v2") { proxy["udp-over-tcp"] = true; proxy["udp-over-tcp-version"] = 2; } else if (param === "true") { proxy["_ssr_python_uot"] = true; } else { throw new Error("Invalid value for udp-over-tcp"); } }
|
||||||
|
|
||||||
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ aead = comma "aead" equals flag:bool { proxy.aead = flag; }
|
|||||||
|
|
||||||
udp_relay = comma "udp-relay" equals flag:bool { proxy.udp = flag; }
|
udp_relay = comma "udp-relay" equals flag:bool { proxy.udp = flag; }
|
||||||
udp_over_tcp = comma "udp-over-tcp" equals flag:bool { throw new Error("UDP over TCP is not supported"); }
|
udp_over_tcp = comma "udp-over-tcp" equals flag:bool { throw new Error("UDP over TCP is not supported"); }
|
||||||
udp_over_tcp_new = comma "udp-over-tcp" equals param:$[^=,]+ { if (param === "sp.v1") { proxy["udp-over-tcp"] = true; proxy["udp-over-tcp-version"] = 1; } else if (param === "true") { proxy["_ssr_python_uot"] = true; } else { throw new Error("Invalid value for udp-over-tcp"); } }
|
udp_over_tcp_new = comma "udp-over-tcp" equals param:$[^=,]+ { if (param === "sp.v1") { proxy["udp-over-tcp"] = true; proxy["udp-over-tcp-version"] = 1; } else if (param === "sp.v2") { proxy["udp-over-tcp"] = true; proxy["udp-over-tcp-version"] = 2; } else if (param === "true") { proxy["_ssr_python_uot"] = true; } else { throw new Error("Invalid value for udp-over-tcp"); } }
|
||||||
|
|
||||||
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
fast_open = comma "fast-open" equals flag:bool { proxy.tfo = flag; }
|
||||||
|
|
||||||
|
@ -134,11 +134,15 @@ function shadowsocks(proxy, includeUnsupportedProxy) {
|
|||||||
// udp over tcp
|
// udp over tcp
|
||||||
if (proxy['_ssr_python_uot']) {
|
if (proxy['_ssr_python_uot']) {
|
||||||
append(`,udp-over-tcp=true`);
|
append(`,udp-over-tcp=true`);
|
||||||
} else if (
|
} else if (proxy['udp-over-tcp']) {
|
||||||
proxy['udp-over-tcp'] &&
|
if (
|
||||||
(!proxy['udp-over-tcp-version'] || proxy['udp-over-tcp-version'] === 1)
|
!proxy['udp-over-tcp-version'] ||
|
||||||
|
proxy['udp-over-tcp-version'] === 1
|
||||||
) {
|
) {
|
||||||
append(`,udp-over-tcp=sp.v1`);
|
append(`,udp-over-tcp=sp.v1`);
|
||||||
|
} else if (proxy['udp-over-tcp-version'] === 2) {
|
||||||
|
append(`,udp-over-tcp=sp.v2`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// server_check_url
|
// server_check_url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user