Skip to content

Telegram, android #273

Closed
Closed

Description

@aroutag

Hey there! so, i know stuff like this has been asked before, but.... ive followed everything on the other topics and im still failing somehow.
proxy set on socks5 server 127.0.0.1, port 1081, no username or password

Any idea what im doing wrong?

2026-04-26T17:16:58.194032Z INFO Loaded MITM CA from /data/user/0/com.therealaleph.mhrv/files/ca/ca.crt
2026-04-26T17:16:58.194330Z WARN Listening HTTP on 127.0.0.1:8080 - set your browser HТТР proxy to this address.
2026-04-26T17:16:58.194379Z WARN Listening S0CKS5 on 127.0.0.1:1081 - xray / Telegram / app-level SOCKS5 clients use this.
2026-04-26T17:16:58.560936Z INFO pool pre-warmed with 3 connection(s)
2026-04-26T17:16:59.801640Z INFO S0CKS5 CONNECT -> 2001:67c:4e8: f004:: a: 443
2026-04-26T17:16:59.802045Z INFO dispatch 2001:67c:4e8:f004:: a:443 -> raw-tcp (direct) (non-HTTP, non-TLS client payload)
2026-04-26T17:16:59.803761Z INFO SOCKS5 CONNECT -> 2001:67c:4e8:f004:: a: 443
2026-04-26T17:16:59.804267Z INFO dispatch 2001:67c:4e8: f004::a:443 -> raw-tcp (direct) (non-HTTP, non-TLS client payload)
2026-04-26T17:17:00.207497Z INFO SOCKS5 CONNECT -> 149.154.167.92:443
2026-04-26T17:17:00.208365Z INFO dispatch 149.154.167.92:443 -> raw-tcp (direct) (non-HТТР, non-TLS client payload)
2026-04-26T17:17:00.208534Z INFO SOCKS5 CONNECT -> 2001:67c:4e8:f004::a:443

Activity

  1. therealaleph commented on Apr 26, 2026

    @therealaleph
    Owner

    Hi @aroutag — your log shows the SOCKS5 listener is correctly listening on 127.0.0.1:1081, so the proxy itself is up. But Telegram on Android in apps_script mode is the most-asked recurring case in this repo for a real architectural reason — answer in detail at #251 and #225.

    Short version of why your setup isn't working:

    1. SOCKS5 handshake from Telegram → mhrv-rs SUCCEEDS (you can see it in your log)
    2. mhrv-rs reads the first bytes of Telegram's payload, sees they're not HTTP/TLS (Telegram MTPROTO is its own wire format)
    3. mhrv-rs dispatches as raw-tcp (direct) — bypasses the relay, opens a direct TCP connection from your device to Telegram's MTPROTO server
    4. Your ISP filters Telegram MTPROTO IPs, so the direct connection fails

    Apps Script can't tunnel arbitrary TCP — it's HTTP-only. So in apps_script mode, anything that's not HTTP/TLS falls through to the direct path, which then hits ISP filtering for blocked services.

    Three fixes, ordered by ease:

    1. Use Telegram's official MTProto proxy instead of mhrv-rs for Telegram specifically. Free proxies at @MTProxybot. Set in Telegram Settings → Data and Storage → Proxy → MTProto. Doesn't use mhrv-rs at all but works for Telegram immediately.
    2. Use Telegram Web in a browser (web.telegram.org) — that's HTTPS, goes through the relay, works.
    3. Full mode + VPS — handles arbitrary TCP including MTPROTO. ~$5/month. Setup walkthrough in #221.

    For native YouTube / Discord / Instagram, same architectural truth — apps_script mode handles HTTP/HTTPS, anything else needs Full mode.


    [reply via Anthropic Claude | reviewed by @therealaleph]

  2. aroutag commented on Apr 26, 2026

    @aroutag
    Author

    Ah i see. well damn... Thanks for replying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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