luci-app-ssr-plus: support vless reality share link
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
368f301a7d
commit
f804aa51eb
@ -1,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_VERSION:=186
|
||||
PKG_RELEASE:=8
|
||||
PKG_VERSION:=187
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \
|
||||
|
@ -308,12 +308,19 @@ function import_ssr_url(btn, urlname, sid) {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].value = params.get("type") == "http" ? "h2" : params.get("type") || "tcp";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].dispatchEvent(event);
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.vless_encryption')[0].value = params.get("encryption") || "none";
|
||||
if ([ "tls" ].includes(params.get("security"))) {
|
||||
if ([ "tls", "reality" ].includes(params.get("security"))) {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.' + params.get("security"))[0].checked = true;
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.' + params.get("security"))[0].dispatchEvent(event);
|
||||
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.fingerprint')[0].value = params.get("fp") || "";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_flow')[0].value = params.get("flow") || "";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls_host')[0].value = params.get("sni") || "";
|
||||
|
||||
if (params.get("security") === "reality") {
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.reality_publickey')[0].value = params.get("pbk") ? decodeURIComponent(params.get("pbk")) : "";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.reality_shortid')[0].value = params.get("sid") || "";
|
||||
document.getElementsByName('cbid.shadowsocksr.' + sid + '.reality_spiderx')[0].value = params.get("spx") ? decodeURIComponent(params.get("spx")) : "";
|
||||
}
|
||||
}
|
||||
switch (params.get("type")) {
|
||||
case "ws":
|
||||
|
@ -359,8 +359,12 @@ local function processData(szType, content)
|
||||
result.transport = params.type or "tcp"
|
||||
result.tls = (params.security == "tls" or params.security == "xtls") and "1" or "0"
|
||||
result.tls_host = params.sni
|
||||
result.tls_flow = (params.security == "tls") and params.flow or nil
|
||||
result.tls_flow = (params.security == "tls" or params.security == "reality") and params.flow or nil
|
||||
result.fingerprint = params.fp
|
||||
result.reality = (params.security == "reality") and "1" or "0"
|
||||
result.reality_publickey = params.pbk and UrlDecode(params.pbk) or nil
|
||||
result.reality_shortid = params.sid
|
||||
result.reality_spiderx = params.spx and UrlDecode(params.spx) or nil
|
||||
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 "/"
|
||||
|
Loading…
Reference in New Issue
Block a user