From f8de8aad676c67971a7e389ba4813af9eea7d27c Mon Sep 17 00:00:00 2001 From: hex2077 Date: Sat, 28 Feb 2026 00:23:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(config-api):=20=E6=B7=BB=E5=8A=A0=20TLS=20?= =?UTF-8?q?Sidecar=20=E9=85=8D=E7=BD=AE=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在配置更新处理中新增对 TLS_SIDECAR_ENABLED 和 TLS_SIDECAR_PORT 两个配置项的支持,使系统能够通过 API 动态管理 TLS Sidecar 的启用状态和端口设置。 --- src/ui-modules/config-api.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui-modules/config-api.js b/src/ui-modules/config-api.js index 8bfaf2d..d37750e 100644 --- a/src/ui-modules/config-api.js +++ b/src/ui-modules/config-api.js @@ -99,6 +99,10 @@ export async function handleUpdateConfig(req, res, currentConfig) { if (newConfig.PROXY_URL !== undefined) currentConfig.PROXY_URL = newConfig.PROXY_URL; if (newConfig.PROXY_ENABLED_PROVIDERS !== undefined) currentConfig.PROXY_ENABLED_PROVIDERS = newConfig.PROXY_ENABLED_PROVIDERS; + // TLS Sidecar settings + if (newConfig.TLS_SIDECAR_ENABLED !== undefined) currentConfig.TLS_SIDECAR_ENABLED = newConfig.TLS_SIDECAR_ENABLED; + if (newConfig.TLS_SIDECAR_PORT !== undefined) currentConfig.TLS_SIDECAR_PORT = newConfig.TLS_SIDECAR_PORT; + // Log settings if (newConfig.LOG_ENABLED !== undefined) currentConfig.LOG_ENABLED = newConfig.LOG_ENABLED; if (newConfig.LOG_OUTPUT_MODE !== undefined) currentConfig.LOG_OUTPUT_MODE = newConfig.LOG_OUTPUT_MODE; @@ -165,7 +169,9 @@ export async function handleUpdateConfig(req, res, currentConfig) { LOG_INCLUDE_REQUEST_ID: currentConfig.LOG_INCLUDE_REQUEST_ID, LOG_INCLUDE_TIMESTAMP: currentConfig.LOG_INCLUDE_TIMESTAMP, LOG_MAX_FILE_SIZE: currentConfig.LOG_MAX_FILE_SIZE, - LOG_MAX_FILES: currentConfig.LOG_MAX_FILES + LOG_MAX_FILES: currentConfig.LOG_MAX_FILES, + TLS_SIDECAR_ENABLED: currentConfig.TLS_SIDECAR_ENABLED, + TLS_SIDECAR_PORT: currentConfig.TLS_SIDECAR_PORT }; writeFileSync(configPath, JSON.stringify(configToSave, null, 2), 'utf-8');