mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-10 18:39:38 -06:00
fix: handle undefined protocol in makeProxyAgent
This commit is contained in:
parent
4a38e505f4
commit
3818313161
@ -55,7 +55,7 @@ export function makeProxyAgentUndici(proxy: Proxy | string): ProxyAgent {
|
|||||||
proxyUrl = proxy
|
proxyUrl = proxy
|
||||||
} else {
|
} else {
|
||||||
const { host, password, port, protocol: proto, username } = proxy
|
const { host, password, port, protocol: proto, username } = proxy
|
||||||
protocol = proto.replace(':', '')
|
protocol = (proto || 'http').replace(':', '')
|
||||||
|
|
||||||
if (protocol === 'socks') {
|
if (protocol === 'socks') {
|
||||||
protocol = 'socks5'
|
protocol = 'socks5'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user