mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-19 15:36:03 +00:00
v2.3.0: Lite/Pro rebrand, submenu system, traffic stats, bot stats
This commit is contained in:
20
lib/website.sh
Normal file → Executable file
20
lib/website.sh
Normal file → Executable file
@@ -39,8 +39,8 @@ generate_nginx_config() {
|
||||
mkdir -p /etc/nginx/sites-available /etc/nginx/sites-enabled
|
||||
|
||||
cat > "$NGINX_SITE_CONF" << 'EONGINX'
|
||||
# GoTelegram v2.2 — nginx config
|
||||
# Stealth: nginx на 127.0.0.1:8443 (внутренний), telemt на 0.0.0.0:443 (внешний)
|
||||
# GoTelegram v2.3 — nginx config
|
||||
# Pro: nginx на 127.0.0.1:8443 (внутренний), telemt на 0.0.0.0:443 (внешний)
|
||||
# Обычный браузер → :443 → telemt → 127.0.0.1:8443 → nginx (сайт)
|
||||
|
||||
server {
|
||||
@@ -258,14 +258,14 @@ deploy_template_to_nginx() {
|
||||
log_success "Шаблон развёрнут в $WEBSITE_ROOT"
|
||||
}
|
||||
|
||||
# ── Полная установка stealth-режима ──────────────────────────────────────────
|
||||
setup_stealth_mode() {
|
||||
# ── Полная установка pro-режима ──────────────────────────────────────────────
|
||||
setup_pro_mode() {
|
||||
local domain="$1"
|
||||
local template_dir="$2"
|
||||
local proxy_port="${3:-443}"
|
||||
local email="${4:-}"
|
||||
|
||||
log_step "Настройка stealth-режима"
|
||||
log_step "Настройка pro-режима"
|
||||
|
||||
# 1. Устанавливаем nginx
|
||||
run_with_spinner "Установка nginx" install_nginx || return 1
|
||||
@@ -298,7 +298,7 @@ setup_stealth_mode() {
|
||||
# 8. Показываем благодарности авторам шаблонов
|
||||
show_credits
|
||||
|
||||
log_success "Stealth-режим настроен: https://${domain}"
|
||||
log_success "Pro-режим настроен: https://${domain}"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -322,13 +322,13 @@ restart_nginx() {
|
||||
fi
|
||||
}
|
||||
|
||||
# ── Удаление stealth-режима ──────────────────────────────────────────────────
|
||||
remove_stealth_mode() {
|
||||
log_info "Удаление stealth-режима..."
|
||||
# ── Удаление pro-режима ──────────────────────────────────────────────────────
|
||||
remove_pro_mode() {
|
||||
log_info "Удаление pro-режима..."
|
||||
rm -f "$NGINX_SITE_CONF" "$NGINX_SITE_LINK"
|
||||
rm -rf "$WEBSITE_ROOT"
|
||||
systemctl restart nginx 2>/dev/null
|
||||
log_success "Stealth-режим удалён (nginx оставлен)"
|
||||
log_success "Pro-режим удалён (nginx оставлен)"
|
||||
}
|
||||
|
||||
# ── Смена шаблона ────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user