diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-11-02 21:00:52 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-11-02 21:00:52 +0000 |
| commit | 085c832c9ab6ada92e99a6987dcdf8bd67c3f317 (patch) | |
| tree | fad7a5a0fd10304e958d66ba8ea312bd839119c7 | |
| parent | 5358682a8cfbd12d93a4e9962f7a9f0440c42c19 (diff) | |
| download | karakeep-085c832c9ab6ada92e99a6987dcdf8bd67c3f317.tar.zst | |
fix: fix monolith to respect crawler proxy
| -rw-r--r-- | apps/workers/workers/crawlerWorker.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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) { |
