v0.20.2

sleep3r/mtproto.zigv0.20.2May 2, 2026by sleep3r

Upgrading?

AI Summary

v0.20.2 introduces support for Amnezia VPN share links in tunnel setup, automatically decoding them into valid WireGuard/AmneziaWG configurations.

Key Highlights

  • Added support for decoding Amnezia `vpn://` links into WireGuard configs.
  • Strips DNS directives to prevent system DNS disruption.
  • Strips empty AmneziaWG parameters for compatibility with older `amneziawg-tools`.
  • Preflights config with `awg-quick strip` before applying to prevent restart loops.

New Features

  • Support Amnezia vpn links in tunnel setup

Full Release Notes

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

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

Исправлена настройка туннеля для Amnezia VPN share links. Раньше `mtbuddy setup tunnel /root/my.conf` ожидал готовый WireGuard/AmneziaWG `.conf`; если в файле лежала строка `vpn://...`, установщик копировал её как есть в `/etc/amnezia/amneziawg/awg0.conf`, после чего `awg-quick` падал с ошибкой парсинга, а `mtproto-proxy.service` не стартовал.

Теперь tunnel setup принимает оба варианта: обычный `.conf` и Amnezia `vpn://` link.

> [!NOTE]
> Изменений в пользовательской конфигурации не требуется. Если провайдер/приложение отдаёт только `vpn://...`, можно передать файл с этой строкой напрямую в `mtbuddy setup tunnel`.

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

### Tunnel setup: поддержка Amnezia `vpn://` ([#220](https://github.com/sleep3r/mtproto.zig/pull/220))

- `mtbuddy` распаковывает Amnezia `vpn://` link и извлекает из него реальный AmneziaWG/WireGuard config.
- DNS-директивы по-прежнему удаляются из AWG-конфига: используется resolver хоста, чтобы tunnel setup не ломал системный DNS.
- Пустые AmneziaWG-параметры вроде `I2 =` / `I3 =` очищаются перед запуском `awg-quick`; старые версии `amneziawg-tools` не принимают такие строки.
- Перед патчингом systemd и рестартом прокси конфиг теперь проверяется через `awg-quick strip`, поэтому неверный tunnel config не отправляет сервис в restart loop.
- Тесты `mtbuddy` подключены к `zig build test`, включая проверку конвертации `vpn://`.

</details>

---

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

## What this release addresses

This release fixes tunnel setup for Amnezia VPN share links. Previously, `mtbuddy setup tunnel /root/my.conf` expected a ready WireGuard/AmneziaWG `.conf`; if the file contained a `vpn://...` line, the installer copied it verbatim to `/etc/amnezia/amneziawg/awg0.conf`, causing `awg-quick` to fail during parsing and preventing `mtproto-proxy.service` from starting.

Tunnel setup now accepts both native `.conf` files and Amnezia `vpn://` links.

> [!NOTE]
> No user configuration changes are required. If your provider/app gives you only a `vpn://...` link, you can pass a file containing that line directly to `mtbuddy setup tunnel`.

## What changed

### Tunnel setup: Amnezia `vpn://` support ([#220](https://github.com/sleep3r/mtproto.zig/pull/220))

- `mtbuddy` decodes Amnezia `vpn://` links and extracts the underlying AmneziaWG/WireGuard config.
- DNS directives are still removed from the AWG config: the host resolver is used so tunnel setup does not disrupt system DNS.
- Empty AmneziaWG parameters such as `I2 =` / `I3 =` are stripped before running `awg-quick`; older `amneziawg-tools` versions reject those lines.
- The config is now preflighted with `awg-quick strip` before systemd is patched and the proxy is restarted, so invalid tunnel configs do not push the service into a restart loop.
- `mtbuddy` tests are now included in `zig build test`, including `vpn://` conversion coverage.

</details>

## Changelog

* fix: support Amnezia vpn links in tunnel setup ([#220](https://github.com/sleep3r/mtproto.zig/pull/220)) ([0017d2c](https://github.com/sleep3r/mtproto.zig/commit/0017d2cc9fbac2c3cfb3c566950425752e16cfbd))

Related Repositories