Skip to content

Commit

Permalink
update 2023-04-23 09:28:00
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 23, 2023
1 parent 949bdf5 commit d4e4d09
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 27 deletions.
2 changes: 1 addition & 1 deletion cpulimit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand Down
2 changes: 1 addition & 1 deletion jpcre2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand Down
2 changes: 1 addition & 1 deletion libcron/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion luci-app-passwall2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
35 changes: 19 additions & 16 deletions luci-app-passwall2/luasrc/model/cbi/passwall2/client/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,39 @@ 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('<a href="%s">%s</a>', url, remarks)) .. "<br />"
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('<a href="%s">%s</a>', url, remarks)) .. "<br />"
end
end
end
end

---- Node
node = s:taboption("Main", ListValue, "node", "<a style='color: red'>" .. translate("Node") .. "</a>")
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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ngrokc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion njitclient/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion oscam/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quickjspp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rapidjson/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subconverter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion toml11/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand Down

0 comments on commit d4e4d09

Please sign in to comment.