whatisgithub

What is mtproxy?

telegrammessenger/mtproxy — explained in plain English

Analysis updated 2026-06-24

6,760CAudience · ops devopsComplexity · 3/5Setup · moderate

In one sentence

A proxy server for Telegram that lets people in regions where Telegram is blocked connect through your own Linux server using Telegram's MT-Proto protocol.

Mindmap

mindmap
  root((MTProxy))
    What It Does
      Proxies Telegram traffic
      Bypasses ISP blocks
    Setup Steps
      Compile from source
      Download Telegram configs
      Generate user secret
    Features
      Random padding mode
      Multi-worker support
      Stats endpoint
    Deployment
      systemd service
      Docker image
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run a Telegram proxy on your own Linux VPS so users in restricted regions can access Telegram without a VPN.

USE CASE 2

Host a community Telegram proxy and share the connection link with friends blocked by ISP filtering.

USE CASE 3

Set up an obfuscated proxy with random padding to evade traffic-pattern-based Telegram blocking.

What is it built with?

COpenSSLzlib

How does it compare?

telegrammessenger/mtproxymackron/miniaudioyanfeizhang/coder-kung-fu
Stars6,7606,7616,785
LanguageCCC
Setup difficultymoderateeasymoderate
Complexity3/52/51/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires a Linux server with OpenSSL and zlib dev packages installed, must compile from source.

So what is it?

MTProxy is a proxy server built by Telegram for the MT-Proto protocol, which is the protocol Telegram uses for its messaging app. Running this proxy lets people connect to Telegram through your server, which is useful in regions where direct access to Telegram is restricted by internet service providers or governments. Setup involves compiling the code from source, which requires common build tools plus development libraries for OpenSSL and zlib. These are standard packages available through the package manager on any Linux system. The build process is a single make command. Running the proxy involves a few steps. First, you download a secret file and a configuration file from Telegram's servers. These files authenticate your proxy with Telegram and tell it how to route traffic. Then you generate a secret string that your users will need when connecting. The proxy runs on a port you choose (commonly 443, the standard HTTPS port), and you can run multiple worker processes if your server is powerful enough. Once the proxy is running, you share a connection link with users and register the proxy with Telegram's official bot on the platform. Telegram provides a local statistics endpoint so you can monitor usage. The proxy can also be configured as a long-lived background service using systemd, with automatic restart on failure and automatic start on reboot. There is a random padding option that adds random bytes to message packets to make them harder to identify by size-based traffic inspection, which some internet providers use to block Telegram connections. This mode is enabled by adding "dd" to the secret string on the client side. Telegram also publishes an official Docker image for the proxy, though the README notes it may be outdated.

Copy-paste prompts

Prompt 1
Walk me through compiling and running MTProxy on an Ubuntu server, including downloading the secret file and generating a user secret.
Prompt 2
Help me write a systemd service file for MTProxy so it starts automatically on reboot and restarts on failure.
Prompt 3
What is the dd prefix for MTProxy secrets and how does random padding make Telegram traffic harder to detect and block?
Prompt 4
Show me how to monitor MTProxy usage stats locally and how to register my proxy with the official Telegram proxy bot.

Frequently asked questions

What is mtproxy?

A proxy server for Telegram that lets people in regions where Telegram is blocked connect through your own Linux server using Telegram's MT-Proto protocol.

What language is mtproxy written in?

Mainly C. The stack also includes C, OpenSSL, zlib.

How hard is mtproxy to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is mtproxy for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.