github sleep3r/mtproto.zig v0.17.1

latest releases: v1.14.0, v1.13.0, v1.12.0...
4 months ago

🇷🇺 Что нового (RU)

Что решает этот релиз

• Дашборд показывал healthy: true при мёртвом VPN-туннеле — теперь корректно определяет нерабочие соединения.

Что изменено

Tunnel health check: добавлена проверка реального состояния WireGuard/AmneziaWG туннеля. Раньше дашборд считал туннель живым если endpoint был прописан в конфигурации (статическое значение). Теперь проверяется:

  • latest-handshake — был ли хотя бы один успешный хэндшейк
  • transfer rx — поступали ли данные через туннель
    Новое поле handshake_ok в API /api/statsrouting.primary_tunnel — показывает, прошёл ли хэндшейк с VPN-сервером.
    Понятная причина отказа: при недоступном VPN-сервере дашборд теперь возвращает reason: "endpoint configured, no handshake (VPN server unreachable)" вместо молчаливого healthy: true.
    Хелперы: _parse_transfer_bytes() для парсинга WG transfer (5.69 KiB → байты), _has_valid_handshake() для валидации хэндшейка.

Important

Если вы используете внешний мониторинг, проверяйте поле routing.healthy — теперь оно надёжно отражает реальное состояние upstream-туннеля.

До / После

Сценарий Было Стало
VPN мёртв, handshake=0, rx=0 healthy: truehealthy: false
VPN работает, handshake OK healthy: truehealthy: true
Интерфейс не поднят healthy: falsehealthy: false

🇬🇧 Release notes (EN)

What this release addresses

• The monitoring dashboard reported healthy tunnel status for dead VPN connections — the proxy appeared operational while unable to reach Telegram DCs.

What changed

Tunnel health check overhaul: the dashboard now verifies actual WireGuard tunnel liveness, not just static configuration. Previously, a configured endpoint was enough to report active: true even when the VPN server was completely unreachable.
Handshake validation: tunnels are only marked active when latest-handshake indicates a completed exchange (not 0 / none / idle).
Transfer verification: rx > 0 is checked to confirm data is actually flowing.
New handshake_ok field in tunnel status API — exposes handshake state to external monitors.
Clear failure reason: "endpoint configured, no handshake (VPN server unreachable)" instead of silent false-positive.

Important

If you poll the dashboard API for monitoring, the routing.healthy field now correctly reflects actual tunnel connectivity.

Before / After

Scenario Before After
Dead VPN, handshake=0, rx=0 healthy: truehealthy: false
Working VPN, handshake OK healthy: truehealthy: true
Interface down healthy: falsehealthy: false

Changelog

• fix(dashboard): detect dead tunnels as unhealthy (#180) (b6e6b8c)

Don't miss a new mtproto.zig release

NewReleases is sending notifications on new releases.