I need a gratis tool for Windows which opens a specific TCP port (configurable, e.g. Port 80) and returns an HTTP error code (configurable, e.g. HTTP 503).
It must have a command line version. It doesn't need a UI, but may also have a UI, e.g. if no parameters were given. It shall not be a Browser extension (Chrome, Firefox).
The tool should be as simple as possible. I don't really want a full web proxy with REST support and tons of configuration. This must be BDU (brain dead user) compatible :-)
While that might be almost trivial to implement myself, I'd prefer not to get a programming language suggestion. I don't want to maintain this thing.
What would I use this for?
Some of our applications use HTTP. I want to see how they behave if the service is not available etc.
Speeding up applications.
Some applications are trying to connect to the Internet, but our IT department has blocked the port by a Firewall. Therefore, those applications will never get an answer. Typically they will retry 3 times and wait up to 1 minute per try. This gives a 3 minute delay.
With the tool, I can change the
hostsfile to point to my local machine. If the tool returns a HTTP404, the application will likely stop after 1 try and also get an answer immediately, so there's no need to wait.