🇷🇺 Что нового (RU)
Что решает этот релиз
v0.24.0 - небольшой feature-релиз для операторов, которые запускают mtproto.zig за HAProxy, Nginx stream или другим reverse proxy / TCP load balancer.
Раньше в конфиге уже был [server].public_ip, чтобы подменить адрес в клиентских ссылках. Но порт в tg:// / t.me ссылках всё равно почти везде брался из [server].port - то есть из реального listen-port прокси.
Это ломало типичную backend-схему:
Telegram client -> public.example.com:443 -> HAProxy -> mtproto-proxy:8444
Прокси слушает 8444, но клиенты должны подключаться к публичному 443. До этого можно было разово выполнить mtbuddy links --port 443, но install summary и dashboard продолжали показывать backend-port. В v0.24.0 для этого появился постоянный конфиговый параметр:
[server]
port = 8444
public_port = 443После этого все генерируемые клиентские ссылки используют port=443, а сам proxy runtime продолжает слушать 8444.
[!NOTE]
Существующие конфиги менять не нужно. Еслиpublic_portне задан, поведение остаётся прежним: ссылки используют[server].port.
[!TIP]
Для новых установок можно сразу передать--public-port:sudo mtbuddy install --port 8444 --public-port 443 --domain wb.ru --yes
Что изменено
Постоянный public port для клиентских ссылок (#264, закрывает #260)
- Добавлен опциональный
[server].public_port. - Runtime config parser теперь читает этот параметр, но он не влияет на listen socket.
- Новый helper
publicLinkPort()возвращаетpublic_port, если он задан, иначе обычный[server].port. - Старые конфиги и deployments без reverse proxy сохраняют прежнее поведение.
mtbuddy links, install summary и dashboard используют один и тот же fallback (#264)
mtbuddy linksтеперь выбирает порт так:--port <port>из CLI;[server].public_port;[server].port.
- Финальный экран
mtbuddy installпечатает ссылки сpublic_port, если он задан. - Dashboard API генерирует
tg://иhttps://t.me/proxylinks с публичным портом. - Если публичный порт отличается от listen-port, install summary и startup banner показывают его отдельно как
Public Port.
Установка и документация (#264)
- Добавлен
mtbuddy install --public-port <port>. mtbuddy config print-effectiveтеперь показываетpublic_port, если он задан.config.toml.example, README и README.ru описывают HAProxy/Nginx сценарий.
Installer e2e workflow (#263)
- В репозиторий добавлен installer e2e workflow, чтобы проверять clean install путь отдельным CI-сценарием.
- Это не меняет runtime-поведение, но помогает ловить regressions в
mtbuddy installраньше.
Проверено
zig build testzig build -Dtarget=x86_64-linux-muslpython3 -m py_compile src/ctl/dashboard_assets/server.py
🇬🇧 Release notes (EN)
What this release addresses
v0.24.0 is a small feature release for operators running mtproto.zig behind HAProxy, Nginx stream, or another reverse proxy / TCP load balancer.
The config already had [server].public_ip for overriding the address used in client links. But the port in generated tg:// / t.me links was still taken from [server].port in most places - the actual proxy listen port.
That broke a common backend layout:
Telegram client -> public.example.com:443 -> HAProxy -> mtproto-proxy:8444
The proxy listens on 8444, but clients must connect to public port 443. Previously, operators could work around this with a one-off mtbuddy links --port 443, while the install summary and dashboard still showed the backend port. v0.24.0 adds a persistent config option for this:
[server]
port = 8444
public_port = 443Generated client links now use port=443, while the proxy runtime still listens on 8444.
[!NOTE]
Existing configs do not need changes. Ifpublic_portis not set, behavior is unchanged: links use[server].port.
[!TIP]
New installs can set it directly:sudo mtbuddy install --port 8444 --public-port 443 --domain wb.ru --yes
What changed
Persistent public port for client links (#264, closes #260)
- Added optional
[server].public_port. - The runtime config parser reads the setting, but it does not affect the listen socket.
- A new
publicLinkPort()helper returnspublic_portwhen set, otherwise[server].port. - Existing configs and deployments without a reverse proxy keep the previous behavior.
mtbuddy links, install summary, and dashboard share the same fallback (#264)
mtbuddy linksnow chooses the link port in this order:- CLI
--port <port>; [server].public_port;[server].port.
- CLI
- The final
mtbuddy installscreen prints links withpublic_portwhen configured. - The dashboard API generates
tg://andhttps://t.me/proxylinks with the public port. - When the public port differs from the listen port, install summary and startup banner show it separately as
Public Port.
Install and documentation (#264)
- Added
mtbuddy install --public-port <port>. mtbuddy config print-effectivenow showspublic_portwhen configured.config.toml.example, README, and README.ru document the HAProxy/Nginx scenario.
Installer e2e workflow (#263)
- Added an installer e2e workflow to validate the clean install path as a dedicated CI scenario.
- This does not change runtime behavior, but it helps catch
mtbuddy installregressions earlier.
Verified
zig build testzig build -Dtarget=x86_64-linux-muslpython3 -m py_compile src/ctl/dashboard_assets/server.py