fix: correct proxy URL parsing in ProxyManager
This commit is contained in:
parent
7d048872e1
commit
62a8c28a6a
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user