diff --git a/src/utils/proxy/http.js b/src/utils/proxy/http.js index 134b81fd3..1755dd936 100644 --- a/src/utils/proxy/http.js +++ b/src/utils/proxy/http.js @@ -85,16 +85,20 @@ export async function httpProxy(url, params = {}) { let request = null; if (constructedUrl.protocol === "https:") { - const httpsAgent = new https.Agent({ - rejectUnauthorized: false, - }); - request = httpsRequest(constructedUrl, { - agent: httpsAgent, + agent: new https.Agent({ + rejectUnauthorized: false, + autoSelectFamily: true, + }), ...params, }); } else { - request = httpRequest(constructedUrl, params); + request = httpRequest(constructedUrl, { + agent: new http.Agent({ + autoSelectFamily: true, + }), + ...params, + }); } try {