Wednesday 27 November 2013

Testing an IP:Port Proxy Server

It is common to use proxy servers to query webpages using programs written in Python, Java, etc. In doing so, it is necessary to maintain a list of proxies which are guaranteed to work as and when we make a webpage query. This can be done by storing a list of proxies in a database and by running a daemon to periodically check whether a particular proxy does what it is supposed to do. There are two important things that you need to consider in testing a proxy server:
  1. Is the proxy server available - this check refers to the proxy server connectivity.
  2. Is the proxy server correct -  this check is performed to see whether a proxy server is providing the requested webpage or replies with a random webpage.

The following Python code for testing IP:Port proxy servers can be used as a guidance:


It is important to ensure that the webpage used for testing (http://www.testpage.com) is reachable and static. If the webpage is neither reachable nor static then the above test will indicate a proxy failure, which in fact is a false alarm!

  • A list of IP:Port proxy servers can be obtained from Hide My Ass .


No comments:

Post a Comment