You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"tunnel mode" doesn't tunnel all apps, chrome is the only app that's somewhat tunneled.
others apps including youtube, instagram, telegram, ... are not effected by the android server.
same with "proxy mode".
I did everything right, and it works on pc with the same settings btw. here's what I've done:
Installed the certificate
got the google script deploy id and auth key and entered them in the app
I used the default socks proxy 127.0.0.1:1081 on telegram and there is no ping.
I also tried the http proxy on 8080 port, added both socks (127.0.0.1:1081) and http (127.0.0.1:8080) proxy to V2RayNG and did a "real delay" test and got no response.
please review the entire code related to local proxy on android.
Hi @l3est — thanks for the detailed test (V2RayNG real-delay is a useful signal because it bypasses the VPN tunnel entirely and just probes the SOCKS5/HTTP listener directly).
Two scenarios make sense of what you're describing, and the diagnostic for each is different. Could you grab a few quick data points so we don't have to guess?
1. Is the local listener actually bound?
In Android Settings → Apps → mhrv-rs → notification, do you see the v1.6.3 text:
HTTP 127.0.0.1:8080 · SOCKS5 127.0.0.1:1081
(If it still says Routing via SOCKS5 127.0.0.1:8081, the v1.6.3 install didn't take — old APK is still running. Force-stop and reinstall.)
If the notification text is correct, the next step is to confirm the listener is actually accepting TCP. Easiest path without root:
If those say Connection refused while mhrv-rs is "started" in the UI, the Rust runtime crashed or didn't bind — that's the actual bug to chase. If they say succeeded, the listener is up and the issue is downstream (Telegram routing, Apps Script reachability, etc.).
2. Which mode are you running?
Connection mode: Tunnel or Proxy only?
Operating mode: apps_script, full, or google_only?
This matters because in tunnel mode + apps_script, the TUN captures all app traffic but Apps Script only handles HTTP — non-HTTP apps (Telegram MTPROTO, YouTube native, Instagram WebSocket) can't go through. Chrome works because it's HTTP/HTTPS. If you want non-HTTP apps to work, you need full mode (which requires a tunnel-node deployed on a VPS).
In proxy-only mode + apps_script, only apps you explicitly point at 127.0.0.1:8080/1081 use the relay, and again only HTTP traffic goes through. Telegram MTPROTO over SOCKS5 should work though, because mhrv-rs SOCKS5 listener can transport arbitrary TCP.
Take 30 seconds of output after tapping Start, especially any Address already in use, bind failed, panic, or stack traces.
If V2RayNG real delay is failing on both ports, my prior on what's happening: the Rust runtime panicked on startup (#211 area code is fresh, possible regression from another path). The logcat will show it. Don't change settings between reproductions — same config that's currently failing, just give us the log of one attempt.
Also @internash98's #223 looks like the same case in Persian — let's keep diagnostic data here in #224 and I'll cross-link.
[reply via Anthropic Claude | reviewed by @therealaleph]
"tunnel mode" doesn't tunnel all apps, chrome is the only app that's somewhat tunneled. others apps including youtube, instagram, telegram, ... are not effected by the android server. same with "proxy mode".
I did everything right, and it works on pc with the same settings btw. here's what I've done: Installed the certificate got the google script deploy id and auth key and entered them in the app I used the default socks proxy 127.0.0.1:1081 on telegram and there is no ping. I also tried the http proxy on 8080 port, added both socks (127.0.0.1:1081) and http (127.0.0.1:8080) proxy to V2RayNG and did a "real delay" test and got no response.
please review the entire code related to local proxy on android.
Hi @l3est — thanks for the detailed test (V2RayNG real-delay is a useful signal because it bypasses the VPN tunnel entirely and just probes the SOCKS5/HTTP listener directly).
Two scenarios make sense of what you're describing, and the diagnostic for each is different. Could you grab a few quick data points so we don't have to guess?
1. Is the local listener actually bound?
In Android Settings → Apps → mhrv-rs → notification, do you see the v1.6.3 text:
HTTP 127.0.0.1:8080 · SOCKS5 127.0.0.1:1081
(If it still says Routing via SOCKS5 127.0.0.1:8081, the v1.6.3 install didn't take — old APK is still running. Force-stop and reinstall.)
If the notification text is correct, the next step is to confirm the listener is actually accepting TCP. Easiest path without root:
If those say Connection refused while mhrv-rs is "started" in the UI, the Rust runtime crashed or didn't bind — that's the actual bug to chase. If they say succeeded, the listener is up and the issue is downstream (Telegram routing, Apps Script reachability, etc.).
2. Which mode are you running?
Connection mode: Tunnel or Proxy only?
Operating mode: apps_script, full, or google_only?
This matters because in tunnel mode + apps_script, the TUN captures all app traffic but Apps Script only handles HTTP — non-HTTP apps (Telegram MTPROTO, YouTube native, Instagram WebSocket) can't go through. Chrome works because it's HTTP/HTTPS. If you want non-HTTP apps to work, you need full mode (which requires a tunnel-node deployed on a VPS).
In proxy-only mode + apps_script, only apps you explicitly point at 127.0.0.1:8080/1081 use the relay, and again only HTTP traffic goes through. Telegram MTPROTO over SOCKS5 should work though, because mhrv-rs SOCKS5 listener can transport arbitrary TCP.
Take 30 seconds of output after tapping Start, especially any Address already in use, bind failed, panic, or stack traces.
If V2RayNG real delay is failing on both ports, my prior on what's happening: the Rust runtime panicked on startup (#211 area code is fresh, possible regression from another path). The logcat will show it. Don't change settings between reproductions — same config that's currently failing, just give us the log of one attempt.
Also @internash98's #223 looks like the same case in Persian — let's keep diagnostic data here in #224 and I'll cross-link.
[reply via Anthropic Claude | reviewed by @therealaleph]
I checked the version from the settings, it says 1.6.3
I can't install packages right now, there is no internet
I tried all combinations, tunnel mode + app script is the only one that almost works. I can access youtube for exmaple in chrome but it won't play videos.
At line:1 char:15
+ adb logcat -c && adb logcat | grep -iE "mhrv|MhrvVpn|cargo_proxy"
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
also I tried "tcp ping" in v2rayng and both phone server (socks 127.0.0.1:8081) and pc server (http 192.168.1.110:8085) got a response, so it's definitely not the firewall.
hello i cannot use android app aswell everything works on pc but in adnroid with the same config, nothing works. no app has access to internet. telegram either in tun mode or proxy mode not working
@o0Fara0o — for Telegram on Android with apps_script mode, the symptom you're describing (PC works, Android socks5 doesn't) is the recurring architectural case explained in detail across #259, #273, #225, #239, #251, etc.
Short version of why:
Telegram MTPROTO is not HTTP and not TLS
Apps Script can only tunnel HTTP/HTTPS
mhrv-rs dispatches MTPROTO to raw-tcp (direct) → direct connection from your phone to Telegram IPs → ISP filters those IPs → fail
PC works because either (a) you have another VPN running on the PC providing the egress for raw-tcp-direct, or (b) your PC's ISP path is different from the Android's mobile network.
Three working paths for Telegram on Android:
Telegram MTProto official proxy (@MTProxybot — free, doesn't need mhrv-rs at all)
Telegram Web in Android Chrome (HTTPS, goes through the relay)
Full mode + VPS (handles arbitrary TCP, including MTPROTO)
There's nothing apps_script mode can do to make Telegram MTPROTO work on a filtered ISP — this is a fundamental Apps Script limitation, not a config issue.
[reply via Anthropic Claude | reviewed by @therealaleph]
i got new version of apk, me and my friend cannot use android version its only open youtube thumbnails not the video, isp for pc and android is same, telegram desktop works fine but telegram app is not maybe telegram desktop app is more compatibale with mhrv. we have xia and sammy
@Evolve6996 — to narrow down the Android-only issue, three quick questions:
Connection mode in the Android app: Tunnel or Proxy only?
If Proxy only: did you set proxy in your Android browser/apps to 127.0.0.1:8080 (HTTP) or 127.0.0.1:1081 (SOCKS5)?
If Tunnel: did you grant VpnService permission when prompted? Does the foreground notification show "HTTP 127.0.0.1:8080 · SOCKS5 127.0.0.1:1081"?
The pattern "PC works, Android doesn't" with the same script_id + auth_key is almost always one of:
Tunnel mode + VpnService permission denied → no traffic captured → nothing works
Proxy only + browser/app not configured → traffic bypasses mhrv-rs → ISP filters it normally
Tunnel mode + Full mode + udpgw DNS clash (my hypothesis from #251) — DNS queries get misrouted
The first two are setup issues fixable in the app. The third is a real bug we'd need to track.
adb logcat | grep -iE "mhrv|MhrvVpn|tun2proxy" for 30 seconds after Connect on Android tells us which one. Failing that, screenshots of mhrv-rs Android settings (Connection mode + Operating mode dropdowns visible) work too.
[reply via Anthropic Claude | reviewed by @therealaleph]
@Evolve6996 — to narrow down the Android-only issue, three quick questions:
Connection mode in the Android app: Tunnel or Proxy only?
If Proxy only: did you set proxy in your Android browser/apps to 127.0.0.1:8080 (HTTP) or 127.0.0.1:1081 (SOCKS5)?
If Tunnel: did you grant VpnService permission when prompted? Does the foreground notification show "HTTP 127.0.0.1:8080 · SOCKS5 127.0.0.1:1081"?
The pattern "PC works, Android doesn't" with the same script_id + auth_key is almost always one of:
Tunnel mode + VpnService permission denied → no traffic captured → nothing works
Proxy only + browser/app not configured → traffic bypasses mhrv-rs → ISP filters it normally
Tunnel mode + Full mode + udpgw DNS clash (my hypothesis from #251) — DNS queries get misrouted
The first two are setup issues fixable in the app. The third is a real bug we'd need to track.
adb logcat | grep -iE "mhrv|MhrvVpn|tun2proxy" for 30 seconds after Connect on Android tells us which one. Failing that, screenshots of mhrv-rs Android settings (Connection mode + Operating mode dropdowns visible) work too.
[reply via Anthropic Claude | reviewed by @therealaleph]
thanks i found the issue and youtube worked. but still telegram app in android not working i think its not fixable without full tunnel ty btw
@Evolve6996 — glad YouTube is working now! Closing the YouTube part of this.
Telegram Android over Apps Script mode (no Full mode):
You're right, this isn't fully fixable in Apps Script mode alone. Here's why:
Telegram mobile uses MTProto which is a custom binary protocol over TCP/UDP — not HTTPS. The mhrv-rs MITM-relay layer only handles HTTPS traffic (it terminates TLS, sends the cleartext-after-TLS through Apps Script, re-encrypts on the other side). Non-HTTPS connections like MTProto have no decryptable layer to relay through Apps Script's UrlFetchApp.fetch().
What this means in practice:
Telegram's TLS-based fallback (the one used when MTProto is blocked) does work over mhrv-rs Apps Script mode in many cases, but it's slow (each message round-trips through Apps Script).
Telegram's primary MTProto path doesn't go through mhrv-rs at all in Apps Script mode — it tries direct connection, gets ISP-blocked, and fails.
Three options for Telegram on Android:
Full mode + VPS (most reliable) — tunnel-node forwards raw TCP/UDP from a clean VPS IP. Telegram MTProto goes through unchanged. Best UX for Telegram specifically.
Telegram MTProto Proxy — Telegram has built-in support for MTProto proxies (Settings → Data and Storage → Proxy → Add Proxy → MTProto). These are public proxies you can find in @MTProtoProxy_bot or various Telegram channels. Doesn't need mhrv-rs at all for Telegram traffic. Most Telegram users in censored regions do this.
mhrv-rs Tunnel mode (Android VPN) + waiting for Telegram client to retry over TLS — sometimes works when Telegram falls back to TLS-encapsulated MTProto, which mhrv-rs can carry. Inconsistent.
Most users in your situation run MTProto Proxy for Telegram + mhrv-rs for everything else. Each tool for its intended job.
I'll close this issue since the original report (YouTube) is resolved. For Telegram Android over Full mode, please open a fresh issue if you set up a VPS and still see problems — that gives us a clean diagnostic surface.
[reply via Anthropic Claude | reviewed by @therealaleph]
Activity
therealaleph commentedon Apr 25, 2026
Hi @l3est — thanks for the detailed test (V2RayNG real-delay is a useful signal because it bypasses the VPN tunnel entirely and just probes the SOCKS5/HTTP listener directly).
Two scenarios make sense of what you're describing, and the diagnostic for each is different. Could you grab a few quick data points so we don't have to guess?
1. Is the local listener actually bound?
In Android Settings → Apps → mhrv-rs → notification, do you see the v1.6.3 text:
(If it still says
Routing via SOCKS5 127.0.0.1:8081, the v1.6.3 install didn't take — old APK is still running. Force-stop and reinstall.)If the notification text is correct, the next step is to confirm the listener is actually accepting TCP. Easiest path without root:
pkg install netcat curloncenc -zv 127.0.0.1 1081 && nc -zv 127.0.0.1 8080If those say
Connection refusedwhile mhrv-rs is "started" in the UI, the Rust runtime crashed or didn't bind — that's the actual bug to chase. If they saysucceeded, the listener is up and the issue is downstream (Telegram routing, Apps Script reachability, etc.).2. Which mode are you running?
Connection mode: Tunnel or Proxy only?Operating mode: apps_script, full, or google_only?This matters because in tunnel mode + apps_script, the TUN captures all app traffic but Apps Script only handles HTTP — non-HTTP apps (Telegram MTPROTO, YouTube native, Instagram WebSocket) can't go through. Chrome works because it's HTTP/HTTPS. If you want non-HTTP apps to work, you need
fullmode (which requires a tunnel-node deployed on a VPS).In proxy-only mode + apps_script, only apps you explicitly point at 127.0.0.1:8080/1081 use the relay, and again only HTTP traffic goes through. Telegram MTPROTO over SOCKS5 should work though, because mhrv-rs SOCKS5 listener can transport arbitrary TCP.
3. logcat
Take 30 seconds of output after tapping Start, especially any
Address already in use,bind failed,panic, or stack traces.If V2RayNG
real delayis failing on both ports, my prior on what's happening: the Rust runtime panicked on startup (#211 area code is fresh, possible regression from another path). The logcat will show it. Don't change settings between reproductions — same config that's currently failing, just give us the log of one attempt.Also @internash98's #223 looks like the same case in Persian — let's keep diagnostic data here in #224 and I'll cross-link.
[reply via Anthropic Claude | reviewed by @therealaleph]
w0l4i commentedon Apr 26, 2026
USE FULL MODE TO FIX ALL YOUR ISSUES
with full mode no need to install mitm cert etc .. you just need a cheap vps and a little bit network knowledge that's all
https://github.com/therealaleph/MasterHttpRelayVPN-RUST/tree/main/tunnel-node
l3est commentedon Apr 26, 2026
I checked the version from the settings, it says 1.6.3
I can't install packages right now, there is no internet
I tried all combinations, tunnel mode + app script is the only one that almost works. I can access youtube for exmaple in chrome but it won't play videos.
the
adb logcat -c && adb logcat | grep -iE "mhrv|MhrvVpn|cargo_proxy"command result:also I tried "tcp ping" in v2rayng and both phone server (socks 127.0.0.1:8081) and pc server (http 192.168.1.110:8085) got a response, so it's definitely not the firewall.
ignore 9910 port, it's for v2rayn on windows
Evolve6996 commentedon Apr 26, 2026
hello i cannot use android app aswell everything works on pc but in adnroid with the same config, nothing works. no app has access to internet. telegram either in tun mode or proxy mode not working
therealaleph commentedon Apr 26, 2026
try again
o0Fara0o commentedon Apr 27, 2026
Me to . everything works on pc but sock5 on Android sucks.no telegram
o0Fara0o commentedon Apr 27, 2026
Me to . everything works on pc but sock5 on Android sucks.no telegram
therealaleph commentedon Apr 27, 2026
@o0Fara0o — for Telegram on Android with
apps_scriptmode, the symptom you're describing (PC works, Android socks5 doesn't) is the recurring architectural case explained in detail across #259, #273, #225, #239, #251, etc.Short version of why:
raw-tcp (direct)→ direct connection from your phone to Telegram IPs → ISP filters those IPs → failPC works because either (a) you have another VPN running on the PC providing the egress for raw-tcp-direct, or (b) your PC's ISP path is different from the Android's mobile network.
Three working paths for Telegram on Android:
There's nothing apps_script mode can do to make Telegram MTPROTO work on a filtered ISP — this is a fundamental Apps Script limitation, not a config issue.
[reply via Anthropic Claude | reviewed by @therealaleph]
Evolve6996 commentedon Apr 27, 2026
i got new version of apk, me and my friend cannot use android version its only open youtube thumbnails not the video, isp for pc and android is same, telegram desktop works fine but telegram app is not maybe telegram desktop app is more compatibale with mhrv. we have xia and sammy
therealaleph commentedon Apr 27, 2026
@Evolve6996 — to narrow down the Android-only issue, three quick questions:
127.0.0.1:8080(HTTP) or127.0.0.1:1081(SOCKS5)?The pattern "PC works, Android doesn't" with the same
script_id+auth_keyis almost always one of:The first two are setup issues fixable in the app. The third is a real bug we'd need to track.
adb logcat | grep -iE "mhrv|MhrvVpn|tun2proxy"for 30 seconds after Connect on Android tells us which one. Failing that, screenshots of mhrv-rs Android settings (Connection mode + Operating mode dropdowns visible) work too.[reply via Anthropic Claude | reviewed by @therealaleph]
Evolve6996 commentedon Apr 27, 2026
thanks i found the issue and youtube worked. but still telegram app in android not working i think its not fixable without full tunnel ty btw
therealaleph commentedon Apr 27, 2026
@Evolve6996 — glad YouTube is working now! Closing the YouTube part of this.
Telegram Android over Apps Script mode (no Full mode):
You're right, this isn't fully fixable in Apps Script mode alone. Here's why:
Telegram mobile uses MTProto which is a custom binary protocol over TCP/UDP — not HTTPS. The mhrv-rs MITM-relay layer only handles HTTPS traffic (it terminates TLS, sends the cleartext-after-TLS through Apps Script, re-encrypts on the other side). Non-HTTPS connections like MTProto have no decryptable layer to relay through Apps Script's
UrlFetchApp.fetch().What this means in practice:
Three options for Telegram on Android:
Full mode + VPS (most reliable) — tunnel-node forwards raw TCP/UDP from a clean VPS IP. Telegram MTProto goes through unchanged. Best UX for Telegram specifically.
Telegram MTProto Proxy — Telegram has built-in support for MTProto proxies (Settings → Data and Storage → Proxy → Add Proxy → MTProto). These are public proxies you can find in @MTProtoProxy_bot or various Telegram channels. Doesn't need mhrv-rs at all for Telegram traffic. Most Telegram users in censored regions do this.
mhrv-rs Tunnel mode (Android VPN) + waiting for Telegram client to retry over TLS — sometimes works when Telegram falls back to TLS-encapsulated MTProto, which mhrv-rs can carry. Inconsistent.
Most users in your situation run MTProto Proxy for Telegram + mhrv-rs for everything else. Each tool for its intended job.
If you'd specifically like mhrv-rs Full mode set up, see the tunnel-node docs: https://github.com/therealaleph/MasterHttpRelayVPN-RUST/tree/main/tunnel-node. Cheap VPS (Hetzner €4/mo or similar) + 5-minute setup.
I'll close this issue since the original report (YouTube) is resolved. For Telegram Android over Full mode, please open a fresh issue if you set up a VPS and still see problems — that gives us a clean diagnostic surface.
[reply via Anthropic Claude | reviewed by @therealaleph]