mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 22:15:33 +00:00
feat: add proxy setup using undici and update undici version
This commit is contained in:
1 parent
59a2eaf1c6
commit
c542606582
4 files changed
+18
-1
No files matched your search
@@ -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());
|
||||
}
|
||||
Reference in new issue
Block a user