From 3818313161e26912a227989353fb703544661409 Mon Sep 17 00:00:00 2001 From: Jeferson Ramos Date: Mon, 27 Oct 2025 10:40:10 -0300 Subject: [PATCH] fix: handle undefined protocol in makeProxyAgent --- src/utils/makeProxyAgent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/makeProxyAgent.ts b/src/utils/makeProxyAgent.ts index 88fe32a9..e882876e 100644 --- a/src/utils/makeProxyAgent.ts +++ b/src/utils/makeProxyAgent.ts @@ -55,7 +55,7 @@ export function makeProxyAgentUndici(proxy: Proxy | string): ProxyAgent { proxyUrl = proxy } else { const { host, password, port, protocol: proto, username } = proxy - protocol = proto.replace(':', '') + protocol = (proto || 'http').replace(':', '') if (protocol === 'socks') { protocol = 'socks5'