From d4e4d0944efece0051cacc8038a38772df368f0b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sun, 23 Apr 2023 09:28:00 +0800
Subject: [PATCH] update 2023-04-23 09:28:00
---
cpulimit/Makefile | 2 +-
jpcre2/Makefile | 2 +-
libcron/Makefile | 2 +-
luci-app-passwall2/Makefile | 2 +-
.../model/cbi/passwall2/client/global.lua | 35 ++++++++++---------
ngrokc/Makefile | 2 +-
njitclient/Makefile | 2 +-
oscam/Makefile | 2 +-
quickjspp/Makefile | 2 +-
rapidjson/Makefile | 2 +-
subconverter/Makefile | 2 +-
toml11/Makefile | 2 +-
12 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/cpulimit/Makefile b/cpulimit/Makefile
index eb259812d..ae81e249e 100644
--- a/cpulimit/Makefile
+++ b/cpulimit/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=cpulimit
PKG_VERSION:=0.3.2
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/denji/cpulimit/tar.gz/$(PKG_VERSION)?
diff --git a/jpcre2/Makefile b/jpcre2/Makefile
index c5d5fd8dd..82d0a897e 100644
--- a/jpcre2/Makefile
+++ b/jpcre2/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=jpcre2
PKG_VERSION:=10.32.01
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/jpcre2/jpcre2/tar.gz/$(PKG_VERSION)?
diff --git a/libcron/Makefile b/libcron/Makefile
index 385d652c3..aeec5ffcd 100644
--- a/libcron/Makefile
+++ b/libcron/Makefile
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libcron
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/PerMalmberg/libcron.git
diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile
index a4c96eb02..ea04ad78c 100644
--- a/luci-app-passwall2/Makefile
+++ b/luci-app-passwall2/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall2
PKG_VERSION:=1.11
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_$(PKG_NAME)_Transparent_Proxy \
diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua
index eaf497816..f8b8df29b 100644
--- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua
+++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua
@@ -47,28 +47,31 @@ o = s:taboption("Main", Flag, "enabled", translate("Main switch"))
o.rmempty = false
local auto_switch_tip
-local auto_switch_flag
+local shunt_remark
local current_node = luci.sys.exec(string.format("[ -f '/tmp/etc/%s/id/global' ] && echo -n $(cat /tmp/etc/%s/id/global)", appname, appname))
if current_node and current_node ~= "" and current_node ~= "nil" then
local n = uci:get_all(appname, current_node)
if n then
if tonumber(m:get("@auto_switch[0]", "enable") or 0) == 1 then
- auto_switch_flag = ""
if n.protocol == "_shunt" then
local shunt_logic = tonumber(m:get("@auto_switch[0]", "shunt_logic"))
- if shunt_logic == 1 then
- auto_switch_flag = "default"
- elseif shunt_logic == 2 then
- auto_switch_flag = "main"
- end
- current_node = luci.sys.exec(string.format("[ -f '/tmp/etc/%s/id/global_%s' ] && echo -n $(cat /tmp/etc/%s/id/global_%s)", appname, auto_switch_flag, appname, auto_switch_flag))
- if current_node and current_node ~= "" and current_node ~= "nil" then
- n = uci:get_all(appname, current_node)
+ if shunt_logic == 1 or shunt_logic == 2 then
+ if shunt_logic == 1 then
+ shunt_remark = "default"
+ elseif shunt_logic == 2 then
+ shunt_remark = "main"
+ end
+ current_node = luci.sys.exec(string.format("[ -f '/tmp/etc/%s/id/global_%s' ] && echo -n $(cat /tmp/etc/%s/id/global_%s)", appname, shunt_remark, appname, shunt_remark))
+ if current_node and current_node ~= "" and current_node ~= "nil" then
+ n = uci:get_all(appname, current_node)
+ end
end
end
- local remarks = api.get_node_remarks(n)
- local url = api.url("node_config", n[".name"])
- auto_switch_tip = translatef("Current node: %s", string.format('%s', url, remarks)) .. "
"
+ if n then
+ local remarks = api.get_node_remarks(n)
+ local url = api.url("node_config", n[".name"])
+ auto_switch_tip = translatef("Current node: %s", string.format('%s', url, remarks)) .. "
"
+ end
end
end
end
@@ -76,7 +79,7 @@ end
---- Node
node = s:taboption("Main", ListValue, "node", "" .. translate("Node") .. "")
node:value("nil", translate("Close"))
-if auto_switch_flag == "" and auto_switch_tip then
+if not shunt_remark and auto_switch_tip then
node.description = auto_switch_tip
end
@@ -128,7 +131,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
o.write = function(self, section, value)
m:set(v.id, id, value)
end
- if auto_switch_flag == "default" and auto_switch_tip then
+ if shunt_remark == "default" and auto_switch_tip then
o.description = auto_switch_tip
end
@@ -145,7 +148,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then
o.write = function(self, section, value)
m:set(v.id, id, value)
end
- if auto_switch_flag == "main" and auto_switch_tip then
+ if shunt_remark == "main" and auto_switch_tip then
o.description = auto_switch_tip
end
end
diff --git a/ngrokc/Makefile b/ngrokc/Makefile
index f59fb735f..63c3d347c 100644
--- a/ngrokc/Makefile
+++ b/ngrokc/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ngrokc
PKG_VERSION:=1.55
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dosgo/ngrok-c.git
diff --git a/njitclient/Makefile b/njitclient/Makefile
index 087bac0f0..146b336d1 100644
--- a/njitclient/Makefile
+++ b/njitclient/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=njit8021xclient
PKG_BASE_VERSION:=2.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/bitdust/njit8021xclient.git
diff --git a/oscam/Makefile b/oscam/Makefile
index 1b258cdfc..6e850c32c 100644
--- a/oscam/Makefile
+++ b/oscam/Makefile
@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=oscam
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/nx111/oscam.git
diff --git a/quickjspp/Makefile b/quickjspp/Makefile
index a3aa76095..539a42ed6 100644
--- a/quickjspp/Makefile
+++ b/quickjspp/Makefile
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=quickjspp
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ftk/quickjspp.git
diff --git a/rapidjson/Makefile b/rapidjson/Makefile
index 2ba7dcee8..fcf4508ea 100644
--- a/rapidjson/Makefile
+++ b/rapidjson/Makefile
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rapidjson
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Tencent/rapidjson.git
diff --git a/subconverter/Makefile b/subconverter/Makefile
index 92adae5fa..9753e37f8 100644
--- a/subconverter/Makefile
+++ b/subconverter/Makefile
@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=subconverter
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/tindy2013/subconverter.git
diff --git a/toml11/Makefile b/toml11/Makefile
index b817b5d9b..50b6b8460 100644
--- a/toml11/Makefile
+++ b/toml11/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=toml11
PKG_VERSION:=3.7.1
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ToruNiina/toml11/tar.gz/v$(PKG_VERSION)?