fix: stealth mode bind_to 127.0.0.1 + clarify internal port 8443 comments

telemt in stealth mode now binds to 127.0.0.1 instead of 0.0.0.0.
External port 8443 is not exposed - only nginx on 443 is public.
This commit is contained in:
anten-ka
2026-04-07 00:10:13 +03:00
parent 64da5de1ae
commit d6045ace0c
2 changed files with 12 additions and 4 deletions

View File

@@ -36,6 +36,11 @@ generate_telemt_toml() {
mkdir -p "$(dirname "$output")"
# В stealth-режиме telemt слушает только localhost (трафик идёт через nginx)
# В quick-режиме — на всех интерфейсах (клиенты подключаются напрямую)
local bind_addr="0.0.0.0"
[ "$mask_mode" = "stealth" ] && bind_addr="127.0.0.1"
cat > "$output" << EOTOML
# GoTelegram v${GOTELEGRAM_VERSION} — telemt configuration
# Сгенерировано: $(date -Iseconds)
@@ -52,7 +57,8 @@ generate_telemt_toml() {
# ── Привязка ─────────────────────────────────────────────────────────────────
[listen]
bind_to = "0.0.0.0:${port}"
# quick: 0.0.0.0 (клиенты напрямую) | stealth: 127.0.0.1 (только через nginx)
bind_to = "${bind_addr}:${port}"
# ── TLS маскировка ───────────────────────────────────────────────────────────
[security]