fix(usni): use https.request for proxy CONNECT (Decodo port 10001 is HTTPS) (#2408)

This commit is contained in:
Elie Habib
2026-03-28 11:32:53 +04:00
committed by GitHub
parent c3e78230ff
commit f5a1512d65
2 changed files with 5 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
function parseProxyConfig(raw) {
if (!raw) return null;
// Standard URL format: http://user:pass@host:port
// Standard URL format: http://user:pass@host:port or https://user:pass@host:port
try {
const u = new URL(raw);
if (u.hostname) {
@@ -20,6 +20,7 @@ function parseProxyConfig(raw) {
host: u.hostname,
port: parseInt(u.port, 10),
auth: u.username ? `${decodeURIComponent(u.username)}:${decodeURIComponent(u.password)}` : null,
tls: u.protocol === 'https:',
};
}
} catch { /* fall through */ }