Skip to main content
50% off all plans, limited time. Starting at $2.48/mo
mtproto.zig

mtproto.zig

mtproto.zig is a small self-hosted Telegram proxy written in Zig that disguises its traffic as ordinary HTTPS. It generates ready-made connection links and runs on a single core. MIT licensed with 1,000+ GitHub stars.

At a glance

1.1k

GitHub stars

1

Page views

License MIT Version Latest OS Ubuntu Server 24.04 LTS Min RAM 1 GB IP IPV4,IPV6

Getting Connection Links

Retrieve Telegram connection links anytime:

mtbuddy links

Important Files & Directories

  • Configuration File: /opt/mtproto-proxy/config.toml
  • Working Directory: /opt/mtproto-proxy
  • TLS Certificate: /etc/nginx/ssl/cert.pem
  • nfqws Binary: /opt/zapret/nfq/nfqws

Proxy Management

Check the proxy status:

systemctl status mtproto-proxy

View live logs:

journalctl -u mtproto-proxy -f

Restart the proxy:

systemctl restart mtproto-proxy

Configuration

The proxy configuration is stored in: /opt/mtproto-proxy/config.toml

After making configuration changes, restart the proxy:

systemctl restart mtproto-proxy

Generate updated connection links:

mtbuddy links

Local TLS Mask

A local Nginx TLS masking service is configured.

  • Domain: google.com
  • Listener: 127.0.0.1:8443
  • Certificate: /etc/nginx/ssl/cert.pem

Check the health monitor:

systemctl status mtproto-mask-health.timer

nfqws TCP Desynchronization

The installation enables nfqws to improve DPI evasion.

Check its status:

systemctl status nfqws-mtproto

Restart it if necessary:

systemctl restart nfqws-mtproto

Useful Commands

# Show Telegram connection links
sudo mtbuddy links

# Show proxy and module status
sudo mtbuddy status

# Validate and inspect config
sudo mtbuddy config validate
sudo mtbuddy config doctor
sudo mtbuddy config doctor --network
sudo mtbuddy config print-effective

# Install web monitoring dashboard
sudo mtbuddy setup dashboard
# Remove just the dashboard (leaves the proxy running)
sudo mtbuddy setup dashboard --remove

# Full mtbuddy help
sudo mtbuddy --help

More in Security

Related apps.

Deploy mtproto.zig now. From $2.48/mo.