v1.4.0
sleep3r/mtproto.zigv1.4.0Jun 10, 2026by sleep3r
Upgrading?
AI Summary
Redesigns the dashboard to a 'Bahnhof Console' aesthetic and performs a comprehensive security and robustness audit remediation.
Key Highlights
- New 'Bahnhof Console' dashboard with CPU/Memory gauges and live logs
- Fixed HIGH severity RCE vulnerability in share-link parsing
- Fixed HIGH severity `tls_domain` clobbering
- Fixed HIGH severity failover teardown issue
- Hardened dashboard security (CSP, Origin checks)
New Features
- Dashboard redesign
- Security hardening (RCE, domain, failover fixes)
- Dashboard sandboxing improvements
Full Release Notes
 <details open> <summary>🇷🇺 Что нового (RU)</summary> ## Что добавляет этот релиз `v1.4.0` — про **внешний вид и прочность**: новый дизайн дашборда «Bahnhof Console» и полная аудит-ремедиация безопасности/надёжности по всему репозиторию. > [!NOTE] > Поведение прокси на проводе не меняется — обновление безопасно и **рекомендуется**: помимо редизайна (чисто визуального) релиз закрывает аудит из 96 находок, включая 3 уровня HIGH. Никаких изменений в конфиге/ссылках не требуется. ## Дашборд: редизайн «Bahnhof Console» Панель `mtbuddy setup dashboard` полностью перерисована в эстетике вокзального табло (departure-board): крупный hero-вердикт состояния (`Busy — N connected` / `Idle` / `Offline`), приборные гейджи **CPU/Memory** со спарклайнами, панель **сетевого трафика** (RX/TX + накопительные итоги), KPI-полоса (активные/максимум, handshakes, всего соединений, дропы), карточки **пользователей** (ссылки `tg://` / `t.me` + QR) и **маскировки** (FakeTLS, домен, nginx, health-таймер), плюс **живые логи** по WebSocket с фильтрами. Заодно починен оверфлоу счётчика при длинных именах пользователей. (#328) ## Полный аудит безопасности и надёжности (#331) Мультиагентный аудит всего репозитория: **94 из 96** находок исправлено (2 e2e-гэпа задокументированы). Самое важное: - **HIGH — RCE из share-ссылки:** поля `wireguard://` percent-декодировались в WG `.conf` без проверки — `%0A` позволял внедрить `PostUp = …`, который wg-quick исполняет от root. Теперь управляющие байты отвергаются. - **HIGH — затирание `tls_domain`:** `setup-masking` молча перезаписывал домен дефолтом и ломал все розданные ссылки; теперь сохраняет развёрнутый домен (смена — только явно), плюс откат nginx при ошибке `nginx -t` и reload прокси. - **HIGH — обрыв failover:** проверка fatal-hangup убивала только что поднятый retry/`middleproxy→direct`; событие на устаревшем fd теперь отбрасывается. - **Кластеры:** use-after-free на срезах TomlDoc, симлинк-LPE через предсказуемые файлы в `/tmp` под root, `secureZero` для ключей, корректный half-close без обрезания S2C/C2S под backpressure, привязка minisign-подписи к `tag+artifact` (anti-rollback), харденинг дашборда (Origin-проверка `/ws/logs`, CSP, секрет QR не в argv, sandbox systemd-юнита). - **Документация threat model:** добавлен раздел про **корреляцию SNI↔IP** (свежие fastDPI/ТСПУ) — заимствованный `tls_domain` палится пассивно, и это часть модели угроз, а не косметика. ## Проверено - `zig build test` — **246/246** + кросс-сборка `x86_64-linux`/`aarch64-linux` + `zig fmt` — зелёные. - **installer-e2e на 5 ОС** (debian 11/12, ubuntu 20.04/22.04/24.04): установка + апдейт (config неизменен) + failover туннель-пула + чистое удаление. - e2e-интеграция: FakeTLS/dd/desync/middleproxy-fallback/replay/SIGTERM-drain. </details> --- <details> <summary>🇬🇧 Release notes (EN)</summary> ## What this release adds `v1.4.0` is about **looks and resilience**: a new "Bahnhof Console" dashboard design plus a full-repo security/robustness audit remediation. > [!NOTE] > On-the-wire proxy behavior is unchanged — upgrading is safe and **recommended**: beyond the (purely visual) redesign, this release closes a 96-finding audit, including 3 HIGH-severity issues. No config or share-link changes are required. ## Dashboard: the "Bahnhof Console" redesign The `mtbuddy setup dashboard` panel was fully redrawn as a departure-board console: a large hero status verdict (`Busy — N connected` / `Idle` / `Offline`), **CPU/Memory** instrument gauges with sparklines, a **network throughput** panel (RX/TX + cumulative totals), a KPI band (active/max, handshakes, total connections, drops), **user** cards (`tg://` / `t.me` links + QR) and a **masking** card (FakeTLS, domain, nginx, health timer), plus **live logs** over WebSocket with filters. Also fixes a counter overflow with long user names. (#328) ## Full security & robustness audit remediation (#331) A multi-agent full-repo audit: **94 of 96** findings fixed (2 e2e gaps documented). Highlights: - **HIGH — RCE from a share-link:** `wireguard://` fields were percent-decoded into a WG `.conf` unchecked — `%0A` let an attacker inject `PostUp = …`, which wg-quick runs as root. Control bytes are now rejected. - **HIGH — `tls_domain` clobber:** `setup-masking` silently overwrote the domain with the default and broke every distributed link; it now keeps the deployed domain (change is explicit), rolls back the nginx vhost on `nginx -t` failure, and reloads the proxy. - **HIGH — failover teardown:** the fatal-hangup check killed a just-started retry / `middleproxy→direct` fallback; stale-fd events are now dropped. - **Clusters:** TomlDoc use-after-free slices, symlink-LPE via predictable `/tmp` files written as root, `secureZero` key wipes, a correct relay half-close that no longer truncates S2C/C2S under backpressure, minisign signature bound to `tag+artifact` (anti-rollback), dashboard hardening (`/ws/logs` Origin check, CSP, QR secret off argv, sandboxed systemd unit). - **Threat model docs:** a new section on **SNI↔IP correlation** (recent fastDPI/TSPU builds) — a borrowed `tls_domain` is detectable passively, and that's part of the threat model, not a cosmetic setting. ## Verified - `zig build test` — **246/246** + `x86_64-linux`/`aarch64-linux` cross-builds + `zig fmt` — green. - **installer-e2e across 5 OSes** (debian 11/12, ubuntu 20.04/22.04/24.04): install + update (config unchanged) + tunnel-pool failover + clean uninstall. - e2e integration: FakeTLS/dd/desync/middleproxy-fallback/replay/SIGTERM-drain. </details> ## Changelog * feat(dashboard): "Bahnhof Console" redesign + fix long-name counter overflow ([#328](https://github.com/sleep3r/mtproto.zig/pull/328)) * fix: remediate full-repo audit findings — security, robustness, tests ([#331](https://github.com/sleep3r/mtproto.zig/pull/331)) **Full diff:** https://github.com/sleep3r/mtproto.zig/compare/v1.3.0...v1.4.0
Related Repositories
lightpanda-io/browser★ 36,854
Lightpanda: the headless browser designed for AI and automation
tigerbeetle/tigerbeetle★ 17,229
The financial transactions database designed for mission critical safety and performance.
nullclaw/nullclaw★ 8,131
Fastest, smallest, and fully autonomous AI assistant infrastructure written in Zig
zml/zml★ 4,194
Any model. Any hardware. Zero compromise. Built with @ziglang / @openxla / MLIR / @bazelbuild
dmtrKovalenko/odiff★ 3,280
A very fast SIMD-first image comparison library (with nodejs API)