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); })
相關文章
相關標籤/搜索