From 085c832c9ab6ada92e99a6987dcdf8bd67c3f317 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 2 Nov 2025 21:00:52 +0000 Subject: fix: fix monolith to respect crawler proxy --- apps/workers/workers/crawlerWorker.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/workers') diff --git a/apps/workers/workers/crawlerWorker.ts b/apps/workers/workers/crawlerWorker.ts index 70b2e644..ae7cfcab 100644 --- a/apps/workers/workers/crawlerWorker.ts +++ b/apps/workers/workers/crawlerWorker.ts @@ -807,6 +807,15 @@ async function archiveWebpage( let res = await execa({ input: html, cancelSignal: abortSignal, + env: { + https_proxy: serverConfig.proxy.httpsProxy + ? getRandomProxy(serverConfig.proxy.httpsProxy) + : undefined, + http_proxy: serverConfig.proxy.httpProxy + ? getRandomProxy(serverConfig.proxy.httpProxy) + : undefined, + no_proxy: serverConfig.proxy.noProxy?.join(","), + }, })("monolith", ["-", "-Ije", "-t", "5", "-b", url, "-o", assetPath]); if (res.isCanceled) { -- cgit v1.2.3-70-g09d2