From 06886ba765f1c84f82a89798b692ffab13bccd60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E6=B3=95=E4=B9=8B=E4=B9=A6=28appotry=29?= Date: Fri, 6 Feb 2026 13:06:07 +0800 Subject: [PATCH] add external SSL ( e.g., Nginx reverse proxy) --- install.sh | 8 ++++++-- update.sh | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 852e128a..fe2ecd96 100644 --- a/install.sh +++ b/install.sh @@ -526,8 +526,8 @@ prompt_and_setup_ssl() { read -rp "Choose an option (default 2 for IP): " ssl_choice ssl_choice="${ssl_choice// /}" # Trim whitespace - # Default to 2 (IP cert) if input is empty or invalid (not 1 or 3) - if [[ "$ssl_choice" != "1" && "$ssl_choice" != "3" ]]; then + # Default to 2 (IP cert) if input is empty or invalid (not 1 3 or 4) + if [[ "$ssl_choice" != "1" && "$ssl_choice" != "3" && "$ssl_choice" != "4"]]; then ssl_choice="2" fi @@ -631,6 +631,10 @@ prompt_and_setup_ssl() { systemctl restart x-ui >/dev/null 2>&1 || rc-service x-ui restart >/dev/null 2>&1 ;; + 4) + # User chose external SSL option + echo -e "${green}Using external SSL (e.g., Nginx reverse proxy)...${plain}" + ;; *) echo -e "${red}Invalid option. Skipping SSL setup.${plain}" SSL_HOST="${server_ip}" diff --git a/update.sh b/update.sh index 0c4bb725..2d2fc92e 100755 --- a/update.sh +++ b/update.sh @@ -546,8 +546,8 @@ prompt_and_setup_ssl() { read -rp "Choose an option (default 2 for IP): " ssl_choice ssl_choice="${ssl_choice// /}" # Trim whitespace - # Default to 2 (IP cert) if input is empty or invalid (not 1 or 3) - if [[ "$ssl_choice" != "1" && "$ssl_choice" != "3" ]]; then + # Default to 2 (IP cert) if input is empty or invalid (not 1 3 or 4) + if [[ "$ssl_choice" != "1" && "$ssl_choice" != "3" && "$ssl_choice" != "4"]]; then ssl_choice="2" fi @@ -659,6 +659,10 @@ prompt_and_setup_ssl() { systemctl restart x-ui >/dev/null 2>&1 || rc-service x-ui restart >/dev/null 2>&1 ;; + 4) + # User chose external SSL option + echo -e "${green}Using external SSL (e.g., Nginx reverse proxy)...${plain}" + ;; *) echo -e "${red}Invalid option. Skipping SSL setup.${plain}" SSL_HOST="${server_ip}"