[squid-users] Hacking Squid Source

From: David Neudorfer <davidneudorfer@dont-contact.us>
Date: Tue, 16 May 2006 18:03:03 -0700

What we are looking for is a variable which will represent the
requester's proxy host name. We presume it will be something similar
to apache's "virtual host" capabilities. For example, if a user's web
browser is set to connect to our proxy at host name
123456.mydomain.com, We'd be looking for a variable in the Squid
source for "123456.mydomain.com" or better yet just the subdomain
"123456".

We are looking to insert this variable into line ~960 of http.c in
place of "unknown" (as seen below).

/* append X-Forwarded-For */
strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR);
strListAdd(&strFwd,
(((orig_request->client_addr.s_addr != no_addr.s_addr) &&
opt_forwarded_for) ?
inet_ntoa(orig_request->client_addr) : "unknown"), ',');
httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd));
stringClean(&strFwd);

Thanks

David Neudorfer
Received on Tue May 16 2006 - 19:03:06 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:02 MDT