v0.7.0
sleep3r/mtproto.zigv0.7.0Apr 5, 2026by sleep3r
Upgrading?
AI Summary
Introduces AmneziaWG tunnel support, allowing users to deploy a local proxy inside a VPN namespace to bypass blocking and reduce latency.
Key Highlights
- One-command deployment of AmneziaWG tunnel for blocked regions.
- Proxy runs inside an isolated Linux network namespace.
- Uses iptables DNAT and policy routing for traffic isolation.
- New `deploy/setup_tunnel.sh` script for automated setup.
- New Makefile targets for tunnel migration and addition.
New Features
- AmneziaWG tunnel integration
- Automated tunnel deployment scripts
Full Release Notes
## [0.7.0](https://github.com/sleep3r/mtproto.zig/compare/v0.6.2...v0.7.0) (2026-04-05)
# Release Notes: AmneziaWG Tunnel Support
## 🇬🇧 English
### AmneziaWG Tunnel — deploy MTProto proxy in blocked regions
**Problem:** In countries like Russia, ТСПУ (TSPU) blocks direct TCP connections to Telegram data centers. A proxy on a foreign server still works, but suffers from cross-border throttling and active DPI probing.
**Solution:** Run the proxy on a **local VPS** (same country as the user) and tunnel only the Telegram traffic through an **AmneziaWG VPN** inside an isolated **Linux network namespace**.
```
Client ──→ VPS:443 ──→ [iptables DNAT] ──→ 10.200.200.2:443
(host) (tg_proxy_ns)
│
mtproto-proxy
│
awg0 (tunnel)
│
Telegram DC servers
```
#### Why it's better than a regular foreign proxy
- **Lower latency**: client → local VPS is ~1 ms instead of ~50-80 ms to a foreign server
- **No cross-border throttling**: DPI sees a local HTTPS connection, not international Telegram traffic
- **AmneziaWG is undetectable**: junk fields (`Jc`, `S1`, `H1`...) break all known WireGuard signatures
- **Host stays safe**: the tunnel runs inside a network namespace — SSH and other services are completely unaffected
#### One-command deploy
```bash
# New server (full setup)
make deploy-tunnel SERVER=<ip> AWG_CONF=awg.conf PASSWORD=<pass>
# Existing installation
make deploy-tunnel-only SERVER=<ip> AWG_CONF=awg.conf
```
The script installs AmneziaWG, creates the namespace, sets up DNAT + policy routing, patches the systemd service, switches to direct mode, validates connectivity to all 5 Telegram DCs, and prints the ready-to-use `tg://` link.
#### New files
- `deploy/setup_tunnel.sh` — automated tunnel setup script
#### New Makefile targets
- `make deploy-tunnel` — full migration + tunnel
- `make deploy-tunnel-only` — add tunnel to existing proxy
---
## 🇷🇺 Русский
### Туннель AmneziaWG — деплой MTProto прокси в заблокированных регионах
**Проблема:** В России ТСПУ блокирует прямые TCP-подключения к дата-центрам Telegram. Прокси на зарубежном сервере работает, но страдает от трансграничного троттлинга и активного зондирования DPI.
**Решение:** Запускаем прокси на **локальном VPS** (в той же стране, что и пользователь), а трафик до Telegram пускаем через **AmneziaWG VPN** внутри изолированного **Linux network namespace**.
```
Клиент ──→ VPS:443 ──→ [iptables DNAT] ──→ 10.200.200.2:443
(хост) (tg_proxy_ns)
│
mtproto-proxy
│
awg0 (туннель)
│
Серверы Telegram DC
```
#### Почему это лучше обычного прокси за границей
- **Минимальная задержка**: клиент → локальный VPS = ~1 мс вместо ~50-80 мс до зарубежного сервера
- **Нет трансграничного троттлинга**: ТСПУ видит обычный HTTPS к местному IP, а не международный трафик Telegram
- **AmneziaWG не детектируется**: джанк-параметры (`Jc`, `S1`, `H1`...) ломают все известные WireGuard-сигнатуры ТСПУ
- **Хост в безопасности**: туннель работает внутри network namespace — SSH и остальные сервисы никак не затрагиваются
#### Деплой одной командой
```bash
# Новый сервер (полная установка)
make deploy-tunnel SERVER=<ip> AWG_CONF=awg.conf PASSWORD=<pass>
# Добавить туннель к существующей установке
make deploy-tunnel-only SERVER=<ip> AWG_CONF=awg.conf
```
Скрипт устанавливает AmneziaWG, создаёт namespace, настраивает DNAT + policy routing, патчит systemd-сервис, переключает на direct mode, проверяет доступность всех 5 Telegram DC и выводит готовую `tg://` ссылку.
#### Новые файлы
- `deploy/setup_tunnel.sh` — скрипт автоматической настройки туннеля
#### Новые Makefile-таргеты
- `make deploy-tunnel` — полная миграция + туннель
- `make deploy-tunnel-only` — добавить туннель к существующему проксиRelated Repositories
lightpanda-io/browser★ 36,859
Lightpanda: the headless browser designed for AI and automation
tigerbeetle/tigerbeetle★ 17,229
The financial transactions database designed for mission critical safety and performance.
nullclaw/nullclaw★ 8,131
Fastest, smallest, and fully autonomous AI assistant infrastructure written in Zig
zml/zml★ 4,195
Any model. Any hardware. Zero compromise. Built with @ziglang / @openxla / MLIR / @bazelbuild
dmtrKovalenko/odiff★ 3,280
A very fast SIMD-first image comparison library (with nodejs API)