mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-04 05:47:19 +08:00
update 2026-01-08 00:36:29
This commit is contained in:
@@ -72,9 +72,11 @@ if has_xray or has_singbox then
|
||||
o.rmempty = false
|
||||
|
||||
if api.is_finded("geoview") then
|
||||
o = s:option(Flag, "geo2rule", translate("Generate Rule List from Geo"), translate("Generate rule lists such as GFW, China domains, and China IP ranges based on Geo files."))
|
||||
o = s:option(Flag, "geo2rule", translate("Generate Rule List from Geo"))
|
||||
o.default = 0
|
||||
o.rmempty = false
|
||||
o.description = translate("Generate rule lists such as GFW, China domains, and China IP ranges based on Geo files.") .. "<br><font color='red'>" ..
|
||||
translate("When manually updating with this option enabled, rules will be regenerated from existing Geo files even if no new version is available.") .. "</font>"
|
||||
|
||||
o = s:option(Flag, "enable_geoview", translate("Enable Geo Data Parsing"))
|
||||
o.default = 0
|
||||
|
||||
@@ -136,16 +136,16 @@ o = s:option(Flag, "autoswitch_restore_switch", translate("Restore Switch"), tra
|
||||
o:depends("enable_autoswitch", true)
|
||||
|
||||
o = s:option(Value, "autoswitch_probe_url", translate("Probe URL"), translate("The URL used to detect the connection status."))
|
||||
o.default = "https://www.google.com/generate_204"
|
||||
o:value("https://cp.cloudflare.com/", "Cloudflare")
|
||||
o:value("https://www.gstatic.com/generate_204", "Gstatic")
|
||||
o:value("https://www.google.com/generate_204", "Google")
|
||||
o:value("https://www.youtube.com/generate_204", "YouTube")
|
||||
o:value("https://connect.rom.miui.com/generate_204", "MIUI (CN)")
|
||||
o:value("https://connectivitycheck.platform.hicloud.com/generate_204", "HiCloud (CN)")
|
||||
o.default = o.keylist[3]
|
||||
o:depends("enable_autoswitch", true)
|
||||
|
||||
o = s:option(DummyValue, "btn", " ")
|
||||
o = s:option(DummyValue, "btn")
|
||||
o.template = appname .. "/socks_auto_switch/btn"
|
||||
o:depends("enable_autoswitch", true)
|
||||
|
||||
|
||||
@@ -19,9 +19,26 @@ local api = require "luci.passwall.api"
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>">
|
||||
<label class="cbi-value-title"></label>
|
||||
<div class="cbi-value-field">
|
||||
<style>
|
||||
.key-btn-div {
|
||||
display: table-cell;
|
||||
padding: 5px 0 5px;
|
||||
}
|
||||
@media screen and (max-width: 600px) {
|
||||
.key-btn-div {
|
||||
display: block;
|
||||
}
|
||||
.key-label {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.key-btn-div .cbi-button {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
</style>
|
||||
<div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>" data-index="<%=self.index%>" data-depends="<%=pcdata(self:deplist2json(section))%>">
|
||||
<label class="cbi-value-title key-label"> </label>
|
||||
<div class="key-btn-div">
|
||||
<input class="btn cbi-button cbi-button-add" type="button" onclick="add_node_by_key()" value="<%:Add nodes to the standby node list by keywords%>" />
|
||||
<input class="btn cbi-button cbi-button-remove" type="button" onclick="remove_node_by_key()" value="<%:Delete nodes in the standby node list by keywords%>" />
|
||||
</div>
|
||||
|
||||
@@ -1009,6 +1009,9 @@ msgstr "从 Geo 文件生成规则"
|
||||
msgid "Generate rule lists such as GFW, China domains, and China IP ranges based on Geo files."
|
||||
msgstr "根据 Geo 文件生成规则列表,包括 GFW、中国域名和中国 IP 段等。"
|
||||
|
||||
msgid "When manually updating with this option enabled, rules will be regenerated from existing Geo files even if no new version is available."
|
||||
msgstr "启用此选项后手动更新时,即使没有新版本也会从现有 Geo 文件重新生成规则。"
|
||||
|
||||
msgid "Enable Geo Data Parsing"
|
||||
msgstr "开启 Geo 数据解析"
|
||||
|
||||
|
||||
@@ -690,14 +690,25 @@ if geo2rule == "1" then
|
||||
remove_tmp_geofile("geosite")
|
||||
end
|
||||
|
||||
if geoip_update_ok then
|
||||
safe_call(fetch_chnroute, "生成chnroute发生错误...")
|
||||
safe_call(fetch_chnroute6, "生成chnroute6发生错误...")
|
||||
-- 如果是手动更新(arg2存在)始终生成规则
|
||||
local force_generate = (arg2 ~= nil)
|
||||
|
||||
if geoip_update_ok or force_generate then
|
||||
if fs.access(asset_location .. "geoip.dat") then
|
||||
safe_call(fetch_chnroute, "生成chnroute发生错误...")
|
||||
safe_call(fetch_chnroute6, "生成chnroute6发生错误...")
|
||||
else
|
||||
log("geoip.dat 文件不存在,跳过规则生成。")
|
||||
end
|
||||
end
|
||||
|
||||
if geosite_update_ok then
|
||||
safe_call(fetch_gfwlist, "生成gfwlist发生错误...")
|
||||
safe_call(fetch_chnlist, "生成chnlist发生错误...")
|
||||
if geosite_update_ok or force_generate then
|
||||
if fs.access(asset_location .. "geosite.dat") then
|
||||
safe_call(fetch_gfwlist, "生成gfwlist发生错误...")
|
||||
safe_call(fetch_chnlist, "生成chnlist发生错误...")
|
||||
else
|
||||
log("geosite.dat 文件不存在,跳过规则生成。")
|
||||
end
|
||||
end
|
||||
else
|
||||
if gfwlist_update == "1" then
|
||||
|
||||
@@ -1544,6 +1544,13 @@ start() {
|
||||
fi
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
check_server
|
||||
if command -v nft >/dev/null 2>&1; then
|
||||
local CURRENT_SERVER="$(uci_get_by_type global global_server nil)"
|
||||
if [ "$CURRENT_SERVER" != "nil" ]; then
|
||||
uci set shadowsocksr.@global[0].old_global_server="$CURRENT_SERVER"
|
||||
uci commit shadowsocksr
|
||||
fi
|
||||
fi
|
||||
start_server
|
||||
start_monitor
|
||||
clean_log
|
||||
@@ -1560,13 +1567,16 @@ boot() {
|
||||
stop() {
|
||||
unlock
|
||||
set_lock
|
||||
if command -v nft >/dev/null 2>&1; then
|
||||
/usr/bin/ssr-rules -K
|
||||
#local CLEANUP_PERSISTENCE="$(uci_get_by_type global global_server nil)"
|
||||
#if [ "$CLEANUP_PERSISTENCE" == "nil" ]; then
|
||||
# /usr/bin/ssr-rules -X
|
||||
#fi
|
||||
fi
|
||||
if command -v nft >/dev/null 2>&1; then
|
||||
/usr/bin/ssr-rules -K
|
||||
local OLD_SERVER="$(uci_get_by_type global old_global_server nil)"
|
||||
local NEW_SERVER="$(uci_get_by_type global global_server nil)"
|
||||
if [ "$OLD_SERVER" != "nil" ] && [ "$NEW_SERVER" != "nil" ] && [ "$OLD_SERVER" != "$NEW_SERVER" ]; then
|
||||
/usr/bin/ssr-rules -X
|
||||
fi
|
||||
uci delete shadowsocksr.@global[0].old_global_server 2>/dev/null
|
||||
uci commit shadowsocksr
|
||||
fi
|
||||
/usr/bin/ssr-rules -f
|
||||
local srulecount=0
|
||||
if command -v nft >/dev/null 2>&1; then
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=upx
|
||||
PKG_VERSION:=5.0.2
|
||||
PKG_VERSION:=5.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=209b219bbcfa58c249ffe6eba3c244e0910fa8be792b5521e4daf938167f05cc
|
||||
PKG_HASH:=9f7a810b8a810b1ca2c5cb01ffcf23066e3fb8a51ddc406ea05bdd5d37d0b8bd
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING LICENSE
|
||||
|
||||
Reference in New Issue
Block a user