tg-ws-proxy README

The project's README from github.com/Flowseal/tg-ws-proxy. As one markdown file: README.md.

🇷🇺 Русский • 🇬🇧 English


tgwsproxy

[!TIP]

🎉 Поддержать меня

USDT (TRC20): TXPnKs2Ww1RD8JN6nChFUVmi5r2hqrWjuu
BTC: bc1qr8vd6jelkyyry3m4mq6z5txdx4pl856fu6ss0w
ETH: 0x1417878fdc5047E670a77748B34819b9A49C72F1

[!CAUTION]

Реакция антивирусов

Антивирусы часто ошибочно помечают приложение как вирус из-за упаковщика.
Если вы не можете скачать из-за блокировки антивирусом, то:

  1. Попробуйте скачать версию для Windows 7 (по функциональности она не отличается)
  2. Отключите антивирус на время скачивания, добавьте файл в исключения и включите обратно

Всегда проверяйте, что скачиваете из интернета, тем более из непроверенных источников. Всегда лучше смотреть на детекты широко известных антивирусов на VirusTotal

TG WS Proxy

Локальный MTProto-прокси для Telegram Desktop, который ускоряет работу Telegram, перенаправляя трафик через WebSocket-соединения. Данные передаются в том же зашифрованном виде, а для работы не нужны сторонние серверы.

Навигация

Windows: быстрый вход

Перейдите на страницу релизов и скачайте:

При первом запуске откроется окно с инструкцией по подключению Telegram Desktop. Приложение сворачивается в системный трей.

Меню трея

Настройка Telegram Desktop

Автоматическая настройка

Щелкните правой кнопкой мыши по значку в трее и выберите «Открыть в Telegram».

Если не сработало (Telegram не открылся с подключением), выполните шаги ниже:

  1. Щелкните правой кнопкой мыши по значку в трее и выберите «Скопировать ссылку»
  2. Отправьте ссылку в «Избранное» в Telegram и нажмите по ней левой кнопкой мыши
  3. Подключитесь

Ручная настройка

  1. Telegram → Настройки → Продвинутые настройки → Тип подключения → Прокси
  2. Добавьте прокси:
    • Тип: MTProto
    • Сервер: 127.0.0.1 (или переопределенный вами)
    • Порт: 1443 (или переопределенный вами)
    • Secret: из настроек или логов

Как это работает

Telegram Desktop → MTProto Proxy (127.0.0.1:1443) → WebSocket → Telegram DC
  1. Приложение поднимает MTProto прокси на 127.0.0.1:1443
  2. Перехватывает подключения к IP-адресам Telegram
  3. Извлекает DC ID из MTProto obfuscation init-пакета
  4. Устанавливает WebSocket-соединение (TLS) к соответствующему DC через домены Telegram
  5. Если WS недоступен (302 redirect) — автоматически переключается на CfProxy / прямое TCP-соединение

[!IMPORTANT]

Не грузит фото/видео?

Удалите в настройках прокси в DC → IP всё, кроме 4:149.154.167.220
Если это не помогло, полностью очистите это поле
Подобная проблема встречается на аккаунтах без Premium
Если это не помогло, настройте собственный домен по инструкции: CfProxy.md

Автоматическая сборка

Проект содержит спецификации PyInstaller (packaging/windows.spec, packaging/macos.spec, packaging/linux.spec) и GitHub Actions workflow (.github/workflows/build.yml) для автоматической сборки.

Минимально поддерживаемые версии ОС для текущих бинарных сборок:

Контрибьюторы

Спасибо всем, кто помогает развивать проект ❤️

Лицензия

MIT License

tg-ws-proxy (Flowseal/tg-ws-proxy)

Searching Database…

What is this?TG WS Proxy is a local MTProto proxy for Telegram Desktop that speeds up or partially bypasses Telegram's blocking by routing traffic through WebSocket (TLS) connections, without relying on any third-party servers.
Is this a command-line tool or a desktop app with a GUI?It is a desktop app that runs as a tray application with a GUI settings editor; it minimizes to the system tray after launch and lets you open or configure Telegram directly from the tray menu.
How do I get it running?Download the prebuilt binary for your OS from the Releases page (separate builds for Windows 10+ x64/ARM64, Windows 7 x64/x32, Intel macOS, Apple Silicon macOS, and Linux x86_64) or run it via Docker, then right-click the tray icon and choose 'Open in Telegram' to auto-configure Telegram Desktop.
Do I need any accounts, API keys, or external servers?No — the proxy works without any third-party servers; you just need Telegram Desktop installed. On Linux, the system tray icon requires AppIndicator support.
Does photo and video loading always work through the proxy?Not always. If media fails to load, remove every DC→IP entry in the proxy settings except '4:149.154.167.220', or clear the field entirely; this issue is more common on accounts without Telegram Premium.
Which Windows and macOS versions are supported?Windows 10+ x64/ARM64 and Windows 7 x64/x32 builds are provided, along with Intel macOS 10.15+, Apple Silicon macOS 11.0+, and Linux x86_64 (with AppIndicator for the tray icon).
Where does my Telegram traffic actually go?Traffic stays encrypted the same way normal MTProto traffic is, and no third-party servers are used — connections go through WebSocket/TLS directly to Telegram's own datacenter domains, with an optional Cloudflare-based fallback.
How does the proxy technically get around Telegram blocking?It extracts the DC ID from the MTProto obfuscation init packet, then opens a WebSocket (TLS) connection to Telegram's own domain for that datacenter; if the WebSocket connection is blocked (302 redirect), it automatically falls back to CfProxy or a direct TCP connection.
What is CfProxy?CfProxy is an optional Cloudflare-based fallback path (with instructions for a free Cloudflare Worker alternative or your own Cloudflare domain) used when direct WebSocket connections to Telegram get blocked.
Why does antivirus software flag the download as a virus?Many antivirus engines falsely flag the packed executable; the README suggests trying the Windows 7 build instead, or temporarily disabling your antivirus and whitelisting the file while verifying it on VirusTotal.
Can I test the proxy against Telegram's test datacenters?Yes, the README includes a dedicated guide for configuring a Telegram test environment with test DCs, useful for development and troubleshooting.
Creator
Flowseal
Size
2.4 MB
Stars
10.6K
Age
7mo
Commits · 90 Days