luci ss plus: add allowInsecure option in v2ray

This commit is contained in:
coolsnowwolf 2018-11-12 18:57:27 +08:00
parent 5225242b8c
commit 6e68b15703
3 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=1 PKG_VERSION:=1
PKG_RELEASE:=50 PKG_RELEASE:=51
PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo

View File

@ -189,7 +189,7 @@ o.rmempty = false
o:depends("type", "v2ray") o:depends("type", "v2ray")
-- VmessId -- VmessId
o = s:option(Value, "vmess_id", translate("VmessId")) o = s:option(Value, "vmess_id", translate("VmessId (UUID)"))
o.rmempty = false o.rmempty = false
o.default = uuid o.default = uuid
o:depends("type", "v2ray") o:depends("type", "v2ray")
@ -304,6 +304,11 @@ o = s:option(Flag, "congestion", translate("Congestion"))
o:depends("transport", "kcp") o:depends("transport", "kcp")
o.rmempty = true o.rmempty = true
-- [[ allowInsecure ]]--
o = s:option(Flag, "insecure", translate("allowInsecure"))
o.rmempty = false
o:depends("type", "v2ray")
-- [[ TLS ]]-- -- [[ TLS ]]--
o = s:option(Flag, "tls", translate("TLS")) o = s:option(Flag, "tls", translate("TLS"))
o.rmempty = false o.rmempty = false

View File

@ -42,6 +42,7 @@ local v2ray = {
streamSettings = { streamSettings = {
network = server.transport, network = server.transport,
security = (server.tls == '1') and "tls" or "none", security = (server.tls == '1') and "tls" or "none",
allowInsecure = (server.insecure == "1") and true or false,
kcpSettings = (server.transport == "kcp") and { kcpSettings = (server.transport == "kcp") and {
mtu = tonumber(server.mtu), mtu = tonumber(server.mtu),
tti = tonumber(server.tti), tti = tonumber(server.tti),