mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(usni): use https.request for proxy CONNECT (Decodo port 10001 is HTTPS) (#2408)
This commit is contained in:
@@ -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 */ }
|
||||
|
||||
Reference in New Issue
Block a user