MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getAWSClientProxyConfig

Function getAWSClientProxyConfig

source code/utils/proxy.ts:396–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394 * Returns configuration object that can be spread into AWS service client constructors
395 */
396export async function getAWSClientProxyConfig(): Promise<object> {
397 const proxyUrl = getProxyUrl()
398
399 if (!proxyUrl) {
400 return {}
401 }
402
403 const [{ NodeHttpHandler }, { defaultProvider }] = await Promise.all([
404 import('@smithy/node-http-handler'),
405 import('@aws-sdk/credential-provider-node'),
406 ])
407
408 const agent = createHttpsProxyAgent(proxyUrl)
409 const requestHandler = new NodeHttpHandler({
410 httpAgent: agent,
411 httpsAgent: agent,
412 })
413
414 return {
415 requestHandler,
416 credentials: defaultProvider({
417 clientConfig: { requestHandler },
418 }),
419 }
420}
421
422/**
423 * Clear proxy agent cache.

Callers 2

createBedrockClientFunction · 0.85

Calls 2

getProxyUrlFunction · 0.85
createHttpsProxyAgentFunction · 0.85

Tested by

no test coverage detected