I want to implement a proxy that records and replays requests made to specific hosts. So that I can stub out external service requests when testing an application.

What is the best way to do this? I have tried modifying the hosts file so that domain.com goes to my localhost, but then this prevents my proxy from then making requests to that domain.

Is there some combination of /etc/hosts change and iptables that I can use to achieve this?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.