mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-02-28 21:23:01 +00:00
Merge 4e6c537169 into 4a455aa532
This commit is contained in:
commit
d12877d23c
2 changed files with 14 additions and 4 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue