From f4a868f723b9f26a7d5ede49ff98e196ea3df82d Mon Sep 17 00:00:00 2001 From: put-go Date: Fri, 8 May 2026 11:23:26 +0800 Subject: [PATCH 1/2] del --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 958de2a..cc5c3c2 100644 --- a/.env +++ b/.env @@ -2,10 +2,10 @@ export KERNEL_TYPE="mihomo" # 可选订阅(首次安装可留空) -export CLASH_SUBSCRIPTION_URL="https://sakuracat1203.xn--3iq226gfdb94q.com/api/v1/client/subscribe?token=df9fd8af2086471190a42435d354a3ec" +export CLASH_SUBSCRIPTION_URL="" # 控制器密钥(默认留空) -export CLASH_CONTROLLER_SECRET="f4962effeac0815d" +export CLASH_CONTROLLER_SECRET="" # 端口 export MIXED_PORT="7890" From e8e45986a862042379dfd14aa4199feb51290cf5 Mon Sep 17 00:00:00 2001 From: put-go Date: Fri, 8 May 2026 12:02:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B1=80=E5=9F=9F?= =?UTF-8?q?=E7=BD=91=E4=BB=A3=E7=90=86=E5=BC=80=E5=85=B3=E6=8C=81=E4=B9=85?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clashctl lan off 原本只更新 config/template.yaml,但运行配置生成流程会在规范化之后继续应用 runtime/mixin.yaml。 如果已有 mixin override 将 allow-lan 设为 true,最终生成的 runtime/config.yaml 会被重新覆盖为 true,导致 mihomo 仍监听局域网地址。 现在将同一个 allow-lan 值同步写入 runtime mixin override,确保 lan on/off 能保留到最终合并后的运行配置。 --- scripts/core/config.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/core/config.sh b/scripts/core/config.sh index b0d3e3e..372733e 100644 --- a/scripts/core/config.sh +++ b/scripts/core/config.sh @@ -394,6 +394,7 @@ config_allow_lan() { set_config_allow_lan() { local value="$1" local file="$CONFIG_DIR/template.yaml" + local mixin_file_path case "$value" in true|false) ;; @@ -404,6 +405,13 @@ set_config_allow_lan() { ALLOW_LAN_VALUE="$value" "$(yq_bin)" eval -i ' .["allow-lan"] = (env(ALLOW_LAN_VALUE) == "true") ' "$file" + + ensure_mixin_file + mixin_file_path="$(mixin_file)" + ALLOW_LAN_VALUE="$value" "$(yq_bin)" eval -i ' + .override = (.override // {}) | + .override["allow-lan"] = (env(ALLOW_LAN_VALUE) == "true") + ' "$mixin_file_path" } subscription_url_scheme() {