[squid-users] I want to display indirect_client_address on error page.
squid3 at treenet.co.nz
Thu Aug 6 12:11:43 UTC 2015
On 6/08/2015 5:27 p.m., Kazuhiro Asakura wrote:
> Thank you Amos,
> From: Amos Jeffries
>>> I use "follow-x-forwarded-for" feature, and logged end point IP address.
>>> Also, I created customized error page for end user. but, env %i of
>>> error page does not be translate to end point IP address.
>> More correctly it is the direct endpoint of the client TCP connection.
>> Not the chain of multiple TCP connections, which may include NAT or
>> other protocol translations between Squid and a user.
> Sorry, My description not enough.
> In this environment, BIG-IP exist between end point PC and Squid.
> BIG-IP do NAT, and add X-FORWARDED-FOR header.
> BIG-IP include IP address of endpoint PC for X-FORWARDED-FOR header.
> So, I use follow-x-forwarded-for feature, and get endpoint PC IP address .
> This time, endpoint PC IP address is written into Squid access.log.
> Maybe, source code is below,
> #if FOLLOW_X_FORWARDED_FOR
> if (Config.onoff.log_uses_indirect_client && request)
> log_ip = request->indirect_client_addr;
> But, it is not assigned to environment variable of error page.
Correct. That is a bug, but not easily solved.
> If environment variable of error page could support "indirect_client_addr",
> I would really appreciate it.
>>> I want to display the address of end point to error page.
>>> If someone could suggest solution, I would really appreciate it.
>> place of the %i code that locates the users IP address and displays it
>> to them.
> I feel that way is difficult.
STUN ? I dont understand why that would be relevant.
If the error message is really for client reading then their brower
already is aware of its own IP address and should be able to display
If the error details is for your internal use and not the client, then
sending the IP in the body of an error page is the wrong thing to do. A
custom header would be better for most uses. X-Client-IP is used already
by some software.
More information about the squid-users