From b5e67d39fc22934acaa2a084ec4542b4e4f2c342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=88=E5=A4=B1=E7=9A=84=E6=98=9F=E7=90=83?= <32975050+xsdxq-null@users.noreply.github.com> Date: Sat, 16 May 2026 12:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8D=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=AF=81=E4=B9=A6=E6=97=B6=E7=9A=84=E8=AE=BF=E9=97=AE=20URL?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 正确的协议显示 选择 y(设置证书)→ 显示 https:// 选择 n(跳过证书)→ 显示 http:// + 安全警告 2. 新增状态标记 添加了 SSL_CERT_CONFIGURED 全局变量来跟踪证书配置状态 SSL_CERT_CONFIGURED=1:证书已成功配置 SSL_CERT_CONFIGURED=0:未配置证书 --- install_zh_cn.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_zh_cn.sh b/install_zh_cn.sh index 452bd2e2..ef3c0b49 100644 --- a/install_zh_cn.sh +++ b/install_zh_cn.sh @@ -514,11 +514,17 @@ ssl_cert_issue() { echo -e "${green}访问 URL:https://${domain}:${existing_port}/${existing_webBasePath}${plain}" echo -e "${yellow}面板将重启以应用 SSL 证书...${plain}" systemctl restart x-ui 2> /dev/null || rc-service x-ui restart 2> /dev/null + # 标记证书已成功配置 + SSL_CERT_CONFIGURED=1 else echo -e "${red}错误:未找到域名 $domain 的证书或私钥文件。${plain}" + SSL_CERT_CONFIGURED=0 fi else echo -e "${yellow}跳过面板路径设置。${plain}" + echo -e "${yellow}注意:面板将通过 HTTP 提供服务(不安全)。${plain}" + echo -e "${green}访问 URL:http://${domain}:${existing_port}/${existing_webBasePath}${plain}" + SSL_CERT_CONFIGURED=0 fi return 0