Skip to content

v1.10.1

Latest

Choose a tag to compare

@sleep3r sleep3r released this 22 Jul 09:56
86b629b
🇷🇺 Что нового (RU)

Два точечных фикса mtbuddy

v1.10.1 чинит два неприятных сценария в управляющей утилите: вставку VPN/share-ссылок в интерактивные поля и запуск SYN-лимитера с --reject на системах, где iptables работает через nftables.

Ядро MTProto-прокси и сетевой протокол не менялись. Обновление безопасно и рекомендуется пользователям v1.10.0, которые настраивают tunnel/egress через интерактивный мастер или используют SYN-лимитер в режиме REJECT.

Вставка VPN/share-ссылок в TUI (#378)

Симптом: при вставке vpn://… или другой share-ссылки первый символ появлялся отдельно и не удалялся обычным Backspace. Остаток вставки мог потеряться; повторная вставка давала строку вроде vvpn://…, которую мастер отклонял как невалидную.

Причина: поле ввода считывало первый байт в raw mode, а затем возвращало терминал в canonical mode через TCSAFLUSH. При этом уже пришедший хвост вставки сбрасывался, а первый байт оставался в отдельном внутреннем буфере — вне обычного редактирования строки терминалом.

Фикс: весь ввод теперь остаётся в одном raw-mode буфере до Enter. Вставка принимается целиком, а Backspace удаляет и самый первый символ, и UTF-8-символы целиком. Поведение Esc/← в пустом поле и non-TTY ввода не изменилось.

SYN-лимитер с --reject на iptables-nft (#377)

Симптом: sudo mtbuddy setup syn-limit --preset hard --reject на iptables v1.8.x (nf_tables) падал с RULE_APPEND failed (Invalid argument), и mtproto-syn-limit.service не применял правило.

Причина: правило REJECT --reject-with tcp-reset внутри пользовательской цепочки не содержало собственного -p tcp. Backend iptables-nft проверяет target на самом правиле и не наследует TCP-match от правила, которое переходит в эту цепочку.

Фикс: в IPv4- и IPv6-hashlimit правила добавлен явный -p tcp. Режимы DROP и REJECT --reject-with tcp-reset теперь одинаково корректно применяются и через nftables-backed iptables, и через legacy backend; DROP остаётся дефолтом.

Проверено

  • zig build test, обычная и ReleaseFast сборки, Linux cross-build и профиль x86_64_v3+aes — зелёные.
  • Linux PTY: обычная вставка VPN-ссылки и сценарий «первый символ → Backspace → повторная вставка» возвращают точную исходную строку.
  • Ubuntu 24.04, iptables v1.8.10 (nf_tables): точный сгенерированный REJECT-скрипт применяется с rc=0.
  • CI, E2E, bench и install-матрица: Debian 11/12, Ubuntu 20.04/22.04/24.04 — зелёные.

🇬🇧 Release notes (EN)

Two focused mtbuddy fixes

v1.10.1 fixes two rough edges in the management CLI: pasting VPN/share links into interactive prompts and enabling the SYN limiter with --reject on systems where iptables uses the nftables backend.

The MTProto proxy core and wire protocol are unchanged. Upgrading is safe and recommended for v1.10.0 users who configure tunnel/egress through the interactive wizard or run the SYN limiter in REJECT mode.

Pasting VPN/share links in the TUI (#378)

Symptom: pasting a vpn://… or another share link inserted its first character separately, and normal Backspace could not remove it. The rest of the paste could be lost; pasting again produced a value such as vvpn://…, which the wizard rejected as invalid.

Cause: the prompt consumed its first byte in raw mode, then restored canonical mode with TCSAFLUSH. That discarded the already-pending tail of the paste while keeping the first byte in a separate internal seed buffer, outside normal terminal line editing.

Fix: prompt input now stays in one raw-mode buffer until Enter. A paste is consumed as a single editable value, and Backspace can remove both the first character and complete UTF-8 codepoints. Empty-prompt Esc/← navigation and non-TTY input keep their existing behavior.

SYN limiter --reject on iptables-nft (#377)

Symptom: sudo mtbuddy setup syn-limit --preset hard --reject failed on iptables v1.8.x (nf_tables) with RULE_APPEND failed (Invalid argument), leaving mtproto-syn-limit.service without an applied rule.

Cause: the REJECT --reject-with tcp-reset rule inside the user chain had no local -p tcp match. The iptables-nft backend validates the target on that rule itself and does not inherit the TCP match from the rule that jumps into the chain.

Fix: both IPv4 and IPv6 hashlimit rules now carry an explicit -p tcp. DROP and REJECT --reject-with tcp-reset apply correctly through both nftables-backed iptables and the legacy backend; DROP remains the default.

Verified

  • zig build test, regular and ReleaseFast builds, Linux cross-build, and the x86_64_v3+aes profile are green.
  • Linux PTY: a normal VPN-link paste and the “first byte → Backspace → paste again” path both return the exact original value.
  • Ubuntu 24.04 with iptables v1.8.10 (nf_tables): the exact generated REJECT script applies with rc=0.
  • CI, E2E, bench, and the install matrix are green on Debian 11/12 and Ubuntu 20.04/22.04/24.04.

Changelog

  • fix(ctl): preserve pasted input in TUI prompts (#378, #379)
  • fix(ctl): make SYN reject rules nft-compatible (#377, #379)

Full Changelog: v1.10.0...v1.10.1