From 62a8c28a6a48fd71563b3650011e51d06e92e40b Mon Sep 17 00:00:00 2001 From: suyao Date: Sun, 16 Mar 2025 05:16:03 +0800 Subject: [PATCH] fix: correct proxy URL parsing in ProxyManager --- src/main/services/ProxyManager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/services/ProxyManager.ts b/src/main/services/ProxyManager.ts index 5a839a13..dd08e1c8 100644 --- a/src/main/services/ProxyManager.ts +++ b/src/main/services/ProxyManager.ts @@ -139,7 +139,8 @@ export class ProxyManager { setGlobalProxy() { const proxyUrl = this.proxyUrl if (proxyUrl) { - const [protocol, host, port] = proxyUrl.split(':') + const [protocol, address] = proxyUrl.split('://') + const [host, port] = address.split(':') if (!protocol.includes('socks')) { setGlobalDispatcher(new ProxyAgent(proxyUrl)) } else {