A modified version of Telegram Web A with built-in WebSocket proxy support for regions where Telegram access is restricted.
Source: github.com/PBhadoo/telegram-tt
- 🌐 Proxy Support — Connect through a WebSocket proxy (Cloudflare Workers / custom domain) when Telegram is blocked
- 📝 Proxy Settings on Login Page — Toggle proxy on/off and enter your proxy domain before logging in
- 🔗 Any Proxy Domain — Supports
*.workers.dev, custom domains, or any valid proxy hostname - 🏷️ Renamed to "Telegram Web A (MOD)" to avoid confusion with the official client
Browser (GramJS) → wss://your-proxy-domain/pluto.web.telegram.org/apiws → Telegram Server
- User enables proxy and enters their proxy domain on the login page
- All Telegram WebSocket connections are automatically rewritten to route through the proxy
- The proxy bridges traffic bidirectionally: Browser ↔ Proxy Worker ↔ Telegram
Proxy Server: Deploy your own using TG-WS-API (Cloudflare Workers + Durable Objects)
- Fork this repo
- Go to Cloudflare Pages → Create a project → Connect to Git
- Select your forked repo and configure:
| Setting | Value |
|---|---|
| Framework preset | None |
| Build command | npm run build:production |
| Build output directory | dist |
| Node.js version | 22 (set via Environment Variable NODE_VERSION = 22) |
- Add Environment Variables:
| Variable | Value | Required |
|---|---|---|
TELEGRAM_API_ID |
Your API ID from my.telegram.org | ✅ Yes |
TELEGRAM_API_HASH |
Your API Hash from my.telegram.org | ✅ Yes |
NODE_VERSION |
22 |
✅ Yes |
APP_TITLE |
Telegram Web A (MOD) |
Optional |
BASE_URL |
Your Pages URL (e.g. https://tg.yourdomain.com/) |
Optional |
PROXY_URL |
Default proxy domain (e.g. tg-ws-api.example.workers.dev) |
Optional |
💡
PROXY_URL: If set, proxy is auto-enabled for all users with this domain as default. Users can still override or disable it on the login page. Leave empty to let users configure it themselves.
- Click Save and Deploy
# Clone
git clone https://github.com/PBhadoo/telegram-tt.git
cd telegram-tt
# Setup
cp .env.example .env
# Edit .env and add your TELEGRAM_API_ID and TELEGRAM_API_HASH
npm i
# Build
npm run build:production
# Output is in ./dist — deploy this folder to CF Pages
npx wrangler pages deploy dist --project-name=your-project-name| Command | Description |
|---|---|
npm run build:production |
Production build |
npm run build:dev |
Development build |
npm run dev |
Local dev server (port 1234) |
Build output directory: dist
You also need a WebSocket proxy server. Deploy TG-WS-API:
Once deployed, enter your worker domain (e.g. tg-ws-api.your-account.workers.dev or your custom domain) in the proxy settings on the login page.
cp .env.example .env
# Add TELEGRAM_API_ID and TELEGRAM_API_HASH from https://my.telegram.org
npm i
npm run devOpen http://localhost:1234
This is a fork of the official Telegram Web A which won first prize 🥇 at the Telegram Lightweight Client Contest. It's fully based on Teact framework and uses GramJS for MTProto.