node.js - NodeJS X-Ray Hide IP Address -


is possible change ip address , user agent when using nodejs/x-ray make requests external site?

yes can.

but instead of passing url(s) want scrape x-ray, rather use request module response, , pass x-ray. allow pass options request module, allow change user agent use proxy (which best way 'change' ip).

var options = {     headers: {'user-agent': 'mozilla/5.0 (compatible; msie 10.0; windows nt 7.0; infopath.3; .net clr 3.1.40767; trident/6.0; en-in)'},     proxy: 'http://us-ny.proxymesh.com:31280',     strictssl: false };  request(url, options, function (err, response) {      xray(response.body, {         //x-ray selectors                 })     (function (err, obj) {     //parse results     } }); 

Comments