luci-app-ssr-plus: fix v2ray HTTP/2 url import and subscribe

This commit is contained in:
LEAN-ESX 2019-10-19 08:38:13 -07:00
parent 6def0fa1ba
commit 818ec70735
4 changed files with 12 additions and 6 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=1
PKG_RELEASE:=118
PKG_RELEASE:=119
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \

View File

@ -210,17 +210,17 @@ o:depends("type", "v2ray")
-- TCP伪装
o = s:option(ListValue, "tcp_guise", translate("Camouflage Type"))
o:depends("transport", "tcp")
o:value("none", translate("None"))
o:value("http", "HTTP")
o:value("none", translate("None"))
o.rmempty = true
-- HTTP域名
o = s:option(DynamicList, "http_host", translate("HTTP Host"))
o = s:option(Value, "http_host", translate("HTTP Host"))
o:depends("tcp_guise", "http")
o.rmempty = true
-- HTTP路径
o = s:option(DynamicList, "http_path", translate("HTTP Path"))
o = s:option(Value, "http_path", translate("HTTP Path"))
o:depends("tcp_guise", "http")
o.rmempty = true
@ -239,7 +239,7 @@ o.rmempty = true
-- [[ H2部分 ]]--
-- H2域名
o = s:option(DynamicList, "h2_host", translate("HTTP/2 Host"))
o = s:option(Value, "h2_host", translate("HTTP/2 Host"))
o:depends("transport", "h2")
o.rmempty = true

View File

@ -135,7 +135,7 @@
document.getElementById('cbid.shadowsocksr.' + sid + '.password').value = b64decsafe(ssm[6]);
document.getElementById('cbid.shadowsocksr.' + sid + '.obfs_param').value = dictvalue(pdict, 'obfsparam');
document.getElementById('cbid.shadowsocksr.' + sid + '.protocol_param').value = dictvalue(pdict, 'protoparam');
var rem = pdict['remarks'];
if (typeof (rem) != 'undefined' && rem != '' && rem.length > 0)
document.getElementById('cbid.shadowsocksr.' + sid + '.alias').value = b64decutf8safe(rem);
@ -188,6 +188,8 @@
document.getElementById('cbid.shadowsocksr.' + sid + '.vmess_id').value = ssm.id;
document.getElementById('cbid.shadowsocksr.' + sid + '.security').value = ssm.type;
document.getElementById('cbid.shadowsocksr.' + sid + '.transport').value = ssm.net;
document.getElementById('cbid.shadowsocksr.' + sid + '.http_host').value = ssm.host;
document.getElementById('cbid.shadowsocksr.' + sid + '.http_path').value = ssm.path;
s.innerHTML = "<font color='green'>导入V2ray配置信息成功</font>";
return false;

View File

@ -47,6 +47,8 @@ Server_Update() {
${uci_set}tcp_guise="$ssr_tcp_guise"
${uci_set}ws_host="$ssr_ws_host"
${uci_set}ws_path="$ssr_ws_path"
${uci_set}h2_host="$ssr_h2_host"
${uci_set}h2_path="$ssr_h2_path"
${uci_set}tls="$ssr_tls"
${uci_set}security="auto"
${uci_set}alias="$ssr_remarks"
@ -192,6 +194,8 @@ do
ssr_tcp_guise="none"
json_get_var ssr_ws_host host
json_get_var ssr_ws_path path
json_get_var ssr_h2_host host
json_get_var ssr_h2_path path
json_get_var ssr_tls tls
if [ "$ssr_tls" == "tls" -o "$ssr_tls" == "1" ]; then
ssr_tls="1"