luci-app-ssr-plus: fix parsing subscriptions from some shitty panel
Fixes: #1078 Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
f73a59633c
commit
e7875f0082
@ -328,8 +328,10 @@ function import_ssr_url(btn, urlname, sid) {
|
|||||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.seed')[0].value = params.get("seed") || "";
|
document.getElementsByName('cbid.shadowsocksr.' + sid + '.seed')[0].value = params.get("seed") || "";
|
||||||
break;
|
break;
|
||||||
case "http":
|
case "http":
|
||||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_host')[0].value = queryParam.host || serverPart[0];
|
/* this is non-standard, bullshit */
|
||||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_path')[0].value = queryParam.path || "/";
|
case "h2":
|
||||||
|
document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_host')[0].value = params.get("host") ? decodeURIComponent(params.get("host")) : "";
|
||||||
|
document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_path')[0].value = params.get("path") ? decodeURIComponent(params.get("path")) : "";
|
||||||
break;
|
break;
|
||||||
case "quic":
|
case "quic":
|
||||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_guise')[0].value = params.get("headerType") || "none";
|
document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_guise')[0].value = params.get("headerType") || "none";
|
||||||
|
@ -369,7 +369,8 @@ local function processData(szType, content)
|
|||||||
if result.transport == "ws" then
|
if result.transport == "ws" then
|
||||||
result.ws_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil
|
result.ws_host = (result.tls ~= "1") and (params.host and UrlDecode(params.host)) or nil
|
||||||
result.ws_path = params.path and UrlDecode(params.path) or "/"
|
result.ws_path = params.path and UrlDecode(params.path) or "/"
|
||||||
elseif result.transport == "http" then
|
-- make it compatible with bullshit, "h2" transport is non-existent at all
|
||||||
|
elseif result.transport == "http" or result.transport == "h2" then
|
||||||
result.transport = "h2"
|
result.transport = "h2"
|
||||||
result.h2_host = params.host and UrlDecode(params.host) or nil
|
result.h2_host = params.host and UrlDecode(params.host) or nil
|
||||||
result.h2_path = params.path and UrlDecode(params.path) or nil
|
result.h2_path = params.path and UrlDecode(params.path) or nil
|
||||||
|
Loading…
Reference in New Issue
Block a user