mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
优化不设置证书时的访问 URL协议头
1. 正确的协议显示 选择 y(设置证书)→ 显示 https:// 选择 n(跳过证书)→ 显示 http:// + 安全警告 2. 新增状态标记 添加了 SSL_CERT_CONFIGURED 全局变量来跟踪证书配置状态 SSL_CERT_CONFIGURED=1:证书已成功配置 SSL_CERT_CONFIGURED=0:未配置证书
This commit is contained in:
parent
9bac45cde7
commit
b5e67d39fc
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue