我有这样的 HTTP/HTTPS/Socks 代理服务器列表:
1.2.3.4:80
5.6.7.8:8080
...
我需要测试每个服务器是否正常工作以及是否是匿名的。我计划将这些服务器添加到我的网络浏览器代理设置中。
当我准备回答时,我发现:
它基本上做了我想做的事情。它测试匿名代理列表。所以我想现在的问题是,是否有其他类似的应用程序比这个应用程序更好?再次感谢
答案1
未经测试:
cat proxylist | parallel --tag curl --proxy {} -o /dev/null --silent --head --write-out '%{http_code}' http://www.fsf.org/ --max-time 5
应该给出:
proxy:port 200
如果代理有效。
答案2
ProxySampler 是一个 golang CLI 工具,用于测试代理列表:https://github.com/packetstream/proxysampler
proxysampler --output json --file ./proxies.txt --endpoint https://ifconfig.co/json --include-response-body
{
"success": 3,
"fail": 0,
"average_ttfb": 693,
"results": [
{
"proxy": "https://proxyuser:[email protected]:31111",
"endpoint": "https://ifconfig.co/json",
"status_code": 200,
"response_body": "{\"ip\":\"47.149.139.253\",\"ip_decimal\":798329853,\"country\":\"United States\",\"country_eu\":false,\"country_iso\":\"US\",\"city\":\"Torrance\",\"latitude\":33.846,\"longitude\":-118.3456,\"asn\":\"AS5650\",\"asn_org\":\"Frontier Communications of America, Inc.\"}",
"latency": {
"ttfb": 552,
"connect": 29,
"tls_handshake": 141
},
"error": null
},
{
"proxy": "https://proxyuser:[email protected]:31111",
"endpoint": "https://ifconfig.co/json",
"status_code": 200,
"response_body": "{\"ip\":\"63.237.69.254\",\"ip_decimal\":1072514558,\"country\":\"United States\",\"country_eu\":false,\"country_iso\":\"US\",\"city\":\"Walkersville\",\"hostname\":\"ssl.clarkconstruction.com\",\"latitude\":39.4787,\"longitude\":-77.3484,\"asn\":\"AS16431\",\"asn_org\":\"The Clark Construction Group, Inc.\"}",
"latency": {
"ttfb": 534,
"connect": 28,
"tls_handshake": 114
},
"error": null
},
{
"proxy": "https://proxyuser:[email protected]:31111",
"endpoint": "https://ifconfig.co/json",
"status_code": 200,
"response_body": "{\"ip\":\"24.167.234.46\",\"ip_decimal\":413657646,\"country\":\"United States\",\"country_eu\":false,\"country_iso\":\"US\",\"city\":\"Milwaukee\",\"hostname\":\"cpe-24-167-234-46.wi.res.rr.com\",\"latitude\":43.1166,\"longitude\":-87.9904,\"asn\":\"AS10796\",\"asn_org\":\"Charter Communications Inc\"}",
"latency": {
"ttfb": 993,
"connect": 27,
"tls_handshake": 272
},
"error": null
}
]
}