MCPcopy
hub / github.com/codeaashu/claude-code / getWebSocketProxyAgent

Function getWebSocketProxyAgent

src/utils/proxy.ts:243–256  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

241 * Returns undefined if no proxy is configured or URL should bypass proxy
242 */
243export function getWebSocketProxyAgent(url: string): Agent | undefined {
244 const proxyUrl = getProxyUrl()
245
246 if (!proxyUrl) {
247 return undefined
248 }
249
250 // Check if URL should bypass proxy
251 if (shouldBypassProxy(url)) {
252 return undefined
253 }
254
255 return createHttpsProxyAgent(proxyUrl)
256}
257
258/**
259 * Get the proxy URL for WebSocket connections under Bun.

Callers 5

connectMethod · 0.85
openTunnelFunction · 0.85
connectMethod · 0.85
connectVoiceStreamFunction · 0.85
client.tsFile · 0.85

Calls 3

getProxyUrlFunction · 0.85
shouldBypassProxyFunction · 0.85
createHttpsProxyAgentFunction · 0.85

Tested by

no test coverage detected