nodejs http代理请求

一些免费到代理地址html

http://www.xicidaili.com/nn测试

https://proxy.l337.tech/txturl

http://www.66ip.cn/nm.htmlspa

 

如下代码能够测试你是否正常代理,同时也能验证你的代理是否有效。代理

 request({ method: 'GET', url: 'http://ip.chinaz.com/getip.aspx', timeout: 8000, encoding: null, proxy: 'http://91.205.239.120:8080' }, function (err, _res, body) { if (err) throw new Error(err) body = body.toString(); console.log(body); })
相关文章
相关标签/搜索