I'm writing a client that talks to a remote server over HTTP. I would like to place an evil proxy between the client and the server that would (randomly?) affect the traffic on the wire.
Some things that I would like to happen:
- arbitrary delays for the response
- arbitrary HTTP errors
- this scenario is hard to imagine with TCP but what the hell: truncated responses (ie malformed data)
- temporary unavailability (though that seems hard given that this would have to be done at the lower network level).
- predefined custom errors (eg: every request comes back with a service error)
Basically I want to simulate a range of networking conditions that the users of this software are going to experience out in the real world and make sure the client handles them gracefully.
I suspect (hope) that something like that already exists. Please point me in the right direction!
Thanks