Skip to content
This repository was archived by the owner on Apr 5, 2026. It is now read-only.
This repository was archived by the owner on Apr 5, 2026. It is now read-only.

Clients stuck on “Connecting…” (works fine with official telegrammessenger/proxy on same port & secret) #29

@Alishahrokhiii

Description

@Alishahrokhiii

Hi 👋
Thanks for maintaining this project.

I’m reporting a connection issue that I can reliably reproduce and that does not happen with the official MTProxy implementation.


Environment

  • Server OS: Ubuntu 22.04
  • Docker: latest
  • Client: Telegram iOS / Android (Iranian ISPs)
  • Port: 2096 (also tested 2083, 9443)
  • Secret: standard 32-hex MTProto secret
  • Transport: TCP
  • Domain-based access (e.g. example.domain.com:2096)

What works (baseline)

Using the official MTProxy image:

telegrammessenger/proxy:latest

With:

  • the same port
  • the same secret
  • the same server
  • the same clients / ISPs

➡️ Connections are stable and immediate.


What does NOT work

Using GetPageSpeed/MTProxy with Docker:

ghcr.io/getpagespeed/mtproxy:latest

Symptoms:

  • Telegram clients remain stuck on “Connecting…”
  • No explicit error on client side
  • Happens consistently on Iranian networks
  • Sometimes works on non-restricted networks, but unreliable

Important observation

  • The issue only appears when switching to this fork
  • No firewall / iptables / UFW blocking (confirmed)
  • Port is listening correctly and container is running
  • Connections reach the container, but MTProto handshake never completes

Logs / Network behavior

Inside the container:

  • TCP connections are created
  • Handshake does not finalize
  • Client retries indefinitely

On host:

  • Port forwarding and DNAT work as expected

Hypothesis

This may be caused by:

  • MTProto obfuscation differences vs the official implementation
  • Subtle protocol incompatibility during initial handshake
  • DPI-sensitive behavior (Iranian ISPs are very strict)

The official Telegram implementation seems more tolerant / compatible in this environment.


Question

  • Is this fork fully MTProto-compatible at handshake level?
  • Is there any recommended configuration for restricted networks?
  • Are there known issues with DPI-heavy countries?

I’m happy to test patches or provide more logs if needed.

Thanks 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions