fix: correct proxy URL parsing in ProxyManager

This commit is contained in:
suyao 2025-03-16 05:16:03 +08:00 committed by 亢奋猫
parent 190eea5a80
commit 386ea1e7da

View File

@ -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 {