Open adefirmanf opened 4 years ago
Hey, I got the following an error. tunneling socket could not be established, cause=Hostname/IP does not match certificate's altnames
tunneling socket could not be established, cause=Hostname/IP does not match certificate's altnames
Here my code :
const tunnellingAgent = tunnel.httpsOverHttps({ proxy: { ca: [fs.readFileSync('ca.pem')], host: "targetHost.com", port: 3129, proxyAuth: "user:pass", } }) const options = { host: "api.ipify.org", url: "https://api.ipify.org/?format=text", method: "GET", agent: tunnellingAgent, checkServerIdentity: function (host, err) { } } R(options, (err, res) => { console.log(err) console.log(res) })
The error seems similar to this issue https://github.com/request/request/issues/1777 and https://github.com/koichik/node-tunnel/issues/28
Add rejectUnauthorized: false option solve the issue but the certificate file just do nothing in there. https://github.com/request/request/issues/1777#issuecomment-321024249
rejectUnauthorized: false
So any other solution? Thanks
same problme here
same problem here to
Hey, I got the following an error.
tunneling socket could not be established, cause=Hostname/IP does not match certificate's altnames
Here my code :
The error seems similar to this issue https://github.com/request/request/issues/1777 and https://github.com/koichik/node-tunnel/issues/28
Add
rejectUnauthorized: false
option solve the issue but the certificate file just do nothing in there. https://github.com/request/request/issues/1777#issuecomment-321024249So any other solution? Thanks