<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,<br><div><br></div><div>I have an extremely specific question about manipulating Squid to run to in a very specific way.</div><div>Due to the complexity, I will gladly accept a "not possible" answer.</div><div><br></div><div>I need to make the following changes to Squid, or somehow manipulate Squid to:</div><div><br></div><div>1) Always consider a client intercepted. This would mean that COMM_INTERCEPTION is set for every client no matter what.</div><div><br></div><div>2) NS lookups for domains needs to be disabled or simply return localhost. I have considered setting AI_NUMERICHOST flag for every getaddrinfo() call, but I don't think this function is used for making connections to a website (gethostbyname seems to be used in some places).</div><div><br></div><div>3) Every outward connection Squid makes needs to be forwarded to localhost on a specific port.</div><div><br></div><div><br></div><div>Why do I need to do this?</div><div>I have a large set of files which contain HTTP requests (headers included).</div><div>I have a large set of files which contain HTTP responses (headers included).</div><div><br></div><div>I would like to loop the HTTP requests, sending each request to Squid, and then I would like to run a loop, responding with each of the HTTP responses I have stored. The idea is to get a nice code coverage report which I can use for research later on.</div><div><br></div><div>Like I said, this is a bit complicated, but I thought I would act, perhaps somebody has an interesting idea how to do this :-). It will most certainly require me to somehow defile the source code, but this is just temporary and is nothing to do with a production service.</div><div><br></div><div>Happy to hear any ideas.</div><div><br></div><div>Cheers,</div><div>Josh</div></div></div></div></div>