You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserve the new body-stream idle timeout across every config-facing path that can rewrite configuration. Desktop Save now round-trips stream_timeout_secs alongside request_timeout_secs, preventing hand-edited large-download timeout settings from being silently dropped.
Document the split timeout model in the TOML examples and user guides: request_timeout_secs bounds relay connection and response-header arrival, while stream_timeout_secs bounds idle time between body chunks after headers have arrived. This keeps dead destinations bounded without aborting slow range downloads mid-stream.
Update the guide's implementation matrix to reflect the active range-aware download path and its remaining quota cost. Large range-capable responses can stream in chunks and resume cleanly with Range: bytes=N-, but each chunk remains an Apps Script UrlFetchApp call.
Add regression coverage for TOML parsing and defaults, JSON migration round-trip preservation, Range header start parsing, and validation of non-zero-offset resume probes.
| بیلد musl | OpenWRT / Alpine / محیطهای بدون libc — باینری استاتیک، با procd init |
369
372
|**Exit node**| برای سایتهای پشت Cloudflare (v1.9.4+) |
370
373
|**Unwrap goog.script.init**| دفاعدرعمق در مقابل Deploymentهایی که پاسخ HtmlService-wrapped میفرستند (v1.9.6+) |
374
+
| دانلود بزرگ Range-aware | استریم chunk شده و resume برای درخواستهای `Range: bytes=N-`|
375
+
| timeout جدا برای رله |`request_timeout_secs` برای اتصال/هدر و `stream_timeout_secs` برای idle هر chunk بدنه |
371
376
372
377
### عمداً پیاده نشده
373
378
374
379
| ویژگی | چرا نه |
375
380
|---|---|
376
381
| HTTP/2 multiplexing | state machine کریت `h2` (stream IDs، flow control، GOAWAY) موارد hang ظریف زیادی دارد؛ coalescing + pool ۲۰-conn بیشتر فایده را میگیرد |
377
382
| Batch (`q:[...]` در apps_script) | connection pool + tokio async از قبل خوب موازیسازی میکند؛ batch ~۲۰۰ خط مدیریت state اضافه میکند با سود نامشخص |
378
-
| Range-based parallel download | edge caseهای واقعی (سرورهای بدون Range، chunked وسط stream)؛ ویدیوی یوتیوب از قبل با تونل بازنویسی SNI، Apps Script را دور میزند |
379
383
| حالتهای `domain_fronting` / `google_fronting` / `custom_domain`| Cloudflare در ۲۰۲۴ domain fronting عمومی را کشت؛ Cloud Run پلن پولی میخواهد |
برای مرور متنی خوب است، برای ۱۰۸۰p دردناک. چند `script_id` بچرخان برای هد روم بیشتر، یا VPN واقعی برای ویدیو.
396
400
401
+
### دانلودهای بزرگ هنوز سهمیه مصرف میکنند
402
+
403
+
رله میتواند پاسخهای Range-capable را chunk شده استریم کند و وقتی کلاینت با `Range: bytes=N-` ادامه میدهد، resume تمیز داشته باشد. اما هر chunk هنوز یک اجرای `UrlFetchApp` است. `request_timeout_secs` فقط اتصال و رسیدن هدرها را کنترل میکند؛ `stream_timeout_secs` سکوت بین chunkهای بدنه را.
404
+
397
405
### Brotli حذف میشود
398
406
399
407
از هدر `Accept-Encoding` `br` حذف میشود. Apps Script gzip را decompress میکند ولی Brotli نه؛ forward کردن `br` پاسخ را خراب میکند. سربار حجمی جزئی.
-[x]**Exit node** support for Cloudflare-fronted sites (v1.9.4+)
366
369
-[x]**Goog.script.init iframe unwrap** — defense-in-depth against deployments that return HtmlService-wrapped responses (v1.9.6+)
370
+
-[x] Range-aware large download streaming with resume support for `Range: bytes=N-` requests
371
+
-[x] Separate relay header/connect timeout and per-chunk body idle timeout
367
372
368
373
Intentionally **not** implemented:
369
374
370
375
-**HTTP/2 multiplexing** — `h2` crate state machine has too many subtle hang cases; coalescing + 20-conn pool gets most of the benefit
371
376
-**Request batching (`q:[...]` mode in apps_script mode)** — connection pool + tokio async already parallelizes well; batching adds ~200 lines of state for unclear gain
372
-
-**Range-based parallel download** — edge cases real (non-Range servers, chunked mid-stream); YouTube already bypasses Apps Script via SNI-rewrite tunnel
373
377
-**Other modes** (`domain_fronting`, `google_fronting`, `custom_domain`) — Cloudflare killed generic domain fronting in 2024; Cloud Run needs a paid plan
374
378
375
379
## Known limitations
@@ -378,6 +382,7 @@ These are inherent to the Apps Script + domain-fronting approach, not bugs in th
378
382
379
383
-**User-Agent fixed to `Google-Apps-Script`** for traffic through the relay. `UrlFetchApp.fetch()` doesn't allow override. Sites that detect bots (Google search, some CAPTCHAs) serve degraded / no-JS pages. Workaround: add the affected domain to the `hosts` map so it's routed through the SNI-rewrite tunnel with your real browser's UA. `google.com`, `youtube.com`, `fonts.googleapis.com` are already there.
380
384
-**Video playback slow and quota-limited** for anything through the relay. YouTube HTML loads fast (SNI-rewrite tunnel), but `googlevideo.com` chunks go through Apps Script. Free tier: ~20k `UrlFetchApp` calls / day, 50 MB body cap per fetch. Fine for text browsing, painful for 1080p. Rotate multiple `script_id`s for headroom, or use a real VPN for video.
385
+
-**Large downloads still consume Apps Script calls.** The relay can stream range-capable responses in chunks and resume cleanly when clients retry with `Range: bytes=N-`, but every chunk is still a `UrlFetchApp` invocation. `request_timeout_secs` controls connection/headers; `stream_timeout_secs` controls idle time between body chunks.
381
386
-**Brotli stripped** from forwarded `Accept-Encoding`. Apps Script can decompress gzip but not `br`; forwarding `br` would garble responses. Minor size overhead.
382
387
-**WebSockets don't work** through the relay — it's request / response JSON. Sites that upgrade to WS fail (ChatGPT streaming, Discord voice, etc.).
383
388
-**HSTS-preloaded / hard-pinned sites** reject the MITM cert. Most sites are fine; a handful aren't.
0 commit comments