diff --git a/server/utils/customProxyAgent.ts b/server/utils/customProxyAgent.ts index 321aa9048..11f56980d 100644 --- a/server/utils/customProxyAgent.ts +++ b/server/utils/customProxyAgent.ts @@ -14,7 +14,11 @@ export default async function createCustomProxyAgent( proxySettings: ProxySettings, forceIpv4First?: boolean ) { - const defaultAgent = new Agent({ keepAliveTimeout: 5000 }); + const defaultAgent = new Agent({ + keepAliveTimeout: 5000, + connections: 50, + connect: forceIpv4First ? { family: 4 } : undefined, + }); const skipUrl = (url: string | URL) => { const hostname = @@ -68,6 +72,8 @@ export default async function createCustomProxyAgent( uri: proxyUrl, token, keepAliveTimeout: 5000, + connections: 50, + connect: forceIpv4First ? { family: 4 } : undefined, }); setGlobalDispatcher(proxyAgent.compose(noProxyInterceptor));