add external SSL ( e.g., Nginx reverse proxy)

This commit is contained in:
夜法之书(appotry) 2026-02-06 13:06:07 +08:00 committed by GitHub
parent d8fb09faae
commit 06886ba765
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 4 deletions

View file

@ -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}"

View file

@ -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}"