v0.22.0

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

Upgrading?

AI Summary

Feature release adding CLI commands to explicitly output MTProto secrets and client links, addressing UX gaps introduced by runtime log hardening.

Key Highlights

  • New `mtbuddy links` command to print proxy links
  • New `mtbuddy secret` command to generate secrets
  • Post-install hint to use `links` command to retrieve secrets

New Features

  • CLI helpers for `mtbuddy links` and `mtbuddy secret`

Full Release Notes

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

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

`v0.22.0` - небольшой feature-релиз для `mtbuddy`, который закрывает UX-пробел после security hardening runtime-логов.

Начиная с `v0.21.x`, `mtproto-proxy` намеренно больше не печатает user secrets и готовые proxy links в stdout/journald. Это правильно для systemd, Docker и shared-host окружений: runtime logs часто собираются централизованно, читаются другими сервисами или остаются в истории контейнера.

Но для операторов без dashboard появился неудобный вопрос: как заново получить `tg://` / `t.me` ссылки из уже установленного `config.toml`? В discussion [#239](https://github.com/sleep3r/mtproto.zig/discussions/239) это справедливо всплыло как недостающая CLI-команда.

В `v0.22.0` добавлен явный sensitive-output workflow:

```bash
sudo mtbuddy links
sudo mtbuddy links --server proxy.example.com --config /opt/mtproto-proxy/config.toml
mtbuddy secret
```

Runtime logs остаются чистыми, а оператор может осознанно вывести секреты и ссылки отдельной командой.

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

> [!TIP]
> Если вы запускаете proxy в своём контейнере без dashboard, используйте `mtbuddy links --config <path> --server <public-host>`. Команда читает `[access.users]`, `[server].port`, `[server].public_ip` и `[censorship].tls_domain`.

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

### mtbuddy links: явный вывод client links ([#240](https://github.com/sleep3r/mtproto.zig/pull/240))

- Добавлена команда `mtbuddy links`.
- Команда печатает для каждого пользователя:
  - raw `secret`;
  - `tg://proxy?...`;
  - `https://t.me/proxy?...`.
- По умолчанию config берётся из `/opt/mtproto-proxy/config.toml`, а если его нет - из локального `config.toml`.
- Можно явно задать:
  - `--config <path>`;
  - `--server <ip-or-domain>`;
  - `--port <port>`;
  - `--domain <tls-domain>`.
- IPv6 endpoint escaping сохранён для deep links.

### mtbuddy secret: генерация нового user secret ([#240](https://github.com/sleep3r/mtproto.zig/pull/240))

- Добавлена команда `mtbuddy secret`.
- Она печатает свежий 32-hex MTProto secret, совместимый с `[access.users]`.
- Это CLI-эквивалент `openssl rand -hex 16`, но без зависимости от OpenSSL в пользовательском workflow.

### Install UX: подсказка после установки ([#240](https://github.com/sleep3r/mtproto.zig/pull/240))

- После блока `Connection link` installer теперь подсказывает:

```text
Run `sudo mtbuddy links` later to print these links again.
Runtime proxy logs intentionally hide secrets and links.
```

- README обновлён для no-dashboard и Docker сценариев.

## Проверено

- `make test`
- `zig build -Dtarget=x86_64-linux -Doptimize=ReleaseFast`

</details>

---

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

## What this release addresses

`v0.22.0` is a small `mtbuddy` feature release that closes a UX gap introduced by runtime log hardening.

Since `v0.21.x`, `mtproto-proxy` intentionally no longer prints user secrets or ready-made proxy links to stdout/journald. That is the right default for systemd, Docker, and shared-host environments: runtime logs are often collected centrally, read by other services, or kept in container history.

However, for operators without the dashboard, there was no obvious way to regenerate `tg://` / `t.me` links from an existing `config.toml`. Discussion [#239](https://github.com/sleep3r/mtproto.zig/discussions/239) correctly called out this missing CLI path.

`v0.22.0` adds an explicit sensitive-output workflow:

```bash
sudo mtbuddy links
sudo mtbuddy links --server proxy.example.com --config /opt/mtproto-proxy/config.toml
mtbuddy secret
```

Runtime logs stay clean, while operators can intentionally print secrets and links when they need them.

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

> [!TIP]
> If you run the proxy in your own container without the dashboard, use `mtbuddy links --config <path> --server <public-host>`. The command reads `[access.users]`, `[server].port`, `[server].public_ip`, and `[censorship].tls_domain`.

## What changed

### mtbuddy links: explicit client link output ([#240](https://github.com/sleep3r/mtproto.zig/pull/240))

- Added `mtbuddy links`.
- The command prints, for every configured user:
  - raw `secret`;
  - `tg://proxy?...`;
  - `https://t.me/proxy?...`.
- By default, config is read from `/opt/mtproto-proxy/config.toml`, falling back to local `config.toml`.
- You can override:
  - `--config <path>`;
  - `--server <ip-or-domain>`;
  - `--port <port>`;
  - `--domain <tls-domain>`.
- IPv6 endpoint escaping is preserved for deep links.

### mtbuddy secret: generate a new user secret ([#240](https://github.com/sleep3r/mtproto.zig/pull/240))

- Added `mtbuddy secret`.
- It prints a fresh 32-hex MTProto secret suitable for `[access.users]`.
- This is the CLI equivalent of `openssl rand -hex 16`, without requiring OpenSSL in the user's workflow.

### Install UX: post-install hint ([#240](https://github.com/sleep3r/mtproto.zig/pull/240))

- After the `Connection link` block, installer now hints:

```text
Run `sudo mtbuddy links` later to print these links again.
Runtime proxy logs intentionally hide secrets and links.
```

- README now documents the no-dashboard and Docker workflow.

## Verified

- `make test`
- `zig build -Dtarget=x86_64-linux -Doptimize=ReleaseFast`

</details>

## Changelog

* feat: add mtbuddy link helpers ([#240](https://github.com/sleep3r/mtproto.zig/pull/240)) ([34bf5e3](https://github.com/sleep3r/mtproto.zig/commit/34bf5e314a84ea259ade86e6d6d8563c42793756))
* chore(main): release 0.22.0 ([#241](https://github.com/sleep3r/mtproto.zig/pull/241)) ([c00f943](https://github.com/sleep3r/mtproto.zig/commit/c00f943a209e981f46e79e9a9bac58aa0c305010))

Related Repositories