node.js - Using multiple proxies via request.js -
i trying send list of proxy addresses requestjs & want use first 1 that's working. @ possible via request.js
my code
var body = '<sample/>'; request.post({ url: www.google.com, proxy':'http://proxy1:8087;http://proxy2:8080',//need use multiple proxies here. headers: { //we can define headers 'content-type': 'text/xml' }, body: body, timeout:20000 }
i thinking of looping through list of proxies , try use them 1 one. not sure if have been overkill or way possible.
requestjs cannot loop through proxies, best possible option use agent module alongwith https://www.npmjs.com/package/pac-proxy-agent
but module not iterate through list now. feasible option loop through list of proxies , use first 1 reachable now.
Comments
Post a Comment