From 92df5ddf5056bbcd3d1523ac7ddd9adf992bcef1 Mon Sep 17 00:00:00 2001 From: vberder Date: Tue, 23 Sep 2025 14:51:31 +0200 Subject: [PATCH] Add missing "Host:" line mandatory for few proxy (derived from Nginx). --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index b509e16..b9088ef 100644 --- a/index.js +++ b/index.js @@ -79,6 +79,7 @@ class myAgent extends https.Agent { let host = options.hostname if (!host) host = options.host let cmd = 'CONNECT ' + host + ':' + options.port + ' HTTP/1.1\r\n' + cmd += `Host: ${host}:${options.port}\r\n` if (options.proxy.auth) { // noinspection JSCheckFunctionSignatures const auth = Buffer.from(options.proxy.auth).toString('base64')