luci-app-ssr-plus:bump to 182-5

Modify 'Apply' and 'Delete All Subscribe Severs' execution method
Fix the subscription update failure caused by manually adding invalid nodes
This commit is contained in:
Mattraks committed 2021-01-14 11:58:54 +08:00
1 parent cff3a7bc58
commit 5945d0a79b
4 files changed
+27 -8

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=182
PKG_RELEASE:=4
PKG_RELEASE:=5
define Package/$(PKG_NAME)/conffiles
/etc/config/shadowsocksr
@@ -21,6 +21,8 @@ function index()
entry({"admin", "services", "shadowsocksr", "run"}, call("act_status")).leaf = true
entry({"admin", "services", "shadowsocksr", "ping"}, call("act_ping")).leaf = true
entry({"admin", "services", "shadowsocksr", "reset"}, call("act_reset"))
entry({"admin", "services", "shadowsocksr", "restart"}, call("act_restart"))
entry({"admin", "services", "shadowsocksr", "delete"}, call("act_delete"))
end
function subscribe()
@@ -109,7 +111,16 @@ function check_port()
end
function act_reset()
nixio.exec("/etc/init.d/shadowsocksr", "reset")
http.redirect(luci.dispatcher.build_url('admin/services/shadowsocksr'))
return
luci.sys.call("/etc/init.d/shadowsocksr reset &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr"))
end
function act_restart()
luci.sys.call("/etc/init.d/shadowsocksr restart &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr"))
end
function act_delete()
luci.sys.call("/etc/init.d/shadowsocksr restart &")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
end
@@ -66,7 +66,8 @@ o.write = function()
end
end)
uci:save("shadowsocksr")
m.uci:commit("shadowsocksr")
uci:commit("shadowsocksr")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "delete"))
return
end
@@ -113,7 +114,8 @@ node.inputstyle = "apply"
node.write = function(self, section)
uci:set("shadowsocksr", '@global[0]', 'global_server', section)
uci:save("shadowsocksr")
m.uci:commit("shadowsocksr")
uci:commit("shadowsocksr")
luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "restart"))
end
o = s:option(Flag, "switch_enable", translate("Auto Switch"))
@@ -457,9 +457,15 @@ local execute = function()
end
else
if not old.alias then
old.alias = old.server .. ':' .. old.server_port
if not old.server or old.server_port then
ucic:delete(name, old['.name'])
else
old.alias = old.server .. ':' .. old.server_port
log('忽略手动添加的节点: ' .. old.alias)
end
else
log('忽略手动添加的节点: ' .. old.alias)
end
log('忽略手动添加的节点: ' .. old.alias)
end
end)
for k, v in ipairs(nodeResult) do