fix(#1419): fixed ignored SSL verification and client certificates configuration when using SOCKS proxy (#1420)

This commit is contained in:
Martin Sefcik
2024-01-29 15:49:08 +01:00
committed by GitHub
parent c3f6318d69
commit a077d65a3e
2 changed files with 10 additions and 6 deletions

View File

@@ -158,9 +158,11 @@ const runSingleRequest = async function (
}
if (socksEnabled) {
const socksProxyAgent = new SocksProxyAgent(proxyUri);
request.httpsAgent = socksProxyAgent;
request.httpAgent = socksProxyAgent;
request.httpsAgent = new SocksProxyAgent(
proxyUri,
Object.keys(httpsAgentRequestFields).length > 0 ? { ...httpsAgentRequestFields } : undefined
);
request.httpAgent = new SocksProxyAgent(proxyUri);
} else {
request.httpsAgent = new PatchedHttpsProxyAgent(
proxyUri,