Telegram's new WEB proxy with a sponsor channel, installed in one command — and a CLI panel that runs the whole thing.
bash <(curl -fsSL https://raw.githubusercontent.com/slowriverr/WebMTProxy/main/install.sh)That is the whole install. It asks for a domain and an e-mail, builds everything,
gets a TLS certificate, and hands you a t.me/webproxy link.
Attach your @MTProxybot tag and your channel is offered to everyone who connects — one command, any time:
sudo webmtproxy sponsor <TAG>
- Sponsor channel. Attach an @MTProxybot ad tag and your channel is offered to everyone who connects. Off by default, one command on.
- One command. Domain, e-mail, secret, cover site, TLS, firewall, services.
- Fails early, not late. Root, architecture, systemd, whether your A record actually points here, whether ports 80/443 are free — all checked before anything is touched.
- Works on the first try. A permissions bug that otherwise leaves the proxy dead on arrival is patched during install.
- A real panel. Service health, TLS expiry, live connections, secret rotation, logs, updates, clean uninstall.
- No hidden state. The panel reads everything from the live config files. Nothing to drift, nothing to keep in sync.
Telegram app ──WebView / HTTPS──▶ your domain ──▶ backend ──▶ Telegram
└── every other request: your website
| Server | Debian or Ubuntu, x86_64, systemd, root |
| DNS | an A record for your hostname pointing at the server, already propagated |
| Ports | 80 and 443 free |
git clone https://github.com/slowriverr/WebMTProxy
cd WebMTProxy
sudo ./install.shNon-interactive:
sudo ./install.sh --domain proxy.example.com --email you@example.com --yesExpect 5–15 minutes — everything is compiled from source and a certificate is
issued. Progress is on screen, full output in /var/log/webmtproxy-install.log.
All installer flags
| Flag | Meaning |
|---|---|
-d, --domain HOST |
public hostname, e.g. proxy.example.com |
-e, --email ADDR |
contact e-mail for Let's Encrypt |
-s, --secret HEX |
32 hex chars, optionally dd-prefixed — if omitted you are asked |
-t, --tag HEX |
sponsor channel tag from @MTProxybot (default: none) |
--site-dir DIR |
serve this directory as the cover website |
--site-upstream URL |
proxy the cover website to http://127.0.0.1:PORT |
--workers N |
worker processes, 0 = single process (default 0) |
--max-connections N |
connection cap, 0 = none (default 0) |
-y, --yes |
no prompts, no confirmation |
-v, --verbose |
stream the build output instead of a spinner |
Anything not passed is asked for interactively.
$ sudo webmtproxy
╭────────────────────────────────────────────────────╮
│ WebMTProxy │
│ proxy.example.com online │
╰────────────────────────────────────────────────────╯
SERVICES
● caddy active up 3d 4h
● mtproxy active up 3d 4h
● tproxy-server active up 3d 4h
● tproxy-firewall active up 3d 4h
HEALTH
relay ready
website 200
tls valid, 67d left
clients 12 established on :443
ACCESS
secret dd7f3c1e9a2b48d05e6f81c34a9b2d7e
email you@example.com
sponsor none
carrier https (default)
mtproxy 0 worker(s)
https://t.me/webproxy?server=proxy.example.com&secret=dd7f3c1e…
commands link · qr · rotate-secret · sponsor · site · mode · domain
path · -M N · -C N · restart · logs · update · uninstall · help| Command | What it does |
|---|---|
webmtproxy |
the panel above |
webmtproxy link |
print the t.me/webproxy link |
webmtproxy qr |
print it as a QR code |
webmtproxy rotate-secret [HEX] |
new secret, restart, print the new link |
webmtproxy sponsor [TAG] |
show, set, or clear (off) the sponsor channel tag |
webmtproxy site [DIR] |
show the live cover site, or publish DIR as it |
webmtproxy mode [MODE] |
carrier transport: https, https-lanes, websocket, websocket-lanes |
webmtproxy domain [HOST] |
show or change the hostname, then print the new link |
webmtproxy path [P] |
show or set the path the proxy lives under: none (default), random, or your own |
webmtproxy -M N [-C N] |
MTProxy workers (0 = a single process) and the connection cap (0 = no limit) |
webmtproxy restart |
restart every service |
webmtproxy logs |
follow all journals |
webmtproxy update |
pull the latest and rebuild, keeping the current settings |
webmtproxy uninstall [--purge] |
remove everything |
uninstall keeps /srv/tproxy-site and /var/lib/caddy unless you pass
--purge — re-issuing certificates burns Let's Encrypt rate limits.
Off by default. Register the proxy with @MTProxybot, take the tag it gives you, and:
sudo webmtproxy sponsor aabbccddeeff00112233445566778899
sudo webmtproxy sponsor offThe tag is applied as a systemd drop-in rebuilt from the service's own command
line, so it survives updates. One caveat worth knowing: @MTProxybot registers a
host:port, and here clients reach you over HTTPS on your domain rather than
that port — the tag is passed to the backend, but treat sponsored-channel
delivery as best-effort until you have seen it work.
The WebView can carry a session four ways. https is the default; the others
trade a different traffic shape for the same payload, which matters when one
shape is being throttled.
sudo webmtproxy mode websocket
sudo webmtproxy mode # what is set now| Mode | Shape |
|---|---|
https |
one serialized HTTPS carrier |
https-lanes |
independent HTTPS request lanes per logical session |
websocket |
one multiplexed WebSocket |
websocket-lanes |
an independent WebSocket per logical session |
Clients pick the new mode up on their next session; nothing needs reinstalling.
Your hostname stays an ordinary HTTPS site. Only a request carrying the capability
derived from the hostname and the secret reaches the proxy; everything else gets
the cover site. The installer picks one of five small templates in sites/ at random; they are
public, so pointing --site-dir at your own site is still better.
sudo ./install.sh -d proxy.example.com -e you@example.com --site-dir /opt/my-siteTo change it later, publish a directory over the live one:
sudo webmtproxy site /opt/my-site
sudo webmtproxy site # what is live right nowThe relay loads the whole site into memory at startup, so editing the directory
you installed from changes nothing — site replaces the live copy, keeps the
previous one at /srv/tproxy-site.bak.<timestamp>, and restarts the relay. It
also warns about the things the response policy blocks: inline <style> and
<script>, external resources, and symlinks.
./test_install.sh119 checks over input validation, the install-time patch, secret rotation, the
sponsor drop-in, site publishing, carrier mode and the hostname switch.
Set WEBMTPROXY_REPO to point the bootstrap and webmtproxy update at a fork.
Built on tproxy-server and MTProxy, fetched at install time rather than vendored. MIT-licensed; the upstream projects carry their own terms.