diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm index 31733a1ee..c6caa22d8 100644 --- a/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm @@ -328,8 +328,10 @@ function import_ssr_url(btn, urlname, sid) { document.getElementsByName('cbid.shadowsocksr.' + sid + '.seed')[0].value = params.get("seed") || ""; break; case "http": - document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_host')[0].value = queryParam.host || serverPart[0]; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.h2_path')[0].value = queryParam.path || "/"; + /* this is non-standard, bullshit */ + 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; case "quic": document.getElementsByName('cbid.shadowsocksr.' + sid + '.quic_guise')[0].value = params.get("headerType") || "none"; diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index 66219c3e3..bd1b5816a 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -369,7 +369,8 @@ local function processData(szType, content) if result.transport == "ws" then 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 "/" - 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.h2_host = params.host and UrlDecode(params.host) or nil result.h2_path = params.path and UrlDecode(params.path) or nil