mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-19 14:36:05 +00:00
v2.5.0: maintenance and bot user management
This commit is contained in:
24
install.sh
24
install.sh
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
# GoTelegram v2.4.0 — MTProxy powered by telemt (Rust + Tokio)
|
||||
# GoTelegram v2.5.0 — MTProxy powered by telemt (Rust + Tokio)
|
||||
# Anti-DPI • Fake TLS • TCP Splice • JA3/JA4 Resistance • i18n (EN/RU)
|
||||
#
|
||||
# Install:
|
||||
@@ -294,6 +294,9 @@ install_lite_mode() {
|
||||
local port
|
||||
port=$(select_port)
|
||||
[ $? -ne 0 ] && return
|
||||
if [ "$port" = "443" ]; then
|
||||
warn_3xui_443_conflict || true
|
||||
fi
|
||||
|
||||
# Generate secret
|
||||
local secret
|
||||
@@ -342,6 +345,8 @@ install_lite_mode() {
|
||||
install_pro_mode() {
|
||||
log_step "$(t install_pro_step)"
|
||||
|
||||
warn_3xui_443_conflict || true
|
||||
|
||||
# Enter domain
|
||||
echo ""
|
||||
echo -ne " ${WHITE}$(t install_enter_domain)${NC} "
|
||||
@@ -536,6 +541,21 @@ menu_logs() {
|
||||
}
|
||||
|
||||
# ── Change mode / template ──────────────────────────────────────────────────
|
||||
update_current_template_id() {
|
||||
local template_dir="$1"
|
||||
local tpl_id
|
||||
tpl_id=$(basename "$template_dir")
|
||||
[ -z "$tpl_id" ] && return 0
|
||||
|
||||
if [ -f "$template_dir/.custom_git_source" ]; then
|
||||
local source_url
|
||||
source_url=$(head -1 "$template_dir/.custom_git_source" 2>/dev/null || echo "")
|
||||
bot_update_config_field "template_source" "$source_url" || true
|
||||
fi
|
||||
bot_update_config_field "template_id" "$tpl_id" || \
|
||||
log_warning "Не удалось обновить template_id в config.json"
|
||||
}
|
||||
|
||||
menu_change_mode() {
|
||||
local current_mode
|
||||
current_mode=$(config_get mode 2>/dev/null)
|
||||
@@ -558,6 +578,7 @@ menu_change_mode() {
|
||||
template_dir=$(interactive_template_selection)
|
||||
[ $? -ne 0 ] && return
|
||||
switch_template "$template_dir"
|
||||
update_current_template_id "$template_dir"
|
||||
;;
|
||||
2)
|
||||
log_warning "$(t change_requires_reinstall)"
|
||||
@@ -601,6 +622,7 @@ menu_website() {
|
||||
template_dir=$(interactive_template_selection)
|
||||
[ $? -ne 0 ] && return
|
||||
switch_template "$template_dir"
|
||||
update_current_template_id "$template_dir"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user