Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Flowseal/tg-ws-proxy/llms.txt

Use this file to discover all available pages before exploring further.

TG WS Proxy (v1.7.1) is a local MTProto proxy that bridges Telegram Desktop traffic over WebSocket connections, improving connectivity in restricted networks. It runs entirely on your own machine — no third-party servers required. Follow the steps below to install, launch, and connect Telegram Desktop in under two minutes.

Install & Launch

1

Download or install TG WS Proxy

Windows builds are occasionally flagged as false positives by antivirus software due to the PyInstaller packer used to bundle the application. If your antivirus blocks the download or prevents the executable from running, add the file to your antivirus exclusions and re-download. You can inspect all detections on VirusTotal and verify that no major antivirus engine flags it. Alternatively, download the Windows 7 build — it is functionally identical and is typically flagged less often.
Go to the GitHub Releases page and download the appropriate binary:
FileRequirement
TgWsProxy_windows.exeWindows 10 or later
TgWsProxy_windows_7_64bit.exeWindows 7 x64
TgWsProxy_windows_7_32bit.exeWindows 7 x32
Double-click the downloaded .exe to launch. On first run an instruction window opens automatically. The application then minimises to the system tray.
2

Connect Telegram Desktop

Once the proxy is running, point Telegram Desktop at it using one of the two methods below.Option 1 — Automatic (recommended)Right-click (or click) the TG WS Proxy tray icon and choose Open in Telegram. Telegram Desktop opens with the proxy pre-configured and asks you to confirm the connection. Click Enable and you are done.If Telegram does not open automatically:
  1. Choose Copy Link from the tray menu.
  2. Paste the link into your Saved Messages chat in Telegram and click it.
  3. Confirm the connection prompt.
Option 2 — Manual
  1. Open Telegram Desktop and go to Settings → Advanced → Connection Type → Use custom proxy.
  2. Click Add proxy and fill in the fields:
FieldValue
TypeMTProto
Server127.0.0.1
Port1443
SecretCopy from the proxy tray menu (Settings) or from the log file
  1. Click Save and then Enable.
3

Verify the connection

After enabling the proxy, Telegram Desktop shows a green connection indicator in the connection type settings. You can also inspect the proxy log to confirm traffic is flowing:
  • Tray app: right-click the tray icon and choose Open Logs.
  • CLI mode: logs are printed to stderr by default. Add --log-file proxy.log to write them to a file.
A successful session looks like this in the log:
12:34:56  INFO   [127.0.0.1:54321] DC2 -> pool hit via 149.154.167.220
12:34:57  INFO   [127.0.0.1:54321] DC2 WS session closed: ^1.2KB (3 pkts) v18.4KB (12 pkts) in 2.3s
If you see WS connect failed lines followed by fallback, the primary WebSocket path is blocked in your network and the proxy has automatically switched to a Cloudflare-proxied fallback — this is expected behaviour and connections will still work.
Enable verbose logging with the -v flag (tg-ws-proxy -v) or via Settings → Verbose logging in the tray app to see full handshake details and per-DC pool activity.

Next Steps

CLI Reference

All command-line flags, environment variables, and configuration options for the headless proxy.

Cloudflare Proxy

Set up your own Cloudflare-proxied domain for the fallback chain to bypass stricter blocks.

Cloudflare Worker

Deploy a free Cloudflare Worker to proxy WebSocket traffic to Telegram DCs.

Fake TLS Setup

Configure the ee-secret mode with SNI masking and an Nginx upstream for maximum stealth.

Build docs developers (and LLMs) love