MTProxy Monitoring
Monitor Telegram MTProto Proxy servers with PingZen. MTProxy uses the proprietary MTProto protocol with Fake TLS obfuscation to bypass DPI censorship. PingZen performs cryptographic handshake validation to verify your proxy is alive, accepts your secret and relays traffic to Telegram.
What It Is For
A proxy your community actually uses
Port 443 is open almost everywhere: behind it there may be your proxy, an ordinary website, or a DPI stub. A green TCP check says nothing about which one it is; an MTProto handshake does.
Is the secret still accepted
A proxy with the wrong secret does not break — it starts behaving like an ordinary website (domain fronting). PingZen verifies the HMAC cryptographically, so that proxy turns red instead of staying green.
Blocked by an ISP or by DPI
The server itself can be perfectly alive while the path to it from one network is cut. The check runs from outside, from the region you pick, and the message names the step that failed; comparing regions shows whether only the path from one network is cut.
What It Is Not For
The check performs a real MTProto handshake against your proxy. It does not answer these:
| You want to know | Use instead |
|---|---|
| Is a SOCKS5 proxy working? | SOCKS5 monitor |
| Does the certificate of the fronted domain expire soon? | Nothing to watch — EE mode uses FakeTLS, a forged handshake with no real certificate behind it |
| Is Telegram itself having an outage? | Out of scope — the check proves your proxy relays to a Telegram data centre, not that Telegram is healthy |
| Can the proxy reach every Telegram data centre? | Not covered — the request goes to data centre 2 only. A proxy that cannot reach another data centre stays green, while users whose account lives there cannot connect through it |
| Is a website reachable through the proxy? | An HTTP monitor checks a site directly |
How It Works
- PingZen resolves the host name and connects to your MTProxy server over TCP (usually port 443)
- For EE secrets (Fake TLS): sends a TLS 1.3 ClientHello with HMAC-SHA256 authentication embedded in the Random field
- The proxy responds with a ServerHello containing its own HMAC — PingZen validates it; a mismatch means a wrong secret or a fronted website, and the check fails
- PingZen opens the obfuscated2 channel (AES-256-CTR, keys derived from your secret) — inside TLS Application Data for EE, directly for DD/plain — and sends an MTProto
req_pq_multiaddressed to Telegram data centre 2 - The proxy has to forward that request to Telegram: the check is UP only when the data centre’s
resPQcomes back carrying PingZen’s nonce. If the HMAC is valid but no answer comes back within 5 seconds (or within what is left of the monitor’s timeout, but at least 1 second), the check fails with “Proxy alive (HMAC valid) but no MTProto answer: not relaying to Telegram, or the traffic is cut on the path”
The response time covers the whole path: resolving the host name, the TCP connection, the FakeTLS handshake (EE only) and one request through the proxy to a Telegram data centre and back.
Reading a Failed Check
The message names the step the check stopped at. From one checker a dead proxy, a firewall and a cut on the way can look the same, so compare with checkers in other regions before changing the proxy.
| Message | What happened |
|---|---|
| “Timeout after N seconds during DNS lookup for …”, “Connection failed: Name or service not known” or “… Temporary failure in name resolution” | The proxy's host name did not resolve: it does not exist, or its DNS did not answer in time. Check the name's DNS records, or monitor the IP address |
| “Timeout after N seconds during TCP connect to …” | Nothing answered the TCP connection: the host is down, a firewall drops the packets, or the address is blocked on the way. “Connection refused” instead means the host answered but nothing listens on the port |
| “Timeout after N seconds waiting for the FakeTLS ServerHello from …” (EE) | TCP connected, but no FakeTLS answer came in time: the proxy is stuck or overloaded, some proxies stay silent on a wrong secret, or the hello is filtered on the way |
| “Connection was closed during ServerHello”, “Connection was reset during ServerHello” (EE) | The connection ended before the FakeTLS answer. A proxy does this to a hello it does not accept; a filter on the way can do the same. The check does not say which |
| “Invalid server HMAC (wrong secret or domain fronting)” (EE) | Something answered with TLS, but not with your secret: the secret is wrong, or the proxy handed the connection to its cover site |
| “Proxy alive (HMAC valid) but no MTProto answer: …” (EE) | The proxy holds your secret, but Telegram's answer did not come back within 5 seconds, or within what was left of the monitor's timeout (at least 1 second): the proxy cannot reach Telegram, or the traffic is cut on the way. On the proxy's host, check that it reaches Telegram's data centres |
| “Proxy alive (HMAC valid) but the connection was closed after the MTProto request”, “… was reset after the MTProto request” (EE) | The connection ended without Telegram's answer. A proxy that cannot reach Telegram often closes it this way; a filter on the way can too |
| “No response to MTProto handshake (…)”, “Connection was closed after the MTProto request (…)”, “Connection was reset after the MTProto request” (DD, plain) | A wrong secret, a proxy that does not relay and traffic cut on the way look alike here: these proxies accept a wrong secret silently |
| “MTProto transport error: -N” | An MTProto transport error came back through the proxy: -404 auth key not found or a malformed request, -429 too many connections from one address, -444 invalid data centre |
| “Response too short for MTProto message”, “Invalid MTProto response from proxy” | Something answered, but not with an MTProto reply made with your secret: another service on the port, or a proxy that does not accept this secret type (mtg 2 takes only EE secrets) |
Check Levels
PingZen performs multi-level validation depending on your secret format:
FakeTLS HMAC + MTProto relay (EE secrets)
The HMAC proves the proxy knows your secret and catches domain fronting (wrong secret → proxy forwards to real website). An MTProto request (req_pq) then goes through the FakeTLS channel to Telegram, proving the proxy actually relays — a proxy that cannot reach Telegram turns red, and so does one whose traffic is cut on the way.
Obfuscated2 + MTProto relay (DD/plain secrets)
Sends AES-256-CTR encrypted init payload, then an MTProto request (req_pq) through the proxy to Telegram. These proxies silently accept an init built from a wrong secret, so only Telegram's answer proves both the secret and the relay.
TCP Connectivity
Basic TCP port check. Confirms the server is reachable but cannot verify secret validity.
Secret Formats
MTProxy supports three secret formats. Modern proxies use EE (Fake TLS) almost exclusively:
Plain (32 hex chars)
Original format. 16-byte secret without obfuscation prefix. Easily detectable by DPI. Example: cafe1234cafe1234cafe1234cafe1234
DD (dd + 32 hex chars)
Padded intermediate mode. Adds random padding to packet sizes, making DPI fingerprinting harder. Example: ddcafe1234cafe1234cafe1234cafe1234
EE (ee + 32 hex + domain hex)
Fake TLS mode — the current standard. Traffic looks like HTTPS to the specified domain. Example: ee0123456789abcdef0123456789abcdef676f6f676c652e636f6d (domain: google.com)
Configuration
Server Address
Hostname or IP address with port (e.g., proxy.example.com:443). Default port: 443.
Secret
Your MTProxy secret in hex or base64 format. Supports three formats: plain (32 hex chars), DD (dd + 32 hex), and EE (ee + 32 hex + hex-encoded domain) for Fake TLS mode.
SOCKS5 vs MTProxy
Both protocols can proxy Telegram traffic, but they differ significantly in DPI resistance:
| Feature | SOCKS5 | MTProxy |
|---|---|---|
| DPI Resistance | None — RFC 1928 handshake is fingerprinted | High — Fake TLS looks like regular HTTPS |
| Traffic Scope | Any TCP/UDP application | Telegram only |
| Authentication | Username/password (RFC 1929) | 16-byte shared secret (HMAC-SHA256) |
| Port | 1080 (default) | 443 (mimics HTTPS) |
| Secret Validation | Protocol handshake | Cryptographic HMAC proof |
| Domain Fronting | Not applicable | Built-in — invalid clients see real website |
Key Features
- Cryptographic handshake validation (not just TCP port check)
- FakeTLS (EE) HMAC-SHA256 verification
- Support for all secret formats: plain, DD, and EE
- Domain fronting detection for EE secrets
- Error messages that name the step that failed: DNS lookup, TCP connect, FakeTLS handshake or the relay to Telegram
- SSRF protection — private IP targets are blocked
- Zero external dependencies — pure Python asyncio sockets
- End-to-end verification for every secret format — EE, DD and plain — via an MTProto req_pq relayed through the proxy to a Telegram data centre
- Works with mtg, mtprotoproxy, Erlang mtproto_proxy, and other MTProxy servers