axios: AxiosError: write EPROTO 1C3B0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:355:
I get this error when I try to send a request via proxy with Axios. I’ve searched the Internet, but I haven’t been able to reach any results.
const axios = require('axios')
axios({
url: 'http://medal.tv',
method:'GET',
proxy: {
protocol: 'http',
host: 'xxx',
port: 3000,
auth: { username: 'xxx', password: 'xxx' }
}
}).then(e => console.log(e.data)).catch(e => console.log(e))
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 17
- Comments: 21
Solution: You only get this error when you change a supported proxy from “http” to “https”. So if you wrote “https://” change it to “http://”. Or vice versa.
Try like that with HttpsProxyAgent.
I was getting the error because in the proxy I wrote https instead of http.
I hope it will help you
nodejs implementation
What are you waiting to put it as resolved?
In node, use
axios-https-proxy-fixinstead ofaxiosif you have to use https proxy. Axios is apparently broken.same here, how fix?
Damn, he LITERALLY copied my answer, and he got 32 🎉 emjois, while MY ORIGINAL REAL ANSWER, got only 10 👍 Wtf?
there there, here are few 🎉🎉🎉🎉🎉, no need to cry anymore. go, get some lolly
After struggling a while, I use node-fetch instead of axios and it works well.
You could try your call with curl
curl -vvv http://medal.tv --proxy http://username:password@xxx:3000. This will probably result in a better error message to google…