mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
* fix(engine): restricted downloads use the capture proxy's address rule With PRODUCER_RESTRICT_PAGE_NETWORK on, remote asset downloads now go through the same transport and host check as the render page's capture proxy: - An IPv6 literal host, or a name the capture proxy refuses, is not permitted, on the first request and on every redirect hop. - Names resolve to IPv4 answers only, every answer must be public, and the download dials the checked address. A name with only IPv6 answers does not download, as in the capture proxy. - Proxy variables (HTTPS_PROXY, NO_PROXY) are not used in this mode, so no host is dialled without the address check. HYPERFRAMES_CAPTURE_PROXY still routes downloads, as it does for the page. With the setting off, downloads keep the existing transport. * fix(engine): restricted downloads keep undici's transport with the capture resolver The capture transport refuses any compressed response and sends no User-Agent, and its socket and parse errors were not retried. Restricted downloads now use the same undici agent as before, with a connect lookup that calls the capture proxy's resolvePublicAddress: IPv4 answers only, every answer public, and the checked address is the one dialled. This keeps the old request headers (User-Agent, Accept: */*), gzip, br and deflate unpacking for text fetches under the existing byte cap, the asset path's refusal of compressed bodies, "fetch failed" retry handling, and connection reuse. Non-public destinations stay non-retryable refusals.