Files
MasterHttpRelayVPN-RUST/docs/changelog/v1.9.27.md
T
therealaleph d725785132 chore: v1.9.27 — Deno exit-node fixes
Ship Deno-compatible exit_node exports, raw exit-node response handling, stale content-encoding stripping, and fallback JSON parser hardening.
2026-05-16 16:35:10 +03:00

4.3 KiB

رفع deploy نشدن exit_node.ts روی Deno جدید (#1197، #1120). نسخه‌های جدید deno serve / Deno Deploy انتظار دارند entrypoint به شکل export default { fetch: ... } باشد. exit_node.ts قبلاً یک تابع async را مستقیم default-export می‌کرد و برای بعضی کاربران با خطاهای deploy-warm up failed / deploy-route failed شکست می‌خورد. حالا export shape با Deno جدید سازگار است و wrapper.ts همچنان برای VPS / Deno / Bun / Node کار می‌کند. اگر exit node را جدا deploy کرده‌اید، فایل جدید assets/exit_node/exit_node.ts را کپی کنید، PSK را تنظیم کنید، و دوباره deploy کنید.

رفع مسیر Deno exit-node و خطای Content Encoding Error (PR #1209 از @CaptainMirage، #1222). Code.gs حالا وقتی mhrv-rs برای exit node پاسخ raw می‌خواهد، جواب {s,h,b} خود exit node را دوباره داخل envelope دوم نمی‌پیچد. سمت Rust هم header قدیمی content-encoding از پاسخ exit-node حذف می‌شود، چون runtimeهای fetch مثل Deno body را auto-decompress می‌کنند ولی ممکن است header فشرده‌سازی قدیمی را نگه دارند؛ همین mismatch باعث خطای مرورگر می‌شد. برای استفاده از این fix باید Code.gs جدید را هم در Apps Script با New version deploy کنید.

سخت‌تر شدن parser در برابر پاسخ‌های relay خراب (PR #1229 از @CaptainMirage). اگر fallback JSON extraction با متنی روبه‌رو شود که جای { و } در آن معکوس یا نامعتبر است، حالا به‌جای panic/برش نامعتبر، خطای no valid json object برمی‌گرداند. این مخصوصاً برای پاسخ‌های HTML/decoy/truncated از Apps Script مسیر خطا را قابل فهم‌تر و امن‌تر می‌کند.

--- • **Fix `exit_node.ts` deployment on newer Deno** ([#1197](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/issues/1197), [#1120](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/issues/1120)). Current `deno serve` / Deno Deploy flows expect the entrypoint to use `export default { fetch: ... }`. `exit_node.ts` previously default-exported a bare async function, which caused `deploy-warm up failed` / `deploy-route failed` for some users. The export shape now matches modern Deno, while `wrapper.ts` remains compatible with VPS / Deno / Bun / Node use. If you deploy the exit node separately, copy the new `assets/exit_node/exit_node.ts`, set `PSK`, and redeploy.

Fix the Deno exit-node path and browser Content Encoding Error (PR #1209 by @CaptainMirage, #1222). Code.gs now returns the exit node's raw {s,h,b} response when mhrv-rs requests it instead of wrapping it in a second envelope. The Rust side also strips stale content-encoding from exit-node responses because fetch runtimes such as Deno auto-decompress the body but may preserve the original compression header; that mismatch was what made browsers report content encoding failures. Deploy the new Code.gs as a new Apps Script version to get this fix.

Harden relay fallback parsing against malformed responses (PR #1229 by @CaptainMirage). If fallback JSON extraction sees text where the { / } positions are inverted or invalid, it now returns no valid json object instead of slicing with invalid bounds. This makes HTML/decoy/truncated Apps Script responses fail more cleanly.