Files
MasterHttpRelayVPN-RUST/docs/changelog/v1.9.26.md
T
therealaleph d8aea032b9 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
2026-05-15 16:50:16 +03:00

2.7 KiB

بهینه‌سازی Full mode Apps Script: batch کردن Edge-DNS cache lookupها (PR #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 کنید.

--- • **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.