(_protocol: string)
| 804 | // Return an HttpAgentFactory function that creates our proxy agent |
| 805 | const caCerts = getCACertificates() |
| 806 | const agentFactory = (_protocol: string) => { |
| 807 | // Create and return the proxy agent with mTLS and CA cert config |
| 808 | const proxyAgent = |
| 809 | mtlsConfig || caCerts |
| 810 | ? new HttpsProxyAgent(proxyUrl, { |
| 811 | ...(mtlsConfig && { |
| 812 | cert: mtlsConfig.cert, |
| 813 | key: mtlsConfig.key, |
| 814 | passphrase: mtlsConfig.passphrase, |
| 815 | }), |
| 816 | ...(caCerts && { ca: caCerts }), |
| 817 | }) |
| 818 | : new HttpsProxyAgent(proxyUrl) |
| 819 | |
| 820 | return proxyAgent |
| 821 | } |
| 822 | |
| 823 | config.httpAgentOptions = agentFactory |
| 824 | return config |
nothing calls this directly
no outgoing calls
no test coverage detected