From f87136cfab9cb441f9223879b1e3f5a1c3521d95 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 23:56:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B4=20Sync=202026-03-18=2023:56:09?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-nikki/Makefile | 4 ++-- luci-app-nikki/root/usr/share/rpcd/ucode/luci.nikki | 2 +- .../luasrc/model/cbi/passwall/client/type/sing-box.lua | 3 +++ luci-app-passwall/luasrc/passwall/util_sing-box.lua | 5 +++-- luci-app-passwall/po/zh-cn/passwall.po | 6 ++++++ nikki/Makefile | 2 +- nikki/files/nikki.init | 6 +++--- nikki/files/scripts/debug.sh | 2 +- nikki/files/ucode/include.uc | 2 +- 9 files changed, 21 insertions(+), 11 deletions(-) diff --git a/luci-app-nikki/Makefile b/luci-app-nikki/Makefile index 24a275d9..34fc839f 100644 --- a/luci-app-nikki/Makefile +++ b/luci-app-nikki/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.25.2 -PKG_RELEASE:=1 +PKG_VERSION:=1.25.3 +PKG_RELEASE:=2 LUCI_TITLE:=LuCI Support for nikki LUCI_DEPENDS:=+luci-base +nikki diff --git a/luci-app-nikki/root/usr/share/rpcd/ucode/luci.nikki b/luci-app-nikki/root/usr/share/rpcd/ucode/luci.nikki index 8362b4df..1aac65f0 100644 --- a/luci-app-nikki/root/usr/share/rpcd/ucode/luci.nikki +++ b/luci-app-nikki/root/usr/share/rpcd/ucode/luci.nikki @@ -41,7 +41,7 @@ const methods = { const tmpFilepath = '/var/run/nikki/profile.json'; if (access(filepath, 'r')) { writefile(tmpFilepath, defaults); - const command = `yq -p yaml -o json eval-all 'select(fi == 0) *? select(fi == 1)' ${tmpFilepath} ${filepath}`; + const command = `yq -M -p yaml -o json eval-all 'select(fi == 0) *? select(fi == 1)' ${tmpFilepath} ${filepath}`; const process = popen(command); if (process) { profile = json(process); diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua index 0523ae96..2ed5b8c8 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua @@ -461,6 +461,9 @@ o.validate = function(self, value) return value end +o = s:option(Value, _n("ech_query_server_name"), translate("ECH Query Domain"), translate("Overrides the domain name used for ECH HTTPS record queries.")) +o:depends({ [_n("ech")] = true }) + if singbox_tags:find("with_utls") then o = s:option(Flag, _n("utls"), translate("uTLS")) o.default = "0" diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 944b8ce9..51e4309a 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -177,7 +177,8 @@ function gen_outbound(flag, node, tag, proxy_table) record_fragment = record_fragment, ech = (node.ech == "1") and { enabled = true, - config = node.ech_config and split(node.ech_config:gsub("\\n", "\n"), "\n") or {} + config = node.ech_config and { node.ech_config } or nil, + query_server_name = node.ech_query_server_name } or nil, utls = (node.utls == "1" or node.reality == "1") and { enabled = true, @@ -536,7 +537,7 @@ function gen_config_server(node) if node.tls == "1" and node.ech == "1" then tls.ech = { enabled = true, - key = node.ech_key and split(node.ech_key:gsub("\\n", "\n"), "\n") or {} + key = node.ech_key and { node.ech_key } or nil } end diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po index fe63f394..b627d855 100644 --- a/luci-app-passwall/po/zh-cn/passwall.po +++ b/luci-app-passwall/po/zh-cn/passwall.po @@ -1840,6 +1840,12 @@ msgstr "ECH 查询策略" msgid "Controls the policy used when performing DNS queries for ECH configuration." msgstr "控制使用 DNS 查询 ECH 配置时的策略。" +msgid "ECH Query Domain" +msgstr "ECH 查询域名" + +msgid "Overrides the domain name used for ECH HTTPS record queries." +msgstr "覆盖用于 ECH HTTPS 记录查询的域名。" + msgid "Enable Multipath TCP, need to be enabled in both server and client configuration." msgstr "启用 Multipath TCP,需在服务端和客户端配置中同时启用。" diff --git a/nikki/Makefile b/nikki/Makefile index b4720134..4bc28daa 100644 --- a/nikki/Makefile +++ b/nikki/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nikki PKG_VERSION:=2026.03.10 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) diff --git a/nikki/files/nikki.init b/nikki/files/nikki.init index c8c1e454..5fe2fd4c 100644 --- a/nikki/files/nikki.init +++ b/nikki/files/nikki.init @@ -174,9 +174,9 @@ start_service() { yq -M -i 'del(.sniffer.sniff)' "$RUN_PROFILE_PATH" fi if [ "$mixin_file_content" = 0 ]; then - ucode -S "$MIXIN_UC" | yq -M -p json -o yaml | yq -M -i ea '... comments="" | . as $item ireduce ({}; . * $item ) | .proxies = .nikki-proxies + .proxies | del(.nikki-proxies) | .proxy-groups = .nikki-proxy-groups + .proxy-groups | del(.nikki-proxy-groups) | .rules = .nikki-rules + .rules | del(.nikki-rules)' "$RUN_PROFILE_PATH" - + ucode -S "$MIXIN_UC" | yq -M -p json -o yaml | yq -M -i eval-all '... comments="" | . as $item ireduce ({}; . * $item ) | .proxies = .nikki-proxies + .proxies | del(.nikki-proxies) | .proxy-groups = .nikki-proxy-groups + .proxy-groups | del(.nikki-proxy-groups) | .rules = .nikki-rules + .rules | del(.nikki-rules)' "$RUN_PROFILE_PATH" - elif [ "$mixin_file_content" = 1 ]; then - ucode -S "$MIXIN_UC" | yq -M -p json -o yaml | yq -M -i ea '... comments="" | . as $item ireduce ({}; . * $item ) | .proxies = .nikki-proxies + .proxies | del(.nikki-proxies) | .proxy-groups = .nikki-proxy-groups + .proxy-groups | del(.nikki-proxy-groups) | .rules = .nikki-rules + .rules | del(.nikki-rules)' "$RUN_PROFILE_PATH" "$MIXIN_FILE_PATH" - + ucode -S "$MIXIN_UC" | yq -M -p json -o yaml | yq -M -i eval-all '... comments="" | . as $item ireduce ({}; . * $item ) | .proxies = .nikki-proxies + .proxies | del(.nikki-proxies) | .proxy-groups = .nikki-proxy-groups + .proxy-groups | del(.nikki-proxy-groups) | .rules = .nikki-rules + .rules | del(.nikki-rules)' "$RUN_PROFILE_PATH" "$MIXIN_FILE_PATH" - fi if [ "$proxy_enabled" = 1 ]; then yq -M -i '(.tun) |= (.auto-route = false | .auto-redirect = false | .auto-detect-interface = false)' "$RUN_PROFILE_PATH" @@ -512,7 +512,7 @@ update_subscription() { if [ ! -f "$subscription_info_file" ] && grep -q -i "subscription-userinfo:" "$subscription_header_tmpfile"; then subscription_info_file="$subscription_header_tmpfile" fi - if yq -p yaml -o yaml -e 'has("proxies") or has("proxy-providers")' "$subscription_tmpfile" > /dev/null 2>&1; then + if yq -M -p yaml -o yaml -e 'has("proxies") or has("proxy-providers")' "$subscription_tmpfile" > /dev/null 2>&1; then log "Profile" "Subscription is valid." success=1 else diff --git a/nikki/files/scripts/debug.sh b/nikki/files/scripts/debug.sh index 2bcfebe6..72bd3a98 100644 --- a/nikki/files/scripts/debug.sh +++ b/nikki/files/scripts/debug.sh @@ -160,7 +160,7 @@ function desensitize_proxies(proxies) { function desensitize_profile() { let profile = {}; - const process = popen("yq -p yaml -o json /etc/nikki/run/config.yaml"); + const process = popen("yq -M -p yaml -o json /etc/nikki/run/config.yaml"); if (process) { profile = json(process); if (exists(profile, "secret")) { diff --git a/nikki/files/ucode/include.uc b/nikki/files/ucode/include.uc index 97f824f1..f100bed6 100644 --- a/nikki/files/ucode/include.uc +++ b/nikki/files/ucode/include.uc @@ -78,7 +78,7 @@ export function get_cgroups() { export function load_profile() { let result = {}; - const process = popen('yq -M -p yaml -o json /etc/nikki/run/config.yaml'); + const process = popen('yq -M -p yaml -o json /etc/nikki/run/config.yaml 2>/dev/null'); if (process) { result = json(process); process.close();