delvedor/hpagent

HTTP2 with hpagent does not work

Opened this issue · 2 comments

Using got and with http2 set to true, the hpagent does not seem to proxy properly.

Also, hpagent seems to give error 503s whenever a package dependency or the code itself includes an instance of https-proxy-agent here and http2 is set to false in got: https://www.npmjs.com/package/https-proxy-agent

const customAgent = new HttpsProxyAgent({
    keepAlive: true,
    keepAliveMsecs: 10000,
    maxSockets: 256,
    maxFreeSockets: 256,
    scheduling: 'lifo',
    proxy: 'XXX'
});

got(url, {
    http2: true,
    agent: {
        https: customAgent
         }
}
}.catch((err) => {
        console.log(`err.message`);
    })

Hello! As far as I know, keep alive agents are useless with http2, this agent is intended for HTTP 1.1.

Any plans to support HTTP 2?