From 37e054624ef8f03c6d8b36d0c664e94b6c513dd9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 May 2026 20:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Sync=202026-05-22=2020:51:20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-kai/Makefile | 10 ++-- luci-app-kai/luasrc/model/cbi/kai.lua | 25 +++++++-- luci-app-kai/luasrc/model/kai.lua | 54 +++++++++++++++++++ luci-app-kai/luasrc/view/kai/kai_status.htm | 2 +- luci-app-passwall2/Makefile | 2 +- .../root/usr/share/passwall2/subscribe.lua | 5 ++ luci-nginxer/Makefile | 8 +-- .../root/etc/uci-defaults/50_luci-nginxer | 6 ++- modeminfo/Makefile | 2 +- modeminfo/root/usr/share/modeminfo/modeminfo | 2 +- torrserver/Makefile | 6 +-- 11 files changed, 102 insertions(+), 20 deletions(-) create mode 100644 luci-app-kai/luasrc/model/kai.lua diff --git a/luci-app-kai/Makefile b/luci-app-kai/Makefile index b98b2e1d..10151863 100755 --- a/luci-app-kai/Makefile +++ b/luci-app-kai/Makefile @@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=kai -PKG_VERSION:=1.0.0 -PKG_RELEASE:=6 -LUCI_DEPENDS:=+kai +kai_session +PKG_VERSION:=1.0.1 +PKG_RELEASE:=7 +LUCI_DEPENDS:=+kai +kai_session +luci-compat LUCI_MINIFY_CSS:=0 LUCI_MINIFY_JS:=0 @@ -17,7 +17,7 @@ define Package/luci-app-kai/conffiles /etc/config/kai endef -define Package/luci-nginxer/postrm +define Package/luci-app-kai/postrm #!/bin/sh rm -f /tmp/luci-indexcache exit 0 @@ -25,4 +25,4 @@ endef include $(TOPDIR)/feeds/luci/luci.mk -# call BuildPackage - OpenWrt buildroot signature \ No newline at end of file +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-kai/luasrc/model/cbi/kai.lua b/luci-app-kai/luasrc/model/cbi/kai.lua index 997cd678..8c8fb48a 100644 --- a/luci-app-kai/luasrc/model/cbi/kai.lua +++ b/luci-app-kai/luasrc/model/cbi/kai.lua @@ -1,6 +1,6 @@ local m, s -m = Map("kai", translate("KAI"), translate("KAI is an efficient data transfer tool.")) +m = Map("kai", translate("KAI"), translate("KAI is an efficient AI tool.")) m:section(SimpleSection).template = "kai/kai_status" s=m:section(TypedSection, "kai", translate("Global settings")) @@ -8,6 +8,25 @@ s.addremove=false s.anonymous=true s:option(Flag, "enabled", translate("Enable")).rmempty=false + +local kai_model = require "luci.model.kai" +local blocks = kai_model.blocks() +local home = kai_model.home() + +local data_dir = s:option(Value, "data_dir", translate("Data directory")) +data_dir.rmempty = false +data_dir.description = translate("Required. KAI session will store cwd/cache/data/config/state under this directory (subfolders: cwd, cache, data, config, state).") + +local paths, default_path = kai_model.find_paths(blocks, home, "Configs") +for _, val in pairs(paths) do + data_dir:value(val, val) +end +data_dir.default = default_path + +local port = s:option(Value, "port", translate("API port")) +port.default = "8197" +port.rmempty = false +port.datatype = "port" +port.description = translate("Port for KAI HTTP server (kai_bin). kai_session will read OPENCODE_CONFIG via 127.0.0.1:.") + return m - - diff --git a/luci-app-kai/luasrc/model/kai.lua b/luci-app-kai/luasrc/model/kai.lua new file mode 100644 index 00000000..b4ef8499 --- /dev/null +++ b/luci-app-kai/luasrc/model/kai.lua @@ -0,0 +1,54 @@ +local jsonc = require "luci.jsonc" + +local kai = {} + +kai.blocks = function() + local f = io.popen("lsblk -s -f -b -o NAME,FSSIZE,MOUNTPOINT --json", "r") + local vals = {} + if f then + local ret = f:read("*all") + f:close() + local obj = jsonc.parse(ret) + for _, val in pairs(obj and obj["blockdevices"] or {}) do + local fsize = val["fssize"] + if fsize ~= nil and string.len(fsize) > 10 and val["mountpoint"] then + vals[#vals + 1] = val["mountpoint"] + end + end + end + return vals +end + +kai.home = function() + local uci = require "luci.model.uci".cursor() + local home_dirs = {} + home_dirs["main_dir"] = uci:get_first("quickstart", "main", "main_dir", "/root") + home_dirs["Configs"] = uci:get_first("quickstart", "main", "conf_dir", home_dirs["main_dir"] .. "/Configs") + home_dirs["Public"] = uci:get_first("quickstart", "main", "pub_dir", home_dirs["main_dir"] .. "/Public") + home_dirs["Downloads"] = uci:get_first("quickstart", "main", "dl_dir", home_dirs["Public"] .. "/Downloads") + home_dirs["Caches"] = uci:get_first("quickstart", "main", "tmp_dir", home_dirs["main_dir"] .. "/Caches") + return home_dirs +end + +kai.find_paths = function(blocks, home_dirs, path_name) + local default_path = "" + local paths = {} + + default_path = home_dirs[path_name] .. "/KAI" + if #blocks == 0 then + table.insert(paths, default_path) + else + for _, val in pairs(blocks) do + table.insert(paths, val .. "/" .. path_name .. "/KAI") + end + local without_conf_dir = "/root/" .. path_name .. "/KAI" + if default_path == without_conf_dir then + default_path = paths[1] + end + end + + return paths, default_path +end + +return kai + diff --git a/luci-app-kai/luasrc/view/kai/kai_status.htm b/luci-app-kai/luasrc/view/kai/kai_status.htm index f2f50aab..be616836 100644 --- a/luci-app-kai/luasrc/view/kai/kai_status.htm +++ b/luci-app-kai/luasrc/view/kai/kai_status.htm @@ -14,7 +14,7 @@ XHR.poll(5, '<%=url("admin/services/kai_status")%>', null,function(x, st){ //]]>
- 状态 + <%:Status%>

<%:Collecting data...%>

diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 539fbfe9..cf4b012f 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 PKG_VERSION:=26.5.19 -PKG_RELEASE:=45 +PKG_RELEASE:=46 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua b/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua index a1dd677b..c374fb43 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua +++ b/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua @@ -664,6 +664,11 @@ local function parseClashNode(node, add_mode, group, sub_cfg) result.tls_allowInsecure = "1" end end + if node.tls and node["reality-opts"] and node["reality-opts"]["public-key"] then + result.reality = "1" + result.reality_publicKey = (node["reality-opts"] and node["reality-opts"]["public-key"]) or nil + result.reality_shortId = (node["reality-opts"] and node["reality-opts"]["short-id"]) or nil + end result.transport = node.network and string.lower(node.network) or "tcp" if result.type == "sing-box" and result.transport == "raw" then result.transport = "tcp" diff --git a/luci-nginxer/Makefile b/luci-nginxer/Makefile index 71d3eb76..67b99b16 100644 --- a/luci-nginxer/Makefile +++ b/luci-nginxer/Makefile @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Nginxer LUCI_DESCRIPTION:=Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme -PKG_VERSION:=0.0.1 -PKG_RELEASE:=4 +PKG_VERSION:=0.0.2 +PKG_RELEASE:=5 LUCI_DEPENDS:=+luci-nginx define Package/luci-nginxer/postrm #!/bin/sh -/etc/init.d/uhttpd enabled +/etc/init.d/uhttpd enable /etc/init.d/uhttpd start exit 0 endef include $(TOPDIR)/feeds/luci/luci.mk -# call BuildPackage - OpenWrt buildroot signature \ No newline at end of file +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-nginxer/root/etc/uci-defaults/50_luci-nginxer b/luci-nginxer/root/etc/uci-defaults/50_luci-nginxer index 9d01f398..18e28cfd 100644 --- a/luci-nginxer/root/etc/uci-defaults/50_luci-nginxer +++ b/luci-nginxer/root/etc/uci-defaults/50_luci-nginxer @@ -8,7 +8,11 @@ if [ "$nginxer" != 1 ]; then uci set nginx._redirect2ssl.access_log='off; # logd openwrt' uci set nginx.global.nginxer='1' uci commit nginx + + # fix firmware upload failed + sed -i 's/client_max_body_size 128M;/client_max_body_size 256M;/g' /etc/nginx/uci.conf.template + # /etc/init.d/uhttpd running || /etc/init.d/uhttpd disable /etc/init.d/nginx reload fi -exit 0 \ No newline at end of file +exit 0 diff --git a/modeminfo/Makefile b/modeminfo/Makefile index 3eaeca19..3bcf5c4f 100644 --- a/modeminfo/Makefile +++ b/modeminfo/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=modeminfo PKG_VERSION:=0.4.6 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_MAINTAINER:=Konstantine Shevlakov include $(INCLUDE_DIR)/package.mk diff --git a/modeminfo/root/usr/share/modeminfo/modeminfo b/modeminfo/root/usr/share/modeminfo/modeminfo index 415be2aa..332aff75 100755 --- a/modeminfo/root/usr/share/modeminfo/modeminfo +++ b/modeminfo/root/usr/share/modeminfo/modeminfo @@ -62,7 +62,7 @@ function if_null() { qmi_device(){ - [ -n "$qmi_mode" ] || SCRIPT=/usr/share/modeminfo/scripts/modeminfo + [ "$qmi_mode" = "1" ] || SCRIPT=/usr/share/modeminfo/scripts/modeminfo [ -r $SCRIPT ] && { . $SCRIPT } || { diff --git a/torrserver/Makefile b/torrserver/Makefile index 594f2402..c855afb6 100644 --- a/torrserver/Makefile +++ b/torrserver/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=torrserver -PKG_VERSION:=MatriX.141 -PKG_RELEASE:=1 +PKG_VERSION:=MatriX.141.1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/YouROK/TorrServer.git -PKG_SOURCE_VERSION:=d266990face0a530880a19a3e39666d21931aed9 +PKG_SOURCE_VERSION:=49cef22fc02c501d844cfebe7a7c00ad0c6758f2 PKG_MIRROR_HASH:=skip PKG_MAINTAINER:=Konstantine Shevlakov