diff --git a/kai-agent/Makefile b/kai-agent/Makefile index d65ebbc30..744061696 100644 --- a/kai-agent/Makefile +++ b/kai-agent/Makefile @@ -1,8 +1,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kai-agent -PKG_VERSION:=0.0.25 -PKG_RELEASE:=3 +PKG_VERSION:=0.0.26 +PKG_RELEASE:=4 PKG_SOURCE:=kai-agent-bundle-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/istoreos/istoreos-app-hub/releases/download/kai-runtime-v$(PKG_VERSION)/ PKG_HASH:=skip diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index f8eac44b0..0c9ca159e 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=26.10.4 -PKG_RELEASE:=329 +PKG_RELEASE:=330 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua index a47f2ddaf..8748a9894 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua @@ -203,6 +203,18 @@ config_lines = { DNS_MODE == "socks" and string.format("proxy-server socks5://%s -name %s", REMOTE_PROXY_SERVER, proxy_server_name) or "" } if DNS_REDIRECT then + local hosts = {} + api.uci:foreach("dhcp", "host", function(s) + if datatypes.hostname(s.name or "") and datatypes.ip4addr(s.ip or "") then + hosts[#hosts + 1] = s.ip .. " " .. s.name + end + end) + + local hosts_file = FLAG_PATH .. "/dhcp-static-hosts" + if fs.writefile(hosts_file, table.concat(hosts, "\n") .. "\n") and #hosts > 0 then + table.insert(config_lines, string.format("hosts-file %q", hosts_file)) + end + -- SmartDNS monitors the lease file and updates local records without a restart. local lease_file = api.uci_get("dhcp", "@dnsmasq[0]", "leasefile") if not lease_file or lease_file == "" then lease_file = "/tmp/dhcp.leases" end