v0.21.3

sleep3r/mtproto.zigv0.21.3May 5, 2026by sleep3r

Upgrading?

AI Summary

Patch release fixing Debian 12 installer failures by adding missing build dependencies and ensuring system user/group creation is deterministic.

Key Highlights

  • Added explicit `libnfnetlink-dev` dependency for nfqws
  • Installer now creates the system group `mtproto`
  • Build output is no longer hidden to aid debugging
  • Service startup failures are now clearly reported

Full Release Notes

<details open>
<summary>🇷🇺 Что нового (RU)</summary>

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

`v0.21.3` - patch-релиз для installer/control-plane, который закрывает проблему из [#236](https://github.com/sleep3r/mtproto.zig/issues/236).

На Debian 12 установка через `mtbuddy --interactive` могла падать на шаге:

```text
✖ nfqws build failed
```

А после ручной установки `nfqws` сервис `mtproto-proxy` мог уходить в restart loop с:

```text
status=217/USER
Failed at step USER spawning /opt/mtproto-proxy/mtproto-proxy
```

Причин было две:

- текущий upstream `zapret/nfq` линкуется с `-lnfnetlink`, а installer не ставил явный пакет `libnfnetlink-dev`;
- systemd unit использует `User=mtproto` и `Group=mtproto`, но installer создавал только пользователя и не гарантировал наличие одноимённой system group.

В `v0.21.3` `mtbuddy install` стал строже и понятнее: нужная dependency ставится явно, вывод сборки `zapret/nfq` больше не скрывается, а service user/group создаются детерминированно.

> [!NOTE]
> Изменений в `config.toml` не требуется.

> [!TIP]
> Если нужен быстрый bare install без OS-level TCP desync, можно использовать `sudo mtbuddy install --no-nfqws ...` или `--no-dpi`. Но для обычной установки с `nfqws` этот релиз должен закрыть проблему на Debian 12.

## Что изменено

### Installer: фикс сборки nfqws ([#237](https://github.com/sleep3r/mtproto.zig/pull/237))

- В список build dependencies добавлен `libnfnetlink-dev`, который нужен `zapret/nfq` для `-lnfnetlink`.
- `git clone` и `make` для `zapret/nfq` больше не глушат stderr/stdout.
- При ошибке сборки `mtbuddy` теперь показывает хвост вывода команды, а не только общую строку `nfqws build failed`.
- После сборки дополнительно проверяется наличие `/opt/zapret/nfq/nfqws`.

### Installer: фикс systemd `status=217/USER` ([#237](https://github.com/sleep3r/mtproto.zig/pull/237))

- Installer явно создаёт system group `mtproto`.
- Service user теперь создаётся с `--gid mtproto` и home `/opt/mtproto-proxy`.
- `chown`, `systemctl daemon-reload`, `systemctl enable` и `systemctl restart` стали strict-шагами: install больше не печатает ложный success, если сервис не стартовал.
- При ошибке старта `mtbuddy` печатает `systemctl status mtproto-proxy --no-pager -l`.

## Проверено

- `make test`
- `zig build -Dtarget=x86_64-linux -Doptimize=ReleaseFast`
- Debian 12 container: установка dependencies + сборка `zapret/nfq` завершилась `nfqws-ok`

</details>

---

<details>
<summary>🇬🇧 Release notes (EN)</summary>

## What this release addresses

`v0.21.3` is an installer/control-plane patch release that fixes [#236](https://github.com/sleep3r/mtproto.zig/issues/236).

On Debian 12, installing through `mtbuddy --interactive` could fail at:

```text
✖ nfqws build failed
```

After manually installing `nfqws`, `mtproto-proxy` could then enter a restart loop with:

```text
status=217/USER
Failed at step USER spawning /opt/mtproto-proxy/mtproto-proxy
```

There were two root causes:

- current upstream `zapret/nfq` links with `-lnfnetlink`, but the installer did not explicitly install `libnfnetlink-dev`;
- the systemd unit uses `User=mtproto` and `Group=mtproto`, while the installer only created the user and did not guarantee the matching system group.

`v0.21.3` makes `mtbuddy install` stricter and more diagnosable: the missing dependency is installed explicitly, `zapret/nfq` build output is no longer hidden, and service user/group creation is deterministic.

> [!NOTE]
> No `config.toml` changes are required.

> [!TIP]
> For a quick bare install without OS-level TCP desync, use `sudo mtbuddy install --no-nfqws ...` or `--no-dpi`. For the normal `nfqws` path, this release should fix the Debian 12 installer failure.

## What changed

### Installer: nfqws build fix ([#237](https://github.com/sleep3r/mtproto.zig/pull/237))

- Added the explicit `libnfnetlink-dev` build dependency required by `zapret/nfq` for `-lnfnetlink`.
- `git clone` and `make` for `zapret/nfq` no longer suppress stderr/stdout.
- On build failure, `mtbuddy` now prints the tail of command output instead of only `nfqws build failed`.
- The installer now verifies that `/opt/zapret/nfq/nfqws` exists after the build.

### Installer: systemd `status=217/USER` fix ([#237](https://github.com/sleep3r/mtproto.zig/pull/237))

- The installer now explicitly creates the `mtproto` system group.
- The service user is created with `--gid mtproto` and home `/opt/mtproto-proxy`.
- `chown`, `systemctl daemon-reload`, `systemctl enable`, and `systemctl restart` are now strict steps: install no longer prints a false success when the service fails.
- On service startup failure, `mtbuddy` prints `systemctl status mtproto-proxy --no-pager -l`.

## Verified

- `make test`
- `zig build -Dtarget=x86_64-linux -Doptimize=ReleaseFast`
- Debian 12 container: dependency install + `zapret/nfq` build completed with `nfqws-ok`

</details>

## Changelog

* fix: harden nfqws install diagnostics ([#237](https://github.com/sleep3r/mtproto.zig/pull/237)) ([33c769c](https://github.com/sleep3r/mtproto.zig/commit/33c769cfc1221df35c76f4c5b2b28c7b4b2e3536))
* chore(main): release 0.21.3 ([#238](https://github.com/sleep3r/mtproto.zig/pull/238)) ([e274ce3](https://github.com/sleep3r/mtproto.zig/commit/e274ce317def1abbd5b5143999416ab95492fd89))

Related Repositories