TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
873 stars 228 forks source link

ERR_INVALID_PROTOCOL in NodeJS 15 when connect https url through http proxy #115

Closed gchoqueux closed 3 years ago

gchoqueux commented 3 years ago

When I connect https url (https://example.com) through http proxy (http://127.0.0.1:1080) in NodeJS v15.0.1, the following error occurred:

ERR_INVALID_PROTOCOL TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"

This is the same fixed issue in https://github.com/TooTallNate/node-agent-base/pull/47

node-agent-base has not been updated in node-https-proxy-agent.

Could you upgrade node-agent-base 6 to 6.0.2, please?

TooTallNate commented 3 years ago

https-proxy-agent specifies a loose version for agent-base (6) which includes 6.0.2. You need to run yarn upgrade / npm update to update your installed dependencies to their latest versions.

gchoqueux commented 3 years ago

thanks

dilame commented 3 years ago

My yarn installs agent-base@6.0.0, i can't even affect it. Could you please update your package.json?

alamothe commented 3 years ago

Hello, I am getting the same error even with latest versions:

yarn list v1.22.10
├─ agent-base@6.0.2
├─ http-proxy-agent@4.0.1
└─ https-proxy-agent@5.0.0

The error is only on Node 15. Any recommendations?