feat: add proxy setup using undici and update undici version

This commit is contained in:
Zou Dikai committed 2026-03-15 07:14:49 +00:00
1 parent 59a2eaf1c6
commit c542606582
4 files changed
+18 -1

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { EnvHttpProxyAgent, setGlobalDispatcher } from 'undici';
const proxyUrl =
process.env.HTTPS_PROXY ||
process.env.https_proxy ||
process.env.HTTP_PROXY ||
process.env.http_proxy;
if (proxyUrl) {
setGlobalDispatcher(new EnvHttpProxyAgent());
}