开发者

How can I check if a SOCKS server is working?

I'd like to periodicity check if my SOCKS 5 server is working fine. Just pinging the server or successfully connecting to the SOCKS service is not enough for me. I'd like to check that th开发者_JAVA技巧e server is actually working, by successfully downloading an HTML file, for example (Or any other reasonable way).

How should I check it? How can I do it?

Thanks.


Try the pycyurl library, as it supports SOCKS 5 proxies. Another answer shows how to use it. You could then use smtplib to send you an email if your proxy is down, and drop the finished script in your crontab (or some other means of automating it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜