Network paths can fail differently
Direct WebSocket, Cloudflare Proxy, Cloudflare Worker, and direct TCP do not have the same availability on every network. A single fixed route is not sufficient for all Wi-Fi and mobile environments.
> android / local Telegram proxy
A local Telegram proxy with MTProto and SOCKS5 frontends and multiple network routes.
TgWsProxy Android listens locally on the device, lets Telegram connect through MTProto Proxy or SOCKS5 compatibility mode, and delegates outbound routing to a native Go runtime. The primary v1.10.13 path is MTProto Proxy → Cloudflare Proxy on 127.0.0.1:1443.



> context
It is a Telegram-specific local proxy, not a system-wide VPN. Only traffic that Telegram sends to the configured local proxy is handled by the application.
Direct WebSocket, Cloudflare Proxy, Cloudflare Worker, and direct TCP do not have the same availability on every network. A single fixed route is not sufficient for all Wi-Fi and mobile environments.
Telegram connects to a local MTProto or SOCKS5 frontend. Android ProxyService keeps the foreground service alive, while the Go runtime applies per-network route policy and chooses only routes allowed by that policy.
> capabilities
The stable release combines a local Telegram frontend, route policy, diagnostics, lifecycle handling, and safe update/feedback flows.
Primary local frontend with Telegram proxy-link generation and Fake TLS secret formats.
Compatible SOCKS5/WebSocket frontend remains available for manual Telegram proxy configuration.
Separate allowed and preferred routes for Wi-Fi, mobile data, and unknown network profiles.
Recommended cf_proxy_ws route through Cloudflare proxy domains and WebSocket transport.
Optional direct_ws path to Telegram WebSocket endpoints when the network allows it.
Optional cf_worker_ws route through a user-configured Cloudflare Worker, including worker failover logic.
Optional direct TCP route to Telegram data-center IPs on port 443 when policy permits it.
Route probes, runtime status, masked reports, logging controls, watchdog, and route truth in the UI.
GitHub Issue Forms without an embedded PAT, plus official GitHub Releases checks without silent APK install.
$ routing
Frontend protocol and outbound route are separate concepts. The runtime reports the actual route kind rather than reducing everything to “WebSocket”.
> interface
Current screenshots from the project's repository.







$ architecture
Kotlin/Compose handles UI and Android lifecycle; the native Go runtime owns proxy protocols and route execution.
Jetpack Compose main/settings screens, Feedback and Updates, language/theme and diagnostics.
Local MTProto Proxy or SOCKS5 frontend on the shared configurable port, default 1443.
Android ProxyService foreground service, notifications, watchdog and network-change reconfiguration.
JNA/CGO bridge between Kotlin and native libtgwsproxy.so.
Go listener, MTProto transforms, Fake TLS, WebSocket receive path, route chains and pools.
cf_proxy_ws, direct_ws, cf_worker_ws and tcp_fallback filtered by NetworkRoutePolicy.
> engineering
Several constraints are deliberate because they keep route selection observable and predictable.
cf_proxy_ws and direct_ws both use WebSocket transport, but the UI and diagnostics keep them as different route kinds.
Android emits route tokens for the current network profile; the Go runtime must not select a route disabled by the active policy.
v1.10.13 reassembles continuation frames and limits individual and accumulated messages to 16 MiB.
Worker failover and session-pool behavior are regression-tested to avoid duplicate connection/refill work.
Android requires a foreground notification while the proxy is active; notification modes can be compact, not completely hidden.
The app checks official releases and opens the validated release page. Download and installation remain under user and Android control.
> technology
> privacy
LOCAL PROXYThe application receives connections that Telegram explicitly sends to its local proxy frontend. Runtime collection and persistent file logging are disabled by default.
> security
SECURITY BOUNDARIESSensitive values are masked where supported, release signing material stays outside Git, and feedback does not automatically attach runtime logs, proxy credentials, Telegram data, IP addresses, or secrets.
> lineage
This Android implementation started from amurcanov/tg-ws-proxy-android and uses Flowseal/tg-ws-proxy as the reference upstream for the proxy runtime and WebSocket routing concepts. Android-specific lifecycle, route policy, Fake TLS, watchdog, diagnostics, UI and release work are maintained in this fork.
$ stable_release
The stable v1.10.13 release was published on 25 August 2026 after manual Android acceptance and signed-release verification.
D419874BF8C5EAB4E6AB5EDE3CCF2013583314A5AA7E089D79E158145892233A> project links
GitHub remains the source of truth for code, releases, issues, upstream lineage and technical documentation.