Search squid archive

Hacking Squid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm looking for a variable to insert here:

 /* 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);

pay close attention to

 inet_ntoa(orig_request->client_addr) : "unknown"), ',');

That will insert the subdomain of the proxy that the client is connecting to.

Example: User 123456 is proxied through 123456.squidproxy.com. Like apache I want to set squid to pickup the fact that this user is connecting to 123456.squidproxy.com and not 654321.squidproxy.com and then forward this data in the header. Anyone have any ideas how this might be done?

David Neudorfer

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux