From 6e68b15703c9cc1a82c0f1e1fc5db4665ef06e1c Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Mon, 12 Nov 2018 18:57:27 +0800 Subject: [PATCH] luci ss plus: add allowInsecure option in v2ray --- package/lean/luci-app-ssr-plus/Makefile | 2 +- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 7 ++++++- .../root/usr/share/shadowsocksr/genv2config.lua | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index ce6311862..27addf0ab 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=1 -PKG_RELEASE:=50 +PKG_RELEASE:=51 PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo diff --git a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 41fc9ac43..b6c135e64 100644 --- a/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/package/lean/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -189,7 +189,7 @@ o.rmempty = false o:depends("type", "v2ray") -- VmessId -o = s:option(Value, "vmess_id", translate("VmessId")) +o = s:option(Value, "vmess_id", translate("VmessId (UUID)")) o.rmempty = false o.default = uuid o:depends("type", "v2ray") @@ -304,6 +304,11 @@ o = s:option(Flag, "congestion", translate("Congestion")) o:depends("transport", "kcp") o.rmempty = true +-- [[ allowInsecure ]]-- +o = s:option(Flag, "insecure", translate("allowInsecure")) +o.rmempty = false +o:depends("type", "v2ray") + -- [[ TLS ]]-- o = s:option(Flag, "tls", translate("TLS")) o.rmempty = false diff --git a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua index 1f6743b3b..e36f9f03c 100644 --- a/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua +++ b/package/lean/luci-app-ssr-plus/root/usr/share/shadowsocksr/genv2config.lua @@ -42,6 +42,7 @@ local v2ray = { streamSettings = { network = server.transport, security = (server.tls == '1') and "tls" or "none", + allowInsecure = (server.insecure == "1") and true or false, kcpSettings = (server.transport == "kcp") and { mtu = tonumber(server.mtu), tti = tonumber(server.tti),