Skip to content

Telegram WEB proxy: HTTPS, Telemt and your own website

Telegram Web Proxy Manager (TWPM) is our separate free project for installing and maintaining a Telegram proxy. It is integrated into the 3X-UI AUTO NGINX menu, allowing you to use ordinary Xray connections and a dedicated proxy directly in Telegram on the same VPS.

Choose one of the following guides. Each is self-contained, from preparing the server to a working connection:

In both cases, your phone or computer connects to Telegram using a ready-to-use WEB proxy link. You do not need a separate VPN app on the device.

Telemt maintenance and updates · Backup and migration.

Separate project and separate data

TWPM supports Ubuntu 24.04/26.04, not Debian 13. On a working 3X-UI server, download the latest manager and choose option 4, not 1. Installation. A 3X-UI Backup does not replace a TWPM backup.

What WEB Proxy is and why use it

WEB is a proxy type developed by the Telegram team. Unlike ordinary MTProxy with simulated TLS (FakeTLS), WEB carries MTProxy streams inside a genuine HTTPS connection. Telegram uses an embedded web component (WebView) to carry streams over a web transport. Standard MTProto encryption remains in use.

We use the compatible WEB implementation in Telemt. TWPM configures the HTTPS transport. A real nginx server accepts the TLS connection with a valid Let's Encrypt certificate, and Telemt handles proxy requests. Ordinary visitors' requests are directed to the cover website.

Telegram → HTTPS :443 → nginx → Telemt → Telegram
Browser → HTTPS :443 → nginx → Telemt → cover website

Benefits of using it with 3X-UI AUTO NGINX

  • Genuine HTTPS. The connection uses ordinary TLS with a certificate for your domain rather than a simulated handshake.
  • A functioning website on the domain. Opening the address in a browser shows pages, navigation and illustrations. For a fresh installation, the manager selects one of three themes: plants, the night sky or home cooking. The design is personalized, the pages are mobile-friendly and no external resources are required.
  • Shared nginx. The 3X-UI panel and connections already use TCP/443. nginx selects the appropriate service based on the domain name in TLS (SNI). TWPM requires a separate domain, but not another public port or web server.
  • Your own route to Telegram. Telemt can connect directly or through SOCKS5. On the entry VPS, we can use the existing cascade outbound.
  • Independent management. TWPM installs and maintains Telemt, its own website and certificate. Telemt updates verify the new version and can return to the previous working version on failure.

From an outside observer's perspective, the initial connection goes to your domain over HTTPS on TCP/443. An ordinary website request returns real web pages. This is a useful distinction from a proxy that only simulates TLS or presents an empty placeholder page.

Telegram WEB specification · WEB in Telemt

Part 1. Standard Telegram WEB proxy installation

This method is suitable if your VPS connects directly to Telegram servers. Everything runs on one server; no additional SOCKS5 proxy or Xray routing changes are required.

Step 1. Prepare the VPS and domain

  • A VPS running Ubuntu 24.04 or 26.04, x86_64 or ARM64, with working 3X-UI AUTO NGINX. Getting started.
  • SSH access with root privileges.
  • An unused domain or subdomain for TWPM, for example tg.example.com. Replace this example with your own.
  • The domain's DNS A record must point to the public IPv4 of the VPS where you install TWPM. If an AAAA record exists, verify that it points to the same server. For direct VPS access through Cloudflare, select DNS only (gray cloud).
  • Externally reachable TCP/80 for certificate issuance and TCP/443 for the website and proxy. TWPM does not change firewall settings itself.
  • A Telegram app version that supports the WEB proxy type.

The TWPM domain must differ from the panel, REALITY and Vision domains and other existing nginx websites.

Step 2. Connect to the VPS and check direct access to Telegram

Connect via SSH. If you logged in as a regular user, run on the VPS:

sudo -i

If you are unsure whether your VPS can connect directly to Telegram, run on the VPS as root:

curl --noproxy '*' -fsS --connect-timeout 10 --max-time 30 https://api.telegram.org/ -o /dev/null && echo OK

If OK appears, the preliminary test passed. If Telegram is not directly accessible, follow part 2.

Step 3. Install Telegram Web Proxy Manager

In your SSH session on the VPS as root, download and launch the latest 3X-UI manager:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Do not choose 3X-UI Installation: we do not need to modify the existing stack.

Choose 1. English, then 4. Telegram Web Proxy Manager.

The first time you open it, you will see the following prompt:

Would you like to proceed with installing Telegram Web Proxy Manager? [Y/n]:

Press Enter or type y to continue. A separate manager opens. When asked to choose a language, select English, then 1. Install Telegram proxy.

The manager asks three questions.

If Certbot detects several Let's Encrypt accounts, TWPM lets you select the appropriate one. If there is only one existing account, it is used automatically; you do not need to register another account.

TWPM prompt What to enter
WEB domain Your unused domain, for example tg.example.com
Public IPv4 Press Enter if the suggested address matches the VPS's IPv4 and DNS A record. Otherwise, enter the correct address
Use SOCKS5 upstream? [y/N] N or Enter

Why choose N: SOCKS5 is needed when Telemt must connect to Telegram servers through an intermediate proxy. In this scenario, the VPS already has direct access to Telegram, so an additional connection is unnecessary.

The manager obtains an HTTPS certificate, configures nginx, installs Telemt and creates a multi-page website. Once installation succeeds, it displays a ready-to-use tg://webproxy?… link.

  1. Open the provided tg://webproxy?… link on a device with WEB support. Confirm adding the proxy and enable it in Telegram.
  2. Check that the messenger connects: send a message, open a channel and load media.
  3. Open your TWPM domain in an ordinary browser over HTTPS. A website with a valid certificate should load. Navigate through several pages.
  4. Verify that your existing 3X-UI connections still work.

Do not publish the link

The WEB link contains an access secret. Store it securely and do not publish screenshots containing it. This is a separate Telegram link, not a 3X-UI subscription.

Done. You now have your own Telegram WEB proxy with direct egress, genuine HTTPS and a cover website. For ongoing management, see maintenance.


Part 2. Install a Telegram WEB proxy on a Russian cascade

If Telegram is not directly accessible from the Russian VPS, first prepare a cascade across two VPS instances. Xray on the entry VPS must have a working cascade-exit outbound to the server abroad.

Telegram → HTTPS → nginx → Telemt → local Mixed (SOCKS5) → Xray → VPS abroad → Telegram

Your phone connects to the Russian server, and Telemt reaches Telegram through the server abroad. Ordinary 3X-UI client connections continue to use their existing rules. You do not need to install TWPM on the exit server for this setup.

Here, SOCKS5 is an internal intermediate proxy that forwards Telemt connections into Xray. It is not needed on your phone: Telegram connects only to the WEB proxy.

Step 1. Prepare the cascade and Telegram proxy domain

You need:

  • Two VPS instances running 3X-UI AUTO NGINX with a working cascade. The Russian entry server must run Ubuntu 24.04 or 26.04 (x86_64 or ARM64).
  • SSH access with root privileges to the Russian VPS and access to its 3x-ui web panel.
  • An unused domain or subdomain, for example tg-ru.example.com, distinct from the panel, REALITY and Vision domains and other nginx websites.
  • A DNS A record pointing to the public IPv4 of the Russian entry VPS, not the server abroad. If an AAAA record exists, verify that it points to the same server. For direct connectivity through Cloudflare, choose DNS only (gray cloud).
  • Externally reachable TCP/80 for certificate issuance and TCP/443 for the WEB proxy. TWPM does not change firewall settings itself.
  • A Telegram app version supporting WEB proxies.

Open the Russian VPS panel. Under Xray Configs → Outbounds, verify that cascade-exit exists. This outbound to the server abroad is created by the manager when configuring Cascade. If it is missing or Cascade does not work, finish setting up the cascade first.

Perform all subsequent steps only on the Russian entry server.

Step 2. Create a local Mixed inbound

Perform these steps in the Russian entry VPS panel. Save a Backup before editing. Applying Xray changes may briefly interrupt active connections.

An unauthenticated SOCKS5 proxy must be local only

Specify the address 127.0.0.1. Do not leave it empty or use 0.0.0.0, :: or a public IP address. Do not open the selected port in UFW or your provider's firewall. Otherwise, strangers could use the proxy without a password.

  1. Open Inbounds and create a new inbound.
  2. In the main settings tab, enter:

    Field Value
    Enable Yes
    Remark TWPM-SOCKS
    Protocol mixed
    Listen address 127.0.0.1
    Port 10808 (example of an unused port)
    Auth noauth
    UDP Disabled
    Exclude from subscriptions Enabled, if the field is available

    Mixed accepts SOCKS5 and HTTP proxy connections on the same port. Telemt uses only SOCKS5. If port 10808 is already in use, choose another free port and use it consistently in the remaining steps.

  3. Leave other settings at their defaults. You do not need to enable sniffing separately: the routing rule selects this inbound by tag.

  4. Click Create. Make sure the inbound appears in the list and is enabled.

Connect to the Russian VPS via SSH. If you logged in as a regular user, run sudo -i on the VPS. Keep this SSH session open for the following checks.

On the Russian VPS as root, run:

ss -ltnp 'sport = :10808'

The local address must be 127.0.0.1:10808, not 0.0.0.0:10808 or [::]:10808. If the address differs, correct it in the panel before continuing.

Step 3. Route all Mixed traffic through cascade-exit

In the Russian VPS panel, open Xray Configs → Routing → Routing. Add a separate rule using the button above the table.

Field Value
Enable Yes
Remarks TWPM - EXIT
Inbound tags Select the actual tag of the Mixed inbound you created (identified by the TWPM-SOCKS remark)
Outbound tag cascade-exit
Balancer tag Empty
Domain, IP, Port, User and other conditions Empty

The inbound tag is Xray's internal connection identifier and does not necessarily match its remark. Select the existing inbound from the list.

Click Create. Move the new rule above the general CASCADE - RU, CASCADE - RU2 and CASCADE - EXIT rules, as well as other broad rules that could catch traffic from this Mixed inbound. Keep the service API and internal-address protection rules. Click the main Save button in the Xray configuration.

Xray applies the first matching rule. We do not specify Telegram geodata or individual IP addresses: the rule applies only to the inbound we created and routes all of its ordinary external traffic to the server abroad. There is therefore no need to change Russian exceptions for other users.

If you already have a cascade balancer, you can select its existing tag instead of the outbound. Fill in only one of these fields.

Step 4. Test SOCKS5 before installing TWPM

On the Russian VPS as root, run:

curl --noproxy '' --proxy socks5h://127.0.0.1:10808 --connect-timeout 10 --max-time 30 https://api.ipify.org

With ordinary direct egress from the VPS abroad, the command should show its public IP. If the exit uses another proxy, the result reflects that proxy's address.

If the IP does not match your expected exit, check the inbound tag and rule order. TWPM itself will check access to the Telegram API through SOCKS5 during installation.

Step 5. Install TWPM on the Russian VPS

In the open SSH session on the Russian entry VPS as root, download and launch the latest 3X-UI manager:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Do not choose 3X-UI Installation: we do not need to change the existing stack.

Choose 1. English, then 4. Telegram Web Proxy Manager.

The first time you open it, you will see this prompt:

Would you like to proceed with installing Telegram Web Proxy Manager? [Y/n]:

Press Enter or type y to continue. A separate manager opens. When asked to choose a language, select English, then 1. Install Telegram proxy.

Answer the following questions.

If Certbot detects multiple Let's Encrypt accounts, select the appropriate one. A single existing account is used automatically.

TWPM prompt What to enter
WEB domain Your prepared Russian VPS domain, for example tg-ru.example.com
Public IPv4 Enter if the suggested address matches the Russian VPS's public IPv4 and DNS A record. Otherwise, enter it manually
Use SOCKS5 upstream? [y/N] Y
SOCKS host [127.0.0.1] Enter (keep 127.0.0.1)
SOCKS port 10808 or the other port you chose when creating Mixed

The manager checks access to the Telegram API through the specified SOCKS5 proxy, obtains a certificate, configures nginx, installs Telemt and creates the website. After successful installation it displays a ready-to-use tg://webproxy?… link.

  1. Open the provided tg://webproxy?… link on a device with WEB support. Confirm adding the proxy and enable it in Telegram.
  2. Verify that Telegram connects: send a message, open a channel and load media.
  3. Open the Russian VPS's TWPM domain in an ordinary browser over HTTPS. A multi-page website with a valid certificate should load.
  4. Check that your previous 3X-UI connections and Cascade still work.

Do not publish the link

The WEB link contains a secret that grants access to your proxy. Store it securely. This is a separate Telegram link, not a 3X-UI subscription.

Done. Telegram connects to the Russian VPS over HTTPS, and Telemt reaches Telegram servers through the local SOCKS5 proxy and the cascade's exit abroad.


Maintain an installed Telegram proxy

For ordinary maintenance, connect via SSH and run sudo -i if necessary. Download the latest manager on the VPS as root:

curl -fSL https://github.com/xPROMSx/3x-ui-auto-nginx/releases/latest/download/x-ui-latest.sh -o x-ui-latest.sh && bash x-ui-latest.sh

Choose 4. Telegram Web Proxy Manager. This option downloads the latest version of the separate TWPM manager, but does not update Telemt itself. Use option 2 in the TWPM menu to update the engine.

If GitHub is unavailable and TWPM is already installed, you can launch the local manager on the VPS as root:

telegram-web-proxy-manager

In the English menu:

Option Purpose
1. Install Telegram proxy New installation or check an existing one
2. Update Telemt Check and safely update the engine
3. Check status Check the current installation
4. Check and restart services Validate configuration, restart Telemt and reload nginx
5. Show connection link Display the secret link again
6. Uninstall Telegram proxy Remove it after confirmation
0. Exit Close the manager

If Telegram stops connecting, first check its status using option 3. In the cascade setup, repeat the SOCKS5 test and then check the website in a browser. Do not reinstall the entire 3X-UI stack to fix a Telegram proxy.

Backup and VPS migration

TWPM is maintained separately. 3X-UI Backup v3 does not replace a backup of Telemt's own data. Full 3X-UI Restore on a server with TWPM installed is blocked to avoid overwriting its nginx configuration. Before Restore, save the necessary TWPM data separately and follow the manager's instructions for uninstalling TWPM; reinstall it afterwards. A fresh TWPM installation changes the Telegram link.

If you no longer need SOCKS5, uninstall TWPM through its standard menu first (if you are removing the proxy), then delete only your TWPM - EXIT rule and TWPM-SOCKS inbound in the panel, and save the Xray configuration. Do not delete the general cascade rules or unrelated connections.

The main outbound and routing configuration forms were checked against 3x-ui 3.12.0 source code, and the TWPM menu against v1.3.5 documentation, on November 30, 2026. The appearance of the forms may differ; verify that the configuration works on your own VPS.

Attribution and use of materials

© 2026 xPROMSx contributors · 3X-UI AUTO NGINX

Our material may be copied and distributed under the GNU GPL-3.0-only license, provided the attribution and link to the original are retained.

Original source: https://xpromsx.github.io/3x-ui-auto-nginx/guides/telegram-web-proxy/

Terms of use for project materials