mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-01 16:44:45 +08:00
update 2026-10-18 16:29:22
This commit is contained in:
1 parent
e0041d08f8
commit
21a5be24ad
11 files changed
+36
-42
No files matched your search
+2
-2
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=honk
|
||||
PKG_VERSION:=2026.10.16
|
||||
PKG_VERSION:=2026.10.18
|
||||
PKG_RELEASE:=1
|
||||
|
||||
# Pinned honk-core revision (Glassyiris/honk feat/native-api), cross-compiled by
|
||||
# ci/build-core.sh. The per-architecture asset/hash are filled by that script;
|
||||
# keep a committed fallback so the feed still evaluates without a staging run.
|
||||
CORE_COMMIT:=995a80cd87e780a2a4d63b75008dca70876857b4
|
||||
CORE_COMMIT:=0e61ed382c6746773d11e78a9f81a8092aa33c62
|
||||
|
||||
-include $(CURDIR)/generated-stage.mk
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-honk
|
||||
PKG_VERSION:=2026.10.12
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2026.10.18
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
PKG_SOURCE:=doona-25fc26a7-43636deb8b48.tar.gz
|
||||
PKG_SOURCE:=doona-34657ab5-c73f88ec2d0e.tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/kenzok8/openwrt-honk/releases/download/staging
|
||||
PKG_SOURCE_SUBDIR:=doona
|
||||
PKG_HASH:=43636deb8b48c755dfada15ba0437364fff26a82aebe4f38c8bf2a8bf59d9954
|
||||
PKG_HASH:=c73f88ec2d0eefa3d2effed6260da8f1ce174f19fdfc286f4ec1f3fcb1205a1d
|
||||
|
||||
-include $(CURDIR)/generated-doona-stage.mk
|
||||
|
||||
|
||||
@@ -251,6 +251,7 @@ function get_redir_log()
|
||||
local path = api.TMP_PATH .. "/acl/" .. id
|
||||
|
||||
local function alert(msg)
|
||||
http.prepare_content("text/html; charset=utf-8")
|
||||
http.write(string.format("<script>alert('%s');window.close();</script>", i18n.translate(msg)))
|
||||
end
|
||||
|
||||
@@ -271,9 +272,8 @@ function get_redir_log()
|
||||
end
|
||||
|
||||
if fs.access(path .. "/" .. name .. ".log") then
|
||||
local content = luci.sys.exec("tail -n 5000 ".. path .. "/" .. name .. ".log")
|
||||
content = content:gsub("\n", "<br />")
|
||||
http.write(content)
|
||||
http.prepare_content("text/plain; charset=utf-8")
|
||||
http.write(luci.sys.exec("tail -n 5000 " .. util.shellquote(path)))
|
||||
else
|
||||
alert("Not enabled log")
|
||||
end
|
||||
@@ -283,10 +283,10 @@ function get_socks_log()
|
||||
local name = http.formvalue("name")
|
||||
local path = api.TMP_PATH .. "/" .. name .. ".log"
|
||||
if fs.access(path) then
|
||||
local content = luci.sys.exec("tail -n 5000 ".. path)
|
||||
content = content:gsub("\n", "<br />")
|
||||
http.write(content)
|
||||
http.prepare_content("text/plain; charset=utf-8")
|
||||
http.write(luci.sys.exec("tail -n 5000 " .. util.shellquote(path)))
|
||||
else
|
||||
http.prepare_content("text/html; charset=utf-8")
|
||||
http.write(string.format("<script>alert('%s');window.close();</script>", i18n.translate("Not enabled log")))
|
||||
end
|
||||
end
|
||||
@@ -306,21 +306,22 @@ function get_chinadns_log()
|
||||
end
|
||||
end
|
||||
if fs.access(path) then
|
||||
local content = luci.sys.exec("tail -n 5000 ".. path)
|
||||
content = content:gsub("\n", "<br />")
|
||||
http.write(content)
|
||||
http.prepare_content("text/plain; charset=utf-8")
|
||||
http.write(luci.sys.exec("tail -n 5000 " .. util.shellquote(path)))
|
||||
else
|
||||
http.prepare_content("text/html; charset=utf-8")
|
||||
http.write(string.format("<script>alert('%s');window.close();</script>", i18n.translate("Not enabled log")))
|
||||
end
|
||||
end
|
||||
|
||||
function get_smartdns_log()
|
||||
local path = api.TMP_PATH .. "/acl/default/smartdns.log"
|
||||
http.prepare_content("text/plain; charset=utf-8")
|
||||
if fs.access(path) then
|
||||
http.prepare_content("text/plain; charset=utf-8")
|
||||
http.write(luci.sys.exec("tail -n 5000 " .. util.shellquote(path)))
|
||||
else
|
||||
http.write(i18n.translate("Not enabled log"))
|
||||
http.prepare_content("text/html; charset=utf-8")
|
||||
http.write(string.format("<script>alert('%s');window.close();</script>", i18n.translate("Not enabled log")))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -270,10 +270,11 @@ end
|
||||
-- 计算字符串 MD5
|
||||
function md5_string(str)
|
||||
if type(str) ~= "string" then return "" end
|
||||
local quoted = "'" .. str:gsub("'", "'\\''") .. "'"
|
||||
local out = sys.exec("printf '%s' " .. quoted .. " | md5sum")
|
||||
if not out then return "" end
|
||||
return out:sub(1, 32)
|
||||
local path = trim(sys.exec("mktemp /tmp/md5.XXXXXX") or "")
|
||||
if path == "" then return "" end
|
||||
local md5 = fs.writefile(path, str) == #str and md5_file(path) or ""
|
||||
fs.unlink(path)
|
||||
return md5
|
||||
end
|
||||
|
||||
--提取URL中的域名和端口(no ip)
|
||||
|
||||
@@ -196,10 +196,9 @@ local sid = "@global[0]"
|
||||
}
|
||||
requestAnimationFrame(waitForDnsSelect);
|
||||
};
|
||||
waitForDnsSelect();
|
||||
|
||||
const initDnsSelect = (dns_select) => {
|
||||
if (dns_select.value === "chinadns-ng") {
|
||||
if (dns_select.value === "chinadns-ng" || dns_select.value === "smartdns") {
|
||||
addLogLink(dns_select);
|
||||
}
|
||||
if (dns_select._dnsLogBinded) return;
|
||||
@@ -210,7 +209,7 @@ local sid = "@global[0]"
|
||||
if (existingLogLink) {
|
||||
existingLogLink.remove();
|
||||
}
|
||||
if (dns_select.value === "chinadns-ng") {
|
||||
if (dns_select.value === "chinadns-ng" || dns_select.value === "smartdns") {
|
||||
addLogLink(dns_select);
|
||||
}
|
||||
});
|
||||
@@ -225,9 +224,12 @@ local sid = "@global[0]"
|
||||
logLink.href = "#";
|
||||
logLink.className = "dns-log-link";
|
||||
logLink.style.marginLeft = "10px";
|
||||
logLink.setAttribute("onclick", "window.open('" + '<%=api.url("get_chinadns_log")%>' + "?flag=default', '_blank')");
|
||||
const logUrl = select.value === "smartdns" ? '<%=api.url("get_smartdns_log")%>' : '<%=api.url("get_chinadns_log")%>?flag=default';
|
||||
logLink.setAttribute("onclick", "window.open('" + logUrl + "', '_blank')");
|
||||
select.insertAdjacentElement("afterend", logLink);
|
||||
};
|
||||
|
||||
waitForDnsSelect();
|
||||
})();
|
||||
|
||||
(function () {
|
||||
|
||||
@@ -196,10 +196,6 @@ if not is_file_nonzero(file_vpslist) then
|
||||
api.uci_foreach_c("nodes", function(t)
|
||||
process_address(t.address)
|
||||
process_address(t.download_address)
|
||||
local dns, _ = api.get_domain_port_from_url(t.domain_resolver_dns or t.domain_resolver_dns_https or "")
|
||||
if dns and dns ~= "" then
|
||||
process_address(dns)
|
||||
end
|
||||
end)
|
||||
f_out:close()
|
||||
end
|
||||
|
||||
@@ -334,7 +334,7 @@ function add_rule(var)
|
||||
end
|
||||
|
||||
local function get_dns_config_key()
|
||||
local address_md5 = api.md5_string(sys.exec([[uci show passwall | grep -E '\.(address|download_address|domain_resolver_dns|domain_resolver_dns_https)=' | cut -d "'" -f 2 | sort -u]]))
|
||||
local address_md5 = api.md5_string(sys.exec([[uci show passwall | grep -E '\.(address|download_address)=' | cut -d "'" -f 2 | sort -u]]))
|
||||
local new_rules = sys.exec([[
|
||||
for f in \
|
||||
/usr/share/passwall/rules/chnlist \
|
||||
@@ -462,10 +462,6 @@ function add_rule(var)
|
||||
api.uci_foreach_c("nodes", function(t)
|
||||
process_address(t.address)
|
||||
process_address(t.download_address)
|
||||
local dns, _ = api.get_domain_port_from_url(t.domain_resolver_dns or t.domain_resolver_dns_https or "")
|
||||
if dns and dns ~= "" then
|
||||
process_address(dns)
|
||||
end
|
||||
end)
|
||||
log(string.format(" - 节点列表中的域名(vpslist):%s", fwd_dns or "默认"))
|
||||
end
|
||||
|
||||
@@ -401,10 +401,6 @@ if not is_file_nonzero(file_vpslist) then
|
||||
api.uci_foreach_c("nodes", function(t)
|
||||
process_address(t.address)
|
||||
process_address(t.download_address)
|
||||
local dns, _ = api.get_domain_port_from_url(t.domain_resolver_dns or t.domain_resolver_dns_https or "")
|
||||
if dns and dns ~= "" then
|
||||
process_address(dns)
|
||||
end
|
||||
end)
|
||||
f_out:close()
|
||||
end
|
||||
@@ -418,6 +414,8 @@ if is_file_nonzero(file_vpslist) then
|
||||
"#6:" .. setflag .. "psw_vps6"
|
||||
}
|
||||
local domain_rules_str = string.format('domain-rules /domain-set:%s/ -nameserver direct', domain_set_name) .. DIRECT_RULE_OPTIONS
|
||||
-- 节点域名最多缓存 30 秒,到期后重新查询,避免继续返回过期的节点 IP。
|
||||
domain_rules_str = domain_rules_str .. " -rr-ttl-max 30 -no-serve-expired"
|
||||
domain_rules_str = domain_rules_str .. " " .. set_type .. " " .. table.concat(sets, ",")
|
||||
table.insert(tmp_lines, domain_rules_str)
|
||||
insert_array_after(config_lines, tmp_lines, "#--9")
|
||||
|
||||
@@ -767,7 +767,7 @@ filter_haproxy() {
|
||||
}
|
||||
|
||||
filter_vpsip() {
|
||||
local vps_addrs=$(uci show $CONFIG | grep -E "(\.address=|\.download_address=|\.domain_resolver_dns=|\.domain_resolver_dns_https=)" | cut -d "'" -f 2 | grep -Ev "$EXCLUDE_VPSIP")
|
||||
local vps_addrs=$(uci show $CONFIG | grep -E "(\.address=|\.download_address=)" | cut -d "'" -f 2 | grep -Ev "$EXCLUDE_VPSIP")
|
||||
local ipv4_addrs=$(echo "$vps_addrs" | grep -Eo "$IPv4_REGEX")
|
||||
[ -n "$ipv4_addrs" ] && {
|
||||
echo "$ipv4_addrs" | sed "s/^/add $IPSET_VPS /" | awk '1; END{print "COMMIT"}' | ipset -! -R
|
||||
|
||||
@@ -816,7 +816,7 @@ filter_vps_addr() {
|
||||
}
|
||||
|
||||
filter_vpsip() {
|
||||
local vps_addrs=$(uci show $CONFIG | grep -E "(\.address=|\.download_address=|\.domain_resolver_dns=|\.domain_resolver_dns_https=)" | cut -d "'" -f 2 | grep -Ev "$EXCLUDE_VPSIP")
|
||||
local vps_addrs=$(uci show $CONFIG | grep -E "(\.address=|\.download_address=)" | cut -d "'" -f 2 | grep -Ev "$EXCLUDE_VPSIP")
|
||||
local ipv4_addrs=$(echo "$vps_addrs" | grep -Eo "$IPv4_REGEX")
|
||||
[ -n "$ipv4_addrs" ] && {
|
||||
echo "$ipv4_addrs" | insert_nftset $NFTSET_VPS
|
||||
|
||||
@@ -21,13 +21,13 @@ define Download/geoip
|
||||
HASH:=4ff4b2ec242a9e87b296ba27ddb85f8311e8d3e071eaebac5be9231c60e408dd
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20261017145235
|
||||
GEOSITE_VER:=20261018000539
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=05e78f6ed840e7a7dd950fa91ea718e3d34874e169d54aa18d1ae21d48623de0
|
||||
HASH:=7b025cecebf71e2b9cd08e03120ba97a534600cfbb267aed309e3df6f8303dc5
|
||||
endef
|
||||
|
||||
GEOSITE_IRAN_VER:=202610120242
|
||||
|
||||
Reference in new issue
Block a user