diff --git a/gotelegram-bot/bot.py b/gotelegram-bot/bot.py
index 49a57fc..4e73940 100644
--- a/gotelegram-bot/bot.py
+++ b/gotelegram-bot/bot.py
@@ -499,12 +499,15 @@ async def get_status_text() -> str:
if "port" in config:
lines.append(f"Port: {html.escape(str(config['port']))}")
- # Telemt config
+ # Telemt config (v3: [server] port = ..., [censorship] tls_domain = ...)
telemt_cfg = load_toml(TELEMT_CONFIG)
if telemt_cfg:
- cfg = telemt_cfg.get("config", {})
- if "listen_port" in cfg:
- lines.append(f"Listen Port: {cfg['listen_port']}")
+ server_cfg = telemt_cfg.get("server", {})
+ if "port" in server_cfg:
+ lines.append(f"Listen Port: {server_cfg['port']}")
+ censor_cfg = telemt_cfg.get("censorship", {})
+ if "tls_domain" in censor_cfg:
+ lines.append(f"TLS Domain: {html.escape(str(censor_cfg['tls_domain']))}")
# Backups
backup_count = 0
@@ -946,14 +949,15 @@ async def get_proxy_link() -> Optional[str]:
if not config:
return None
- # Get secret from telemt TOML config
+ # Get secret from telemt TOML config (v3 format: [access.users] main = "...")
secret = config.get("secret", "")
if not secret:
telemt_cfg = load_toml(TELEMT_CONFIG)
if telemt_cfg:
- users = telemt_cfg.get("users", [])
- if isinstance(users, list) and users:
- secret = users[0].get("secret", "")
+ access = telemt_cfg.get("access", {})
+ users = access.get("users", {})
+ if isinstance(users, dict):
+ secret = users.get("main", "")
if not secret:
return None
diff --git a/install.sh b/install.sh
index bff3707..33a54c0 100755
--- a/install.sh
+++ b/install.sh
@@ -262,7 +262,7 @@ menu_install() {
echo -e " ${CYAN}2)${NC} ${MAGENTA}🛡 Pro${NC} — свой сайт + полная маскировка"
echo -e " ${DIM}nginx + SSL + HTML-шаблон + telemt.${NC}"
echo -e " ${DIM}DPI видит реальный сайт с реальным сертификатом.${NC}"
- echo -e " ${DIM}Требует: домен, направленный на этот сервер.{{NC}"
+ echo -e " ${DIM}Требует: домен, направленный на этот сервер.${NC}"
echo -e " ${DIM}$(printf '─%.0s' {1..55})${NC}"
echo -ne " ${WHITE}Выбор (1/2):${NC} "
read -r mode_choice
diff --git a/lib/telemt_config.sh b/lib/telemt_config.sh
index 1a4dd2e..01d3482 100755
--- a/lib/telemt_config.sh
+++ b/lib/telemt_config.sh
@@ -81,13 +81,17 @@ add_secret_to_config() {
return 1
fi
- # Добавляем новый блок [[users]]
- cat >> "$config" << EOSECRET
+ # telemt v3: добавляем ключ в секцию [access.users]
+ # Формат: name = "secret" под блоком [access.users]
+ if grep -q '\[access\.users\]' "$config"; then
+ sed -i "/\[access\.users\]/a ${name} = \"${secret}\"" "$config"
+ else
+ cat >> "$config" << EOSECRET
-[[users]]
- name = "${name}"
- secret = "${secret}"
+[access.users]
+${name} = "${secret}"
EOSECRET
+ fi
log_success "Добавлен секрет: $name"
}