Skip to content
Projects

About

Нативный высокопроизводительный MTProto & Cloudflare WebSocket прокси-сервер для локального проксирования трафика Telegram через CloudFlare

Web & App Development

How these counts are measured

Measured star growth

in 24h
+2
in 7 days
+10
in 15 days
+44
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README_EN.md

Original
Mirrly TG Proxy Logo

Mirrly TG Proxy for Android

Local Telegram routing gateway powered by the native Rust engine (mirrlyengine), with MTProto and SOCKS5 support


🇷🇺 Русский  |  🇬🇧 English  |  🇮🇷 فارسی


Android Kotlin Compose Rust Cloudflare NDK
Release Language Genesis Downloads Stars Closed Issues Issues
Telegram Privacy Worker Script Auto-Deploy Changelog Terms License

Telegram traffic routing powered by the native mirrlyengine core (Rust/Tokio). Supports MTProto and SOCKS5, network stabilization, bounded flow control, and secure preflight diagnostics. Runs locally on the device without root privileges and without creating a system VPN tunnel.


github contribution grid snake animation

Table of Contents

  1. About Mirrly TG Proxy
  2. How It Works
  3. Uplink Modes
  4. Key Features & Architecture Modules
  5. System Architecture
  6. Supported Telegram Clients
  7. Application UI
  8. Quick Start & Installation
  9. Configuration & Parameters
  10. Cloudflare Worker Setup & Deployment
  11. Project Structure & Building from Source
  12. Development Activity Graph
  13. Star History
  14. Project Roadmap & Chronology
  15. Security and Terms of Use
  16. Acknowledgements & Hall of Fame

1. About Mirrly TG Proxy

Mirrly TG Proxy is a free and open-source Android application serving as a high-performance local proxy gateway for Telegram traffic. The application addresses unstable connectivity, protocol throttling, media download slowdowns, and DPI filtering imposed by ISPs and mobile carriers.

The app does not use the system VpnService for routing Telegram and does not intercept third-party device traffic. Telegram connects to a local socket on the device (127.0.0.1:1443 for MTProto or 127.0.0.1:10808 for SOCKS5) handled by the native mirrlyengine core (Rust/Tokio) and relayed through Cloudflare Edge Anycast or a Cloudflare Worker.

System VPN Mode: Simple VPN mode supports Cloudflare WARP via AmneziaWG (AWG) and custom imported WireGuard profiles. Local Telegram proxying via MTProto (port 1443) and SOCKS5 (port 10808) operates independently.


Feature Status & Maturity Levels

1. Production-Ready Features (Stable)

  • Dual Local Protocols for Telegram:
    • MTProto (port 1443): FakeTLS domain masquerading (ee / dd), persistent connection pool (WsPool), and direct interaction with Anycast CDN.
    • SOCKS5 (port 10808): Transparent TCP relay with username/password subnegotiation (RFC 1928 / RFC 1929), domain name resolution, IPv4/IPv6 support, and voice/video calls.
  • Stable Uplink Mode:
    • WORKER: Tunneling via Cloudflare Worker over WebSocket TLS 1.3 on port 443 with Anti-Open-Relay security rules.
  • Networking & Stability Core:
    • Telegram DC-Affinity Engine: Direct session routing to Telegram DCs (DC1–DC5) preventing repeated cryptographic handshakes.
    • Trust Policy & Node Isolation: Isolation of private VPS configurations from public relay fallback (allowPublicRelayFallbackForPrivateVps).
    • Discrete FSM Network State Machine: Three-stage state machine (NORMAL, DEGRADED, RECOVERING) with anti-flapping filters (5–10s hysteresis, 30–60s cooldown).
    • Network Generation Guard: Epoch-based socket and DNS cache invalidation during network switches (Wi-Fi ↔ Cellular).
    • Bounded Flow Control: 4 MB write buffer in JS Worker and Rust core with watermark backpressure (prevents WebSocket 1009 frame errors during high-volume media transfers).
    • Smart Connect: 2–3 second preflight diagnostic check before establishing connections.
  • UI, Customization & Localization:
    • VPN Rework Notice: In-app warning banner in VPN mode with dismissal state persistence and direct navigation to the protocol guide.
    • Custom Photo & Video Wallpapers: Support for custom background images and looping MP4 videos underneath the MirrlyUI outline system (Zero Background).
    • Local Diagnostic AI Chat (AI Chat): Built-in analysis of system event logs and network parameters without sending private data to external servers.
    • Dual-Level Settings: Simple Mode for standard usage and Advanced Mode for socket tuning (TCP_NODELAY, socket buffers, TLS).
    • Full Trilingual Support: Complete Russian, English, and Persian (Farsi) localizations with native RTL layout support, plus per-app language selection on Android 13+ (locales_config).
    • Onboarding Wizard: Step-by-step introduction for first-time users.
    • Official Telegram Channel: Integrated screen for project community updates (@WhyOkyHb).
    • Safe Diagnostic Report: Monospace report generator with automatic token, password, and private domain redaction (Zero Secret Leak).
    • Error Taxonomy: User-friendly localization and machine-readable error codes for logs.
    • Cryptographic Integrity Verification: Native C++ NDK signature validation (SignatureVerifier) and automated SHA-256 hash checks via UpdateChecker.

2. In Development

  • In-App Speed Test (TunnelSpeedTestScreen): Built-in throughput and Telegram DC benchmark module.

2. How It Works

The application operates two independent local gateways powered by the native mirrlyengine (Rust/Tokio):

Pipeline 1: MTProto Gateway (127.0.0.1:1443) — Direct Anycast CDN Tunneling

  1. The Telegram client connects to 127.0.0.1:1443 using the MTProto FakeTLS protocol (with an ee / dd secret key).
  2. The native mirrlyengine core performs FakeTLS demultiplexing, extracting the destination Telegram Data Center (DC1–DC5) and stream type (messages or media).
  3. The WsPool connection pool borrows or establishes a persistent WebSocket connection to official Telegram Web gateways (kws1..kws5.web.telegram.org:443/apiws) through Anycast CDN.
  4. Edge server selection is handled by the DoH race resolver (dns.rs), Happy Eyeballs (RFC 8305), and the latency-based balancer (balancer.rs).
  5. Zero Worker Quota Consumption: MTProto communicates directly with Telegram Web Anycast CDN edge servers, bypassing Cloudflare Workers and consuming 0 requests from daily worker quotas.

Pipeline 2: SOCKS5 Gateway (127.0.0.1:10808) — Multi-Uplink Route Supervisor

  1. The Telegram client connects to 127.0.0.1:10808 via standard SOCKS5 with mandatory RFC 1929 authentication (username/password).
  2. Supported commands:
    • CONNECT (0x01): Proxies TCP streams for chats, channels, bots, and media downloads;
    • UDP ASSOCIATE (0x03): Tunnels UDP datagrams for Telegram VoIP audio and video calls.
  3. The dispatcher relays the stream through Cloudflare Worker WSS; VPN uplinks are under development and are not part of this route.

Telegram Calls

Calls are supported only through SOCKS5. Every call participant must have an active proxy with a TCP connection and must enable “Use proxy for calls” in Telegram. Calls can depend on each participant's network and carrier restrictions, so they are not guaranteed to work for everyone. MTProto mode does not support calls.


3. Uplink Modes (SOCKS5 Orchestration)

In SOCKS5 mode, the RouteSupervisor module in mirrlyengine manages the following upstream transports (MTProto uses its dedicated Anycast CDN pool WsPool):

Mode (UplinkMode) Status Protocol & Port Description
WORKER Stable WebSocket TLS 1.3 (:443) Traffic is encapsulated into WebSocket to Cloudflare Worker, where cloudflare:sockets opens direct TCP sockets to Telegram DCs and VoIP reflectors. Protected by Anti-Open-Relay filters.

4. Key Features & Architecture Modules

Network Stabilization & Anti-Flapping (FSM)

  • Discrete Finite State Machine (FSM):
    • NORMAL: Normal latency, zero packet loss, standard socket policy.
    • DEGRADED: Verified radio channel degradation (RTT > 500 ms, jitter > 60 ms, or burst losses).
    • RECOVERING: Smooth stabilization stage following network interface handovers.
  • Hysteresis Window: Profile switches require 5–10 seconds of continuous confirmation to prevent oscillatory switching.
  • Cool-down Period: 30–60 second re-trigger block applied after any configuration adjustment to eliminate routing resonance.

Network Generation Guard

Assigns an incrementing epoch counter (network_generation) to each connection state. When transitioning between Wi-Fi and Cellular networks, obsolete sockets and DNS records from prior epochs are discarded immediately to eliminate stale socket stalls.

Pre-Flight Smart Connect

Performs a fast 2–3 second validation sequence upon activation:

  1. Fast validation of DoH and system DNS resolvers;
  2. Reachability verification of uplink endpoint pools;
  3. Selection of the lowest-latency, least-loaded node;
  4. Real-time stage indication in the UI ("Optimizing route...").

Dual-Level Settings (Simple vs Advanced UX)

  • Simple Mode (Default): Clean interface focused on core preferences: proxy mode (MTProto / SOCKS5), uplink selector, sleep timer, scheduler, auto-start on boot, language, and theme.
  • Advanced Mode: Toggleable socket tuning for TCP_NODELAY, buffers, WebSocket pool capacity, and Happy Eyeballs parameters.

Secure Diagnostic Report (Zero Secret Leak)

  • Monospace configuration report generation via DiagnosticReportScreen.
  • Strict Redaction: Automated masking of SOCKS5 passwords, authentication tokens, WireGuard private keys ([REDACTED]), private IPs, and worker subdomains (***.workers.dev).
  • One-click export to clipboard or system ShareSheet for GitHub Issue submissions.

Error Taxonomy

  • User Layer (UI & Notifications): Contextual descriptions in the selected language ("Worker daily quota exceeded", "DNS server unreachable", "Mobile data disconnected").
  • Engineering Layer (Report & Logs): Machine-readable error codes:
    • WORKER_QUOTA_EXCEEDED — Cloudflare Free tier limit reached (HTTP 429, 1015, 1027);
    • DNS_RESOLUTION_UNAVAILABLE — Domain resolution failure;
    • SOCKS5_AUTH_REJECTED — RFC 1929 authentication error;
    • CLOUDFLARE_EDGE_BLOCKED — Upstream TCP reset at carrier DPI level;
    • NETWORK_INTERFACE_DOWN — All device network interfaces offline.

Bounded Flow Control for High-Bandwidth Media

  • 4 MB write buffer limit in JS Worker and Rust core (MAX_PENDING_WRITE_BYTES = 4 * 1024 * 1024).
  • Asynchronous FIFO queue processing for Blob and ArrayBuffer chunks.
  • Full protection against WebSocket frame disconnects (code 1009) during concurrent media and video uploads.

Deep Dormancy & Battery Guard

  • Deep Dormancy: Upon total network loss (Airplane mode, no signal), the service closes active sockets and suspends periodic DoH and ping cycles, instantly resuming when connectivity returns.
  • Battery Guard: Configurable auto-shutdown when battery drops below a specified threshold (5%, 10%, 15%, 20%, 25%) or Android enters power saver mode while disconnected from power.

SOCKS5 RFC 1928 / RFC 1929 Authentication

  • Native username/password subnegotiation implemented directly in mirrlyengine.
  • Mandatory credential setup dialog on first SOCKS5 launch to prevent open proxy exposure.
  • Instant connection links: tg://socks?server=127.0.0.1&port=10808&user=...&pass=....

5. System Architecture

flowchart TD
    subgraph ClientLayer ["1. Telegram Clients on Device (Android)"]
        TG_MTProto["Telegram Client (MTProto)<br/>Port 1443 (FakeTLS ee/dd)"]
        TG_SOCKS5["Telegram Client (SOCKS5)<br/>Port 10808 (TCP / UDP VoIP)"]
    end

    subgraph NativeCore ["2. Native mirrlyengine Core (Rust / Tokio Runtime)"]
        subgraph GatewayMTProto ["MTProto Gateway (Port 1443)"]
            FakeTLS["FakeTLS Demux<br/>DC1-DC5 Target Extraction"]
            WsPool["WsPool (Persistent WebSocket Pool)<br/>Zero-Copy Streaming"]
            FakeTLS --> WsPool
        end

        subgraph GatewaySocks ["SOCKS5 Gateway (Port 10808)"]
            SocksAuth["SOCKS5 Server (RFC 1928 / RFC 1929 Auth)<br/>TCP CONNECT / UDP ASSOCIATE"]
            Supervisor["RouteSupervisor (Uplink Dispatcher)<br/>Trust Policy & Node Independence"]
            SocksAuth --> Supervisor
        end

        subgraph SharedSubsystems ["Shared Native Subsystems"]
            FSM["Discrete Network FSM (NORMAL / DEGRADED / RECOVERING)"]
            GenGuard["Network Generation Guard (Epoch Isolation)"]
            DoH["DoH Race Resolver (1.1.1.1 / 8.8.8.8 / 9.9.9.9)"]
            FlowCtrl["Bounded Flow Control (4 MB Buffer & Backpressure)"]
        end

        WsPool -.-> SharedSubsystems
        Supervisor -.-> SharedSubsystems
    end

    subgraph Uplinks ["3. Uplink Transports"]
        Uplink_Anycast_Direct["Anycast CDN Flowseal<br/>(kws1..kws5.web.telegram.org:443)<br/>Zero Cloudflare Worker Quota"]
        Uplink_Worker["Cloudflare Worker WSS<br/>(Private Worker / Developer Pool)<br/>cloudflare:sockets API"]

        WsPool ===>|Direct MTProto WSS| Uplink_Anycast_Direct
        Supervisor -->|WORKER Mode| Uplink_Worker
    end

    subgraph Infrastructure ["4. External Network Infrastructure"]
        CF_CDN["Cloudflare Anycast CDN Edge<br/>(300+ PoPs worldwide)"]
        CF_Worker_Runtime["Cloudflare Worker Edge Runtime<br/>(TCP Sockets via cloudflare:sockets)"]

        Uplink_Anycast_Direct --> CF_CDN
        Uplink_Worker --> CF_Worker_Runtime
    end

    subgraph TelegramCloud ["5. Telegram Server Infrastructure"]
        TG_DC["Telegram Data Centers (DC1 - DC5)<br/>Chats, Channels, Media"]
        TG_VoIP["Telegram VoIP Reflectors<br/>Voice & Video Calls"]

        CF_CDN -->|Direct Web TCP Socket| TG_DC
        CF_Worker_Runtime -->|Secure TCP Socket| TG_DC
        CF_Worker_Runtime -->|VoIP TCP/UDP Relay| TG_VoIP
    end

6. Supported Telegram Clients

The app automatically detects installed Telegram clients and enables one-click configuration:

  • Official Clients: Telegram, Telegram X
  • Advanced Clients: AyuGram, NekoGram, Nagram, ExteraGram, Plus Messenger
  • Third-Party Clients: Cherrygram, Nicegram, iMe Messenger, Telegraph, MDGram, Dahl, Litegram, Nullgram, ForkClient, BifToGram

7. Application UI

The user interface is built with Jetpack Compose featuring adaptive layouts (AdaptiveLayoutHelper) and trilingual localization (Russian, English, and Persian/Farsi) with native RTL support:

  • Home Screen (HomeScreen): Master toggle button, real-time connection status, quality circle ring, MTProto/SOCKS5 mode switch, one-click "To Telegram" button, and concise route status badge (Cloudflare WSS · Protected).
  • Settings Screen (SettingsScreen):
    • Simple Mode: Proxy protocol selection, uplink selector, sleep timer, schedule timer, boot autostart, language selector, and theme.
    • Advanced Mode: Socket tuning (TCP_NODELAY), buffer sizes, and WebSocket pool capacity.
  • Onboarding Screen (OnboardingScreen): Step-by-step introductory wizard for new users with instant language switching (RU, EN, FA) and freeze-free gesture handling on Samsung and Huawei devices.
  • Official Telegram Channel (TelegramChannelScreen): Community screen with direct link to @WhyOkyHb.
  • Worker Manager (WorkerManagerScreen): Cloudflare worker list with latency probes, status codes (including HTTP 429), CameraX + Google ML Kit QR scanner, and transparent styling in Share tab for quick config sharing.
  • Worker Analytics (WorkerAnalyticsScreen): Interactive Bezier curve of daily Cloudflare quota utilization with touch-scrubber and quota reset countdown (00:00 UTC).
  • Network Diagnostics (NetworkDiagnosticScreen): Comprehensive SQI metric breakdown (0–100%), RTT, jitter, delivery reliability, ITU-T G.107 MOS score, and one-tap access to diagnostic report generation.
  • Diagnostic Report (DiagnosticReportScreen): Safe configuration viewer with automatic secret redaction and one-click GitHub Issue export.
  • Session History (HistoryScreen): Compact two-line connection session log with start time, protocol (MTProto / SOCKS5), connection state, and transferred traffic (RX/TX).
  • Event Log (LogsScreen): Minimalist AMOLED-styled log viewer with line deduplication, level filtering, and file export.
  • Update Screen (UpdateScreen): GitHub API update checker, release changelog viewer, SHA-256 validation, and native NDK signature verification (SignatureVerifier).
  • System VPN Screen (VpnModeScreen): Kinetic UI interface (in-development feature, system tunnel is inactive).
  • Speed Test Screen (TunnelSpeedTestScreen): Tunnel throughput benchmark (preview mode in development).

8. Quick Start & Installation

  1. Download the installation package from the GitHub Releases page.
  2. Select the APK tailored for your device:
    • app-universal-release.apk: Universal build containing native libraries for all architectures (ARM64, ARMv7, x86, x86_64). Guaranteed to work on any device. Recommended for auto-updates.
    • app-arm64-v8a-release.apk: Optimized build for modern 64-bit ARM smartphones and tablets. Smallest file size.
    • app-armeabi-v7a-release.apk: For legacy 32-bit ARM devices.
    • app-x86_64-release.apk: For 64-bit Android emulators (Android Studio, LDPlayer, BlueStacks) and Intel/AMD tablets.
    • app-x86-release.apk: For 32-bit x86 emulators.
  3. Install the APK on your Android device (Android 8.0 / API 26 or higher).
  4. Launch Mirrly TG Proxy and tap the central power button. The app runs a fast preflight check (Smart Connect) and starts the service.
  5. Tap "To Telegram" and confirm proxy addition in the messenger prompt.

9. Configuration & Parameters

Core parameters defined in ProxyConfig.kt:

Parameter Default Description
proxyModeName MTPROTO Active local proxy mode: MTPROTO or SOCKS5
bindHost / bindPort 127.0.0.1:1443 Local IP address and port for MTProto
socks5Port 10808 Local TCP port for SOCKS5
socks5Username / socks5Password "" SOCKS5 credentials (RFC 1929)
secretHex generated on 1st run MTProto secret key (34 hex characters with dd prefix)
customCfDomain "" Personal Cloudflare Worker domain
speedPresetName AUTO Speed profile: AUTO, ECO, BALANCED, TURBO, ULTRA
tcpNoDelayModeName AUTO Nagle's algorithm mode: AUTO, ON, OFF
bufferSizeBytes 0 (OS Autotune) Default socket buffer size (0 = dynamic Linux kernel TCP window scaling)
useDefaultWorkerSocks5 true Fallback to developer worker pool when no custom domain is configured
isBatteryGuardEnabled false Automatic shutdown on low battery
batteryGuardThreshold 15 Battery threshold percentage for shutdown
isAdaptiveQoSEnabled false Adaptive thermal & battery QoS throttling
allowPublicRelayFallbackForPrivateVps false Prevent private VPS traffic from routing to public relays
autostartOnBoot false Auto-launch proxy service on Android system boot
verboseLogs true Detailed network logging

10. Cloudflare Worker Setup & Deployment

Deploying a personal Cloudflare Worker takes 1–2 minutes and operates fully within Cloudflare's free plan (100,000 requests/day per account).

Method 1: Automated CLI Deployment (Recommended)

Deployment scripts are located in tools/deploy-worker/:

Option A: Windows (1-Click)

  1. Navigate to tools/deploy-worker/.
  2. Double-click deploy.bat.
  3. The script verifies Node.js, installs Wrangler CLI, handles browser authentication, and deploys the worker.
  4. An interactive QR code will appear in the console for instant scanning with the app.

Option B: PowerShell (One-Liner)

irm https://raw.githubusercontent.com/joycecurcirt539-dot/Mirrly-TG-Proxy/main/tools/deploy-worker/deploy.ps1 | iex

Option C: Linux / macOS / WSL

chmod +x tools/deploy-worker/deploy.sh
./tools/deploy-worker/deploy.sh

Method 2: Manual Setup via Cloudflare Dashboard

  1. Log in to dash.cloudflare.com.
  2. Go to Workers & Pages → Create application → Create Worker.
  3. Set a worker name and click Deploy.
  4. Click Edit code, replace the template code with tools/deploy-worker/worker.js (or docs/cloudflare_worker.js).
  5. Click Deploy to publish.
  6. Copy your assigned domain (e.g., my-proxy.username.workers.dev).
  7. In Mirrly TG Proxy, open Worker Manager → Add Worker and paste the domain.

11. Project Structure & Building from Source

Repository File Tree

Mirrly TG Proxy/
├── app/                  # Android client (Jetpack Compose UI, Foreground Service, NDK C++ native_sec.cpp)
│   ├── src/main/assets/  # Pre-installed background wallpapers (wallpapers/)
│   ├── src/main/cpp/     # Native C++ APK signature verification (native_sec.cpp, CMakeLists.txt)
│   ├── src/main/java/    # UI screens (WarpGenerator, AiChat, Fame), onboarding, channels, services, localization
│   └── src/main/res/     # Resources, themes, vector drawables, strings.xml (RU / EN / FA)
├── core/                 # Kotlin business logic & networking core
│   └── src/main/kotlin/  # LocalProxyServer, NativeProxy FFI, WarpConfigGeneratorEngine, Keystore, UpdateChecker
├── mirrlyengine/         # High-performance Rust native engine (Tokio runtime)
│   ├── src/awg.rs        # AmneziaWG protocol (WireGuard obfuscation, QUIC I1, Jc garbage packets)
│   ├── src/balancer.rs   # Happy Eyeballs v2 (RFC 8305) & Anycast balancer
│   ├── src/bridge.rs     # FFI bridge connecting Kotlin and Tokio runtime
│   ├── src/budget.rs     # Dial budget management
│   ├── src/cfproxy.rs    # Cloudflare WSS tunneling with HTTP 429 rate-limit handling
│   ├── src/dns.rs        # DoH race resolver and DNS cache
│   ├── src/faketls.rs    # MTProto FakeTLS (domains, ee/dd prefixes)
│   ├── src/generation_guard.rs # Network generation epoch guard
│   ├── src/masque.rs     # WARP MASQUE HTTP/3 CONNECT-UDP
│   ├── src/network_profile.rs  # Discrete network FSM (NORMAL, DEGRADED, RECOVERING)
│   ├── src/node_independence.rs # Node isolation policies
│   ├── src/prober.rs     # Node accessibility probing and ping
│   ├── src/proxy.rs      # MTProto server, FakeTLS ee/dd, WsPool
│   ├── src/recovery.rs   # Connection recovery and flow draining mechanisms
│   ├── src/socks5.rs     # SOCKS5 server, RFC 1929 subnegotiation, TCP relay
│   ├── src/supervisor.rs # Multi-uplink route supervisor and trust policy
│   ├── src/tls_observability.rs # TLS handshake observability
│   ├── src/vpn.rs        # TUN network interface and L3 routing
│   ├── src/ws.rs         # WebSocket bounded flow control (4 MB)
│   └── Cargo.toml        # Rust crate manifest and dependencies
├── tools/                # Build and deployment utilities
│   ├── build/            # Native Rust build scripts for 4 ABIs (build_native.ps1, build_native.sh, clean_all.ps1)
│   └── deploy-worker/    # Auto-deployment scripts (deploy.bat, deploy.ps1, deploy.sh, worker.js)
├── docs/                 # Documentation, release notes, and reference cloudflare_worker.js
└── gradle/               # Gradle wrapper configuration

Build Requirements

  • Android SDK (API Level 35, Build-Tools 35.0.0)
  • Android NDK (NDK 27+ recommended)
  • Rust Toolchain (cargo) with installed targets:
    rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
    
  • Java Development Kit (JDK 17+)

Command-Line Build Instructions

# 1. Clone repository
git clone https://github.com/joycecurcirt539-dot/Mirrly-TG-Proxy.git
cd Mirrly-TG-Proxy

# 2. Compile native Rust core for all 4 Android ABIs
# Windows PowerShell:
.\tools\build\build_native.ps1
# Linux / macOS Bash:
chmod +x tools/build/build_native.sh
./tools/build/build_native.sh

# 3. Assemble Release APK packages
./gradlew assembleRelease

Compiled APK files will be located in app/build/outputs/apk/release/.


12. Development Activity Graph

Activity Graph


13. Star History


14. Project Roadmap & Chronology

Project started on July 27, 2026 with the v1.0.0 release. Key development milestones:

Version / Date Milestone Key Changes
v1.0.0 (27.07.2026) Genesis Initial public release. C/JNA core, local MTProto gateway on port 1443, WsPool, multi-client integration.
v1.0.4–1.0.5 License & Buffers Migration to GPLv3, high-throughput buffers, TCP_NODELAY control.
v1.0.6–1.0.8 Security & UI Native SHA-256 signature verification (SignatureVerifier), sleep timer, FLAG_BLUR_BEHIND background blur.
v1.0.9 SOCKS5 & Calls Asynchronous SOCKS5 TCP relay on port 10808 using cloudflare:sockets API. Support for voice and video calls.
v1.1.0–1.1.1 Stabilization JNI conflict resolution, status bar indicator, migration to ABI Splits.
v1.1.2 Rust Migration Rewrite of proxy core in Rust (mirrlyengine): Zero-Copy, Tokio runtime, non-blocking epoll, elimination of GC pauses.
v1.1.3–1.1.3.1 Worker Manager Cloudflare worker manager, Happy Eyeballs (RFC 8305), deep links mirrly://worker.
v1.1.4 Pure Rust Stack Legacy JVM socket elimination, instant failover, Anti-Open-Relay worker protection.
v1.1.5 Protocol Orchestration 3-phase protocol manager, developer worker race.
v1.1.6–1.1.6.1 WebSocket Optimization 16 MB frame assembly, write queue, 1-click deploy.bat.
v1.1.7 Anycast CDN & UI MTProto Anycast CDN migration, 25 ms staggered race, allocation-free UI rendering (120 FPS).
v1.1.8 DoH, Analytics, QoS DoH Race Resolver, DC-Affinity, Bezier quota analytics, Battery & Thermal QoS, Multi-APK Architecture Engine.
v1.1.8.1 Sleep Timer Redesign Worker domain normalization, pre-flight probe, redesigned sleep dialog.
v1.1.8.2 ML Kit & Isolation CameraX + Google ML Kit QR scanner, stylized QR generator, secret key isolation, WebPKI certificates.
v1.1.8.3 Speed Test & Schedule Tunnel speed test, SOCKS5 RFC 1929 subnegotiation, weekly scheduler, Deep Dormancy offline power saving.
v2.0.0 Network FSM & UI Discrete network FSM (NORMAL, DEGRADED, RECOVERING), Network Generation Guard, 4 MB bounded flow control, Smart Connect preflight, settings, onboarding, safe diagnostics, and localization. VPN mode remains under development.
v2.0.0.2 Localization & UI Persian localization (Farsi) with full RTL support, dynamic font scaling in speed test quality gauge, isolation of in-development VPN screen.
v2.0.0.3 Redesign & Stability Minimalist AMOLED redesign of Session History and Logs screens, transparent cards and buttons in Share tab, elimination of first-launch and language selection freeze on Samsung One UI and Huawei EMUI/HarmonyOS, cleanup of redundant Cloudflare DNS logs, and fast SOCKS5 port recycling (SO_REUSEPORT).
v2.1.0 WARP Generator, AI Chat & Wallpapers Rework notice banner for system VPN, built-in WireGuard and AmneziaWG profile generator with Keystore encryption, local diagnostic AI Chat, custom photo and video wallpapers under MirrlyUI outlines, removal of unused native libraries (-21 MB APK size reduction), and expansion of the Hall of Fame to 79 contributors.
v2.1.2 Proxy Repair & AmneziaWG Emergency proxy restoration (external TLS disabled by default, removal of loopback TCP MSS clamping, Anycast CDN pool warmup), 14 built-in AmneziaWG servers, background survival controls (Watchdog AlarmClock, OEM startup, CPU Anti-Freeze, Traffic Pulse), MirrlyIcon vector icons, and Cyber Snake arcade.
v2.1.3 Customization & Diagnostics App launcher icon picker (8 presets and Android 13+ monochrome), port conflict detector with app attribution, pure black AMOLED default background with wallpaper migration, expanded background protection onboarding, global vibration disable toggle, and reliable SOCKS5 Quick Settings tile startup.

15. Security and Terms of Use

  • No Analytics or Telemetry: The application contains no ads, third-party analytics trackers, or telemetry collectors.
  • Zero Secret Leak Guarantee: Diagnostic reports and log dumps undergo strict sanitization, redacting passwords, encryption keys, and private domains.
  • Build Integrity Validation: The built-in UpdateChecker enforces two-stage SHA-256 checksum validation and native digital signature verification (NDK C++ SignatureVerifier). Modified packages fail closed.
  • Changelog: Detailed release history is documented in CHANGELOG.md.
  • License: Released under the terms of the GNU General Public License v3 (GPLv3).
  • Terms of Service: Legal terms governing application usage are available in TERMS_OF_USE.md.

16. Acknowledgements & Hall of Fame

  • amurcanov — Developer of tg-ws-proxy-android. The foundational architecture served as the inspiration for Mirrly TG Proxy.
  • Flowseal — Author of tg-ws-proxy, creator of the original concept of tunneling Telegram traffic over Cloudflare WebSocket sessions.

Security Researchers & Bug Hunters

  • Grovymon — Comprehensive core security audits, mobile network circumvention research, Window Insets debugging, and initiative for RFC 1929 SOCKS5 authentication (Issues #3, #4, #5, #7, #8, #15, #16, #18, #19, #20).
  • zzzxxx888207-design — In-memory cryptographic key stability debugging and Cloudflare Worker script testing (Issues #1, #9, #10, #13).
  • BbIBux — MTProto media download diagnostics on T2 and Rostelecom carriers, dialog transparency improvements (Issues #11, #12, #17).
  • ustiprog — Auto-Stop on Start sleep timer initiative and telemetry for offline battery drain leading to Deep Dormancy (Issue #21).
  • 40OIL — Discovery of 3-button system navigation bar overlap on Samsung Galaxy A55, leading to comprehensive window inset audit (Issue #22).
  • CrazyGhostRider — Reproducible first-run language-selection freeze report on Samsung S21 Ultra / Android 14, enabling fixes to onboarding touch handling and locale changes (Issue #29).
  • VikKalm — Telemetry and localization of worker blockages on Android 13 arm64-v8a (Issue #6).
  • liveonloan — UI overlap defect report on Realme GT7 (Issue #14).
  • Dimaakaj — Identification of TypeScript ts(2554) syntax error in serverWs.accept() call within Cloudflare Worker script, restoring web dashboard deployment.
  • creeepeeer — Detailed diagnostic telemetry on mobile LTE/5G network under Android 16 (HONOR PTP-N29), contributing to SQI metrics and failover calibration (Issue #30).

Community & Localization Contributors

  • MSLight — Initiative for complete English localization of application interface (Issue #23).
  • Aseptronn — Initiative for Persian (Farsi) localization and international community outreach (Issue #23).
  • Shon4k — Pre-release build testing and network stability verification.
  • Linar S, RoarTRex, Ваня, Lucifer, Dalison, S|c, Антон — Cross-platform Android hardware testing and network stability verification.
  • Astimir Meikulov — Active contributor in the official Telegram community @WhyOkyHb.
  • Ilya Vaytsman — Author of the @airfield1972 channel ("Alternate Airfield"), for attention to the project and publication about Mirrly TG Proxy.
  • Community Contributors — The in-app Hall of Fame (HallOfFameScreen) commemorates 79 project participants, including contributors, bug hunters, and active Telegram community members.

Explore related projects

Loading…