Skip to content

Commit 1d5d13d

Browse files
committed
v1.2.1: IP-literal fast-fail + more SNIs + x.com GraphQL fix + Android SNI paste
Rollup of the three upstream-Python ports plus an Android UX polish: - plain_tcp_passthrough: 4s connect timeout for IP literals (10s for hostnames). Halves Telegram DC-rotation latency when the current DC is DPI-dropped. - DEFAULT_GOOGLE_SNI_POOL / DEFAULT_SNI_POOL: +maps, chat, translate, play, lens.google.com. More fingerprint spread, and maps/play pass DPI on some carriers where shorter *.google.com names don't. - handle_mitm_request: x.com GraphQL URL truncation — strip everything after the first & when the path matches /i/api/graphql/.../?variables=. x.com's variables+features+fieldToggles blob overflows Apps Script's URL cap; `variables=` alone renders the timeline. - Android SNI editor: paste-and-add now accepts a full list separated by whitespace / commas / newlines, dedupes, and merges with existing selection. Closes the "add them all at once" ask from #47. - rlimit.rs: fence the example error log in a `text` code block so rustdoc stops trying to compile it.
1 parent 08fe691 commit 1d5d13d

6 files changed

Lines changed: 38 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mhrv-rs"
3-
version = "1.2.0"
3+
version = "1.2.1"
44
edition = "2021"
55
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
66
license = "MIT"

android/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId = "com.therealaleph.mhrv"
1515
minSdk = 24 // Android 7.0 — covers 99%+ of live devices.
1616
targetSdk = 34
17-
versionCode = 120
18-
versionName = "1.2.0"
17+
versionCode = 121
18+
versionName = "1.2.1"
1919

2020
// Ship all four mainstream Android ABIs:
2121
// - arm64-v8a — 95%+ of real-world Android phones since 2019

android/app/src/main/java/com/therealaleph/mhrv/ui/HomeScreen.kt

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,16 +851,30 @@ private fun SniPoolEditor(
851851
value = custom,
852852
onValueChange = { custom = it },
853853
label = { Text(stringResource(R.string.field_add_custom_sni)) },
854-
singleLine = true,
854+
// Accept a pasted list — users (issue #47) want to dump a
855+
// whole list of subdomains in one go. We split on newlines,
856+
// commas, semicolons, and whitespace so formats like
857+
// www.google.com\nmail.google.com\ndrive.google.com
858+
// www.google.com, mail.google.com
859+
// www.google.com mail.google.com
860+
// all do the right thing on Add.
861+
singleLine = false,
862+
maxLines = 6,
855863
keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Uri),
856864
modifier = Modifier.weight(1f),
857865
)
858866
TextButton(
859867
onClick = {
860-
val s = custom.trim()
861-
if (s.isNotEmpty()) {
862-
val next = (cfg.sniHosts.takeIf { it.isNotEmpty() } ?: enabledSet.toList()) + s
863-
onChange(cfg.copy(sniHosts = next.distinct()))
868+
// Tokenise on any whitespace, comma, or semicolon so one
869+
// Add click absorbs a pasted list. Deduplicate within
870+
// the paste before merging into the existing list.
871+
val tokens = custom.split(Regex("[\\s,;]+"))
872+
.map { it.trim() }
873+
.filter { it.isNotEmpty() }
874+
if (tokens.isNotEmpty()) {
875+
val base = cfg.sniHosts.takeIf { it.isNotEmpty() } ?: enabledSet.toList()
876+
val next = (base + tokens).distinct()
877+
onChange(cfg.copy(sniHosts = next))
864878
custom = ""
865879
}
866880
},

docs/changelog/v1.2.1.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- see docs/changelog/v1.1.0.md for the file format: Persian, then `---`, then English. -->
2+
• تایم‌اوت تند برای IP literalها (مثلاً DC تلگرام) — ۴ ثانیه به‌جای ۱۰ ثانیه. وقتی DC مسدود است، تلگرام دو برابر سریع‌تر به DC بعدی می‌چرخد (پورت از upstream پایتون)
3+
• افزودن maps / chat / translate / play / lens و scholar.google.com به مجموعهٔ چرخشی SNI — spread بیشتر، و چند مورد از این‌ها روی اپراتورهایی که *.google.com کوتاه را می‌بندند DPI را رد می‌کنند (issue #47)
4+
• اصلاح بارگذاری x.com: کوتاه کردن URLهای طولانی GraphQL که از سقف طول URL در Apps Script رد می‌شدند و باعث relay error می‌شد (پورت از upstream پایتون)
5+
• ویرایشگر SNI اندروید: می‌توانید یک لیست کامل از subdomainها را Paste کنید و با یک بار Add همه اضافه می‌شوند (issue #47)
6+
• اصلاح متن FAQ فارسی README: سهمیهٔ روزانهٔ UrlFetchApp ۲۰٬۰۰۰ درخواست است (نه ۲ میلیون) — ارجاع به مستند رسمی گوگل (issue #63)
7+
---
8+
• Fast-fail connect timeout for IP literals (e.g. Telegram DCs) — 4s instead of 10s. When a DC is blocked, clients like Telegram rotate to the next DC roughly twice as fast (ported from upstream Python)
9+
• Add maps / chat / translate / play / lens and scholar.google.com to the SNI rotation pool — more DPI-fingerprint spread, and a few of these reliably pass DPI on carriers where shorter *.google.com names don't (issue #47)
10+
• x.com loading fix: truncate long GraphQL URLs that were overflowing Apps Script's URL length cap and bouncing with a generic relay error (ported from upstream Python)
11+
• Android SNI editor: paste a whole list of subdomains once and Add picks them all up — whitespace, comma, and newline separated all work (issue #47)
12+
• Persian FAQ in README: UrlFetchApp quota corrected to 20,000/day (not 2 million), with reference to Google's official docs (issue #63)

src/rlimit.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//! SOCKS5 flood from a client like v2ray, fills the limit within seconds.
88
//! Once the limit is hit `accept(2)` returns `EMFILE` and the user sees:
99
//!
10-
//! ERROR accept (socks): No file descriptors available (os error 24)
10+
//! ```text
11+
//! ERROR accept (socks): No file descriptors available (os error 24)
12+
//! ```
1113
//!
1214
//! Approach:
1315
//! - Try to raise the SOFT limit to a generous target.

0 commit comments

Comments
 (0)