chore(release): v1.9.26 — batch Apps Script edge-DNS cache

Ship PR #958 by @dazzling-no-more.

CodeFull.gs now resolves DNS candidates in two passes, using one CacheService.getAll(keys) lookup per tunnel batch and reusing successful DoH answers inside the same batch. Long qnames now get SHA-256 cache keys instead of skipping cache, while parse/DoH failures still fall back to the tunnel-node path.

Verification:

- node assets/apps_script/tests/edge_dns_batch_test.js

- node assets/apps_script/tests/edge_dns_test.js

- cargo test --lib

- cargo build --release

- cargo build --bin mhrv-rs-ui --release --features ui
This commit is contained in:
therealaleph
2026-05-15 16:50:16 +03:00
parent 4da0da7a27
commit d8aea032b9
3 changed files with 14 additions and 2 deletions
Generated
+1 -1
View File
@@ -2624,7 +2624,7 @@ dependencies = [
[[package]] [[package]]
name = "mhrv-rs" name = "mhrv-rs"
version = "1.9.25" version = "1.9.26"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"bytes", "bytes",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "mhrv-rs" name = "mhrv-rs"
version = "1.9.25" version = "1.9.26"
edition = "2021" edition = "2021"
description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting" description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting"
license = "MIT" license = "MIT"
+12
View File
@@ -0,0 +1,12 @@
<!-- see docs/changelog/v1.1.0.md for the file format: Persian, then `---`, then English. -->
<div dir="rtl">
**بهینه‌سازی Full mode Apps Script: batch کردن Edge-DNS cache lookupها** ([PR #958](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/pull/958) by @dazzling-no-more). مسیر `CodeFull.gs` قبلاً برای هر DNS query داخل batch یک `CacheService.get` جداگانه می‌زد. روی batchهای شلوغ، همین چند round-trip داخلی به CacheService می‌تونست latency بسازه، مخصوصاً وقتی چند lookup مشابه پشت سر هم می‌اومدن. حالا DNS candidateها در دو pass پردازش می‌شن: اول همه keyها جمع می‌شن، بعد یک `cache.getAll(keys)` برای کل batch انجام می‌شه، و جواب‌های DoH موفق هم داخل همان batch دوباره استفاده می‌شن تا query تکراری دوباره به resolver نخوره.
**مسیر امن fallback حفظ شده**. اگر CacheService خطا بده، DoH هنوز از داخل شبکه Google انجام می‌شه ولی `cache.put` غیرفعال می‌مونه؛ اگر parse/DoH شکست بخوره، همان op مثل قبل به tunnel-node forward می‌شه. qnameهای خیلی بلند هم به‌جای skip شدن، با SHA-256 زیر namespace جداگانه cache می‌شن تا محدودیت ۲۵۰ کاراکتری key در CacheService شکسته نشه. هیچ config migration یا تغییر سمت client لازم نیست؛ فقط `CodeFull.gs` جدید را deploy کنید.
</div>
---
**Optimize Full mode Apps Script by batching Edge-DNS cache lookups** ([PR #958](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/pull/958) by @dazzling-no-more). `CodeFull.gs` previously issued one `CacheService.get` per DNS query inside a tunnel batch. On busy batches, those repeated internal CacheService round-trips could add avoidable latency, especially when several lookups repeated the same qname/qtype. DNS candidates now run in two passes: collect all cache keys first, perform one `cache.getAll(keys)` for the whole batch, then reuse successful DoH answers inside the same batch so duplicate queries do not hit the resolver again.
**The safe fallback behavior is preserved**. If CacheService fails, DoH still runs from inside Google's network but `cache.put` is skipped; if parse/DoH fails, the op falls back to the existing tunnel-node forward path. Very long qnames now use a SHA-256 cache key under a separate namespace instead of skipping cache entirely, keeping keys below CacheService's 250-character limit. No client config migration is required; deploy the new `CodeFull.gs`.