diff --git a/install.sh b/install.sh index 852e128a..4091cf96 100644 --- a/install.sh +++ b/install.sh @@ -522,12 +522,13 @@ prompt_and_setup_ssl() { echo -e "${green}1.${plain} Let's Encrypt for Domain (90-day validity, auto-renews)" echo -e "${green}2.${plain} Let's Encrypt for IP Address (6-day validity, auto-renews)" echo -e "${green}3.${plain} Custom SSL Certificate (Path to existing files)" + echo -e "${green}4.${plain} External SSL (e.g., Nginx reverse proxy with your own certificate)" echo -e "${blue}Note:${plain} Options 1 & 2 require port 80 open. Option 3 requires manual paths." 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 +632,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..fe4e5658 100755 --- a/update.sh +++ b/update.sh @@ -542,12 +542,13 @@ prompt_and_setup_ssl() { echo -e "${green}1.${plain} Let's Encrypt for Domain (90-day validity, auto-renews)" echo -e "${green}2.${plain} Let's Encrypt for IP Address (6-day validity, auto-renews)" echo -e "${green}3.${plain} Custom SSL Certificate (Path to existing files)" + echo -e "${green}3.${plain} External SSL (e.g., Nginx reverse proxy with your own certificate)" echo -e "${blue}Note:${plain} Options 1 & 2 require port 80 open. Option 3 requires manual paths." 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 +660,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}"