Telegram proxy link: MTProto secret decoder and generator

Paste a Telegram proxy link and see what is in it: the server, the port, the kind of secret and the fake TLS domain, and what would stop Telegram from taking it. Or make a link to your own proxy: a new secret, both link forms with a QR code, and the commands for mtg or mtproto-proxy.

Runs in your browser, nothing is sent

What you have
Result

The result will show up here.

Everything is worked out in your browser: keys and addresses are not sent anywhere.

A link or subscription like this opens in Veli: paste it into Add and the profile is ready. Free, no sign-up.

Download Veli

Reference

Kinds of MTProto secret

The same rules the tool checks by: how many bytes, how it begins in hex, and which server takes it.

Plain
32
16
16 bytes and nothing else. The oldest kind: packet sizes give MTProto away. mtg v2 doesn't take it.
mtproto-proxy (-S)
dd, padding
dd… 34
1 + 16
The same 16 bytes with dd in front: packets get random padding. mtg v2 doesn't take it.
mtproto-proxy (-S)
ee, fake TLS
ee… ≥ 42
1 + 16 + domain
ee, 16 bytes and a domain: the connection begins like TLS to that domain. The only kind mtg v2 takes.
mtg v2, mtproto-proxy (-S, -D)

What is in the links

tg://proxy, t.me/proxy
server, port, secret
MTProto. All three are required.
tg://socks, t.me/socks
server, port, user, pass
SOCKS5. user and pass only if the proxy asks for a login.
tg://webproxy, t.me/webproxy
server, secret
Web proxy: always port 443, the domain with an optional path is in server. Recent Telegram versions only.

FAQ

What is the secret in an MTProto proxy link?

16 random bytes that the server and Telegram share. Written plainly it is 32 hex characters. With dd in front, packets get random padding so their sizes say less. With ee in front and a domain at the end, the connection begins like TLS to that domain (fake TLS): this is the usual kind today.

How do I get the domain out of an ee secret?

Drop ee, then 32 hex characters of the key: the rest is the domain, two hex characters per letter. 7777772e6578616d706c652e636f6d is www.example.com. Paste the link or the secret here and the domain is shown.

Hex or base64url: which form should I use?

Telegram reads both, they are the same bytes. Hex is longer but easy to check by eye: it starts with dd or ee. In base64url an ee secret starts with 7g–7v and a dd secret with 3Q–3Z or 3a–3f. Writing the letters ee in front of base64 is a mistake: Telegram Desktop calls such a secret incorrect.

tg://proxy and t.me/proxy: what is the difference?

The same parameters. tg:// opens the app straight away but is not clickable everywhere; the https://t.me form works as an ordinary link and then opens Telegram. Android also understands telegram.me and telegram.dog.

What domain do I put into a fake TLS secret?

A real HTTPS site, better one that has some relation to your server's address: the mtg readme suggests a site of your hosting provider. A huge site whose addresses are well known is easy to tell from your server. Your own domain pointing at the server also fits.

Does such a proxy replace a VPN?

No: an MTProto proxy carries only Telegram. Other apps go as before. Veli doesn't open tg:// links; it connects VPN and proxy profiles for the whole device, and Telegram then goes through them like everything else.