I am sending a GET request using a proxy. If I do not set tunneling to false I get an error as shown below:
Error: tunneling socket could not be established, cause=connect EINVAL 0.0.159.213:80 - Local (0.0.0.0:0)
If I set tunnel = false
, I get the following error:
Invalid protocol: 188.168.58.130:
Code:
const request = require('request');
request({
method: 'GET',
url,
proxy: "188.168.58.130:40917",
tunnel: false
}, (err, res, body) => { ... })