Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm posting this on AskUbuntu because "easiest" in my case includes giving preference to solutions depending only on software available in the default Ubuntu repositories. (to be more accurate, 12.04)

I am currently developing an application that accesses web APIs and would like to test whether proxy support is working. Ideally, I would like to run a local server and simply tell my application to access the proxy in localhost.

The catch is that my application supports SOCKS4, SOCKS5, and HTTP proxies, and I would like to test all possible error cases. This means:

  • sending a SOCKS5/HTTP request to a SOCKS4 server must not work
  • sending a SOCKS4/HTTP request to a SOCKS5 server must not work
  • sending a SOCKS5/SOCKS5 request to a HTTP server must not work

(all cases both with and without authentication)

So I can't use ssh -D for SOCKS, for example, because it automagically accepts both SOCKS4 and SOCCKS5 connections.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

There is no easy way to exhaustively test proxy support.

To exhaustively test, you would need to configure proxy servers in the various combinations of servers and authentication settings, which are used in the real world, and test against all of them individually.

Note that in many scenarios, there may be Linux workstations in an office, though the proxy and some other services (such as Exchange, Intranet site, etc…) may still run on Windows under IIS.

It can be costly, and tiring, to test against all of these servers. The easiest thing to test against, would be squid, running on Ubuntu.

share|improve this answer
add comment

I suggest you try dante-server as your SOCKS proxy. It is extensively configurable and has a lot of features that should allow you to fine-tune your 4/5 test cases.

Note that the version in the Debian/Ubuntu repos is somewhat old (1.1.x), and you may prefer a more current 1.3.x version which is available as a PPA. I'm on my phone otherwise I'd link you to the exact PPA.

share|improve this answer
    
Thanks for the suggestion, I wasn't aware of dante. –  Marcelo Hashimoto Aug 9 '12 at 17:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.