MCPcopy Create free account
hub / github.com/Noumena-Network/code / agentFactory

Function agentFactory

src/utils/telemetry/instrumentation.ts:810–825  ·  view source on GitHub ↗
(_protocol: string)

Source from the content-addressed store, hash-verified

808 // Return an HttpAgentFactory function that creates our proxy agent
809 const caCerts = getCACertificates()
810 const agentFactory = (_protocol: string) => {
811 // Create and return the proxy agent with mTLS and CA cert config
812 const proxyAgent =
813 mtlsConfig || caCerts
814 ? new HttpsProxyAgent(proxyUrl, {
815 ...(mtlsConfig && {
816 cert: mtlsConfig.cert,
817 key: mtlsConfig.key,
818 passphrase: mtlsConfig.passphrase,
819 }),
820 ...(caCerts && { ca: caCerts }),
821 })
822 : new HttpsProxyAgent(proxyUrl)
823
824 return proxyAgent
825 }
826
827 config.httpAgentOptions = agentFactory
828 return config

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected