Proxies issues Fixed [ Small Patch ]
This commit is contained in:
Killer069 2021-10-27 15:07:18 +05:30 committed by GitHub
commit af66f798e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -151,9 +151,13 @@ function proxy_getter(req_url: string, req_proxy: ProxyOptions[], headers?: Obje
password: parsed.password password: parsed.password
} }
}; };
} else opts = proxy; } else
opts = {
host: proxy.host,
port: Number(proxy.port)
};
let req: ClientRequest; let req: ClientRequest;
if (opts.authentication?.username.length === 0) { if (!opts.authentication) {
req = http.request({ req = http.request({
host: opts.host, host: opts.host,
port: opts.port, port: opts.port,