Forcing interception(transparent) mode, disabling NS lookups, and 'secretly' forwarding connections

Joshua Rogers <[email protected]>
Newsgroups gmane.comp.web.squid.devel
Message-ID <CAOCwWhGywGKMVqugaEn2rsYOV-g03ieb1d0JUVUhuvpYw6uSkQ@mail.gmail.com>
Hi all,

I have an extremely specific question about manipulating Squid to run to in
a very specific way.
Due to the complexity, I will gladly accept a "not possible" answer.

I need to make the following changes to Squid, or somehow manipulate Squid
to:

1) Always consider a client intercepted. This would mean
that COMM_INTERCEPTION is set for every client no matter what.

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).

3) Every outward connection Squid makes needs to be forwarded to localhost
on a specific port.


Why do I need to do this?
I have a large set of files which contain HTTP requests (headers included).
I have a large set of files which contain HTTP responses (headers included).

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.

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.

Happy to hear any ideas.

Cheers,
Josh

_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.