const req = require('request');
var options = {
url: 'https://vk.com/',
proxy: 'https://login:password@XXX.XXX.XXX.XXX:YYYY/',
method: 'POST',
headers: headers,
};
var headers = {
'User-Agent': 'Node js'
};
function callback(error, response, body) {
console.log(error);
if (response !== undefined)
console.log(response.statusCode);
}
req(options, callback);
{ [Error: tunneling socket could not be established, cause=write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:] code: 'ECONNRESET' }
var options = {
url: 'https://vk.com',
proxy: 'http://login:password@XXX.XXX.XXX.XXX:YYYY',
method: 'POST',
headers: headers,
strictSSL: false
};