Environment
- mhrv-rs version:
v1.9.14
- Mode:
apps_script
- OS: Windows 10
- Browser: Google Chrome
Version 145.0.7632.76 (Official Build) (64-bit)
Problem Description
I am using apps_script mode, and added deno.com, val.town, and fly.io to passthrough_hosts in order to bypass the relay for these sites while still having the benefit of SNI-rewrite to pass Iran's firewall.
My expectation was that mhrv-rs would still use the SNI-rewrite tunnel (like direct mode) for these hosts so the firewall sees SNI=www.google.com, but the traffic would not go through Apps Script relay.
What actually happens:
The traffic is sent as raw-tcp (direct) with the real SNI of the site (e.g. deno.com). The ISP firewall detects the real SNI, resets the connection, and the browser shows ERR_CONNECTION_RESET.
Browser behavior (comparison)
- With mhrv-rs proxy (passthrough_hosts active): Chrome shows
ERR_CONNECTION_RESET
- Direct connection (no proxy at all, from same machine):
ERR_CONNECTION_TIMED_OUT
This confirms that the firewall is actively resetting connections with the real SNI, while direct connections are dropped more silently (timeout).
Why this matters
These sites (deno.com, val.town, fly.io) are blocked in Iran. A direct connection with the real SNI is immediately cut by the firewall. If mhrv-rs could apply SNI-rewrite (like direct mode) for passthrough_hosts, the connection would pass the firewall and the site would open, because the ISP sees SNI=www.google.com and allows it.
Config File
{
"mode": "apps_script",
"google_ip": "216.239.38.120",
"front_domain": "www.google.com",
"script_id": "***",
"auth_key": "***",
"listen_host": "127.0.0.1",
"listen_port": 8085,
"socks5_port": 8086,
"log_level": "info",
"verify_ssl": true,
"sni_hosts": [
"www.google.com",
"mail.google.com",
"drive.google.com",
"docs.google.com",
"calendar.google.com",
"accounts.google.com",
"scholar.google.com",
"maps.google.com",
"chat.google.com",
"translate.google.com",
"play.google.com",
"lens.google.com",
"chromewebstore.google.com"
],
"passthrough_hosts": [
".val.town",
".deno.com",
".fly.io"
],
"fetch_ips_from_api": true,
"max_ips_to_scan": 100,
"scan_batch_size": 500,
"google_ip_validation": true,
"tunnel_doh": true,
"block_doh": false
}
Log evidence
2026-05-05T17:40:38.040233Z INFO dispatch deno.com:443 -> raw-tcp (direct) (passthrough_hosts match)
2026-05-05T17:40:42.007962Z INFO stats: relay=86 (355KB) failures=18 coalesced=0 cache=0/0 (0% hit, 0KB) scripts=1/1 active
2026-05-05T17:40:46.440609Z INFO dispatch deno.com:443 -> raw-tcp (direct) (passthrough_hosts match)
2026-05-05T17:40:48.046394Z INFO dispatch deno.com:443 -> raw-tcp (direct) (passthrough_hosts match)
2026-05-05T17:40:54.625828Z INFO dispatch clients4.google.com:443 -> sni-rewrite tunnel (Google edge direct)
2026-05-05T17:40:54.625842Z INFO SNI-rewrite tunnel -> clients4.google.com:443 via 216.239.38.120 (outbound SNI=www.google.com)
2026-05-05T17:40:55.048821Z INFO dispatch beacons.gcp.gvt2.com:443 -> sni-rewrite tunnel (Google edge direct)
2026-05-05T17:40:55.048836Z INFO SNI-rewrite tunnel -> beacons.gcp.gvt2.com:443 via 216.239.38.120 (outbound SNI=www.google.com)
2026-05-05T17:40:56.444326Z INFO dispatch deno.com:443 -> raw-tcp (direct) (passthrough_hosts match)
2026-05-05T17:41:03.776417Z INFO dispatch deno.com:443 -> raw-tcp (direct) (passthrough_hosts match)
2026-05-05T17:41:13.077146Z INFO dispatch clients4.google.com:443 -> sni-rewrite tunnel (Google edge direct)
2026-05-05T17:41:13.077162Z INFO SNI-rewrite tunnel -> clients4.google.com:443 via 216.239.38.120 (outbound SNI=www.google.com)
2026-05-05T17:41:13.793771Z INFO dispatch deno.com:443 -> raw-tcp (direct) (passthrough_hosts match)
@therealaleph
Environment
v1.9.14apps_scriptVersion 145.0.7632.76 (Official Build) (64-bit)Problem Description
I am using
apps_scriptmode, and addeddeno.com,val.town, andfly.iotopassthrough_hostsin order to bypass the relay for these sites while still having the benefit of SNI-rewrite to pass Iran's firewall.My expectation was that mhrv-rs would still use the SNI-rewrite tunnel (like
directmode) for these hosts so the firewall seesSNI=www.google.com, but the traffic would not go through Apps Script relay.What actually happens:
The traffic is sent as
raw-tcp (direct)with the real SNI of the site (e.g.deno.com). The ISP firewall detects the real SNI, resets the connection, and the browser showsERR_CONNECTION_RESET.Browser behavior (comparison)
ERR_CONNECTION_RESETERR_CONNECTION_TIMED_OUTThis confirms that the firewall is actively resetting connections with the real SNI, while direct connections are dropped more silently (timeout).
Why this matters
These sites (
deno.com,val.town,fly.io) are blocked in Iran. A direct connection with the real SNI is immediately cut by the firewall. If mhrv-rs could apply SNI-rewrite (likedirectmode) forpassthrough_hosts, the connection would pass the firewall and the site would open, because the ISP seesSNI=www.google.comand allows it.Config File
{ "mode": "apps_script", "google_ip": "216.239.38.120", "front_domain": "www.google.com", "script_id": "***", "auth_key": "***", "listen_host": "127.0.0.1", "listen_port": 8085, "socks5_port": 8086, "log_level": "info", "verify_ssl": true, "sni_hosts": [ "www.google.com", "mail.google.com", "drive.google.com", "docs.google.com", "calendar.google.com", "accounts.google.com", "scholar.google.com", "maps.google.com", "chat.google.com", "translate.google.com", "play.google.com", "lens.google.com", "chromewebstore.google.com" ], "passthrough_hosts": [ ".val.town", ".deno.com", ".fly.io" ], "fetch_ips_from_api": true, "max_ips_to_scan": 100, "scan_batch_size": 500, "google_ip_validation": true, "tunnel_doh": true, "block_doh": false }Log evidence
@therealaleph