MCPcopy Create free account
hub / github.com/Rfym21/Qwen2API / resolveProxyUrl

Function resolveProxyUrl

src/utils/proxy-helper.js:32–37  ·  view source on GitHub ↗
(account)

Source from the content-addressed store, hash-verified

30 const dispatcher = proxyAgent instanceof HttpsProxyAgent ? new ProxyAgent({
31 uri: proxyAgent.proxy.href,
32 token: proxyAgent.proxy.username || proxyAgent.proxy.password
33 ? `Basic ${Buffer.from(`${decodeURIComponent(proxyAgent.proxy.username)}:${decodeURIComponent(proxyAgent.proxy.password)}`).toString('base64')}`
34 : undefined,
35 requestTls: { ...proxyAgent.options, timeout: PROXY_CONNECT_TIMEOUT_MS },
36 proxyTls: { ...proxyAgent.connectOpts, timeout: PROXY_CONNECT_TIMEOUT_MS },
37 clientFactory: (origin, options) => new Pool(origin, { ...options, headersTimeout: PROXY_CONNECT_TIMEOUT_MS })
38 }) : new Agent({
39 connect: async (options, callback) => {
40 let socket;

Callers 1

getProxyAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected