HTTPS over HTTP Proxy Fails
See original GitHub issueDescribe the bug
HTTPS over HTTP Proxy Fails with 500 handshakefailed on mcafee proxy.
mcafee initialize server context:handshakefailed:server state 1:state 9:Application response 500 handshakefailed
With HTTP_PROXY and HTTPS_PROXY set, curl works but axios.get fails.
To Reproduce
import axios from 'axios';
(async () => {
try {
console.log(await axios.get('https://github.com/'));
} catch (e) {
console.log(e);
}
})();
Expected behavior
Request should succeed.
Environment
- Axios Version [0.21.0]
- Node.js Version [v12.18.3]
- OS: [OSX 10.15.7]
Additional context/Screenshots
N/A
Current workaround
Install global-agent
, remove the HTTP_PROXY env vars and set GLOBAL_AGENT_HTTP_PROXY.
Add import 'global-agent/bootstrap';
to index.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:25
- Comments:18 (1 by maintainers)
Top Results From Across the Web
Request to HTTPS with HTTP proxy fails #925 - axios ... - GitHub
Summary Trying to do a HTTPS request with a HTTP proxy fails. const req = await axios({ url: 'https://somedomain.com', proxy: { host: ...
Read more >HTTPS Proxy connections fail with certificate_unknown error
Attempts to connect to an HTTPS SSL site via the Rational Integration Tester (RIT) HTTP Proxy fail. The Proxy log reports "Received fatal ......
Read more >HTTPS connections over proxy servers - Stack Overflow
Proxy starts HTTPS session to target; Proxy verifies integrity of SSL certificate; displays error if the cert is not valid. Proxy streams ...
Read more >Using HTTP Proxy Server Over SSL Fails with Error "Failed to ...
Symptoms. Seeing the following error when using the HTTP Proxy with HTTPS protocol: error "Failed to communicate with proxy: null/-1"
Read more >configurable-http-proxy - npm
Start using configurable-http-proxy in your project by running `npm i ... git clone https://github.com/jupyterhub/configurable-http-proxy cd ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @Niek - any ideas why the axios-https-proxy-fix fix aren’t merged into axios? I’m sure a lot of people are running into this.
set proxy to false can fix:
const axios = require('axios').create({ proxy: false })