(url: string)
| 241 | * Returns undefined if no proxy is configured or URL should bypass proxy |
| 242 | */ |
| 243 | export 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. |
no test coverage detected