Browse Source

luci-app-ssr-plus: add subscribe option allows insecure connection as TLS client (insecure)

coolsnowwolf 8 months ago
parent
commit
5e6a248f9e

+ 1 - 1
luci-app-ssr-plus/Makefile

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=luci-app-ssr-plus
 PKG_NAME:=luci-app-ssr-plus
 PKG_VERSION:=189
 PKG_VERSION:=189
-PKG_RELEASE:=3
+PKG_RELEASE:=5
 
 
 PKG_CONFIG_DEPENDS:= \
 PKG_CONFIG_DEPENDS:= \
 	CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \
 	CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \

+ 5 - 0
luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/servers.lua

@@ -67,6 +67,11 @@ o.write = function()
 	luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
 	luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
 end
 end
 
 
+o = s:option(Flag, "allow_insecure", translate("Allow subscribe Insecure nodes By default"))
+o.rmempty = false
+o.description = translate("Subscribe nodes allows insecure connection as TLS client (insecure)")
+o.default = "0"
+
 o = s:option(Flag, "switch", translate("Subscribe Default Auto-Switch"))
 o = s:option(Flag, "switch", translate("Subscribe Default Auto-Switch"))
 o.rmempty = false
 o.rmempty = false
 o.description = translate("Subscribe new add server default Auto-Switch on")
 o.description = translate("Subscribe new add server default Auto-Switch on")

+ 6 - 0
luci-app-ssr-plus/po/zh_Hans/ssr-plus.po

@@ -1292,3 +1292,9 @@ msgstr "是否要恢复客户端默认配置?"
 
 
 msgid "Are you sure you want to restore the client to default settings?"
 msgid "Are you sure you want to restore the client to default settings?"
 msgstr "是否真的要恢复客户端默认配置?"
 msgstr "是否真的要恢复客户端默认配置?"
+
+msgid "Allow subscribe Insecure nodes By default"
+msgstr "订阅节点允许不验证TLS证书"
+
+msgid "Subscribe nodes allows insecure connection as TLS client (insecure)"
+msgstr "订阅节点强制开启 不验证TLS客户端证书 (insecure)"

+ 2 - 1
luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua

@@ -24,6 +24,7 @@ local uciType = 'servers'
 local ucic = luci.model.uci.cursor()
 local ucic = luci.model.uci.cursor()
 local proxy = ucic:get_first(name, 'server_subscribe', 'proxy', '0')
 local proxy = ucic:get_first(name, 'server_subscribe', 'proxy', '0')
 local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
 local switch = ucic:get_first(name, 'server_subscribe', 'switch', '1')
+local allow_insecure = ucic:get_first(name, 'server_subscribe', 'allow_insecure', '0')
 local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
 local subscribe_url = ucic:get_first(name, 'server_subscribe', 'subscribe_url', {})
 local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
 local filter_words = ucic:get_first(name, 'server_subscribe', 'filter_words', '过期时间/剩余流量')
 local save_words = ucic:get_first(name, 'server_subscribe', 'save_words', '')
 local save_words = ucic:get_first(name, 'server_subscribe', 'save_words', '')
@@ -257,7 +258,7 @@ local function processData(szType, content)
 			elseif info.host then
 			elseif info.host then
 				result.tls_host = info.host
 				result.tls_host = info.host
 			end
 			end
-			result.insecure = 1
+			result.insecure = allow_insecure
 		else
 		else
 			result.tls = "0"
 			result.tls = "0"
 		end
 		end