Does the client has the option to access some internal webserver which
can reflect the IP address of the client?
If so.. you can redirect from an error page to it.
Eliezer
On 07/08/2015 12:53, Kazuhiro Asakura wrote:
Thank you Amos, again.
I will investigate solution of javascript again.
But, next week is holiday, Called "O-bon" in Japanese.
Maybe reply will late. please pardon.
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.
I use custom error page for Helpdesk work.
Our employee are low IT literacy. So, they can not confirm own
IP address by themselves.
regards,
Kazuhiro
From: Amos Jeffries <squid3@xxxxxxxxxxxxx>
Subject: Re: I want to display indirect_client_address on error page.
Date: Fri, 7 Aug 2015 00:11:43 +1200
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 .
Okay.
This time, endpoint PC IP address is written into Squid access.log.
Maybe, source code is below,
AccessLogEntry.cc
----
#if FOLLOW_X_FORWARDED_FOR
if (Config.onoff.log_uses_indirect_client && request)
log_ip = request->indirect_client_addr;
else
#endif
----
Yes. Correct.
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.
Understood.
I want to display the address of end point to error page.
If someone could suggest solution, I would really appreciate it.
The easiest approach I think would be to add a javascript snippet in
place of the %i code that locates the users IP address and displays it
to them.
I feel that way is difficult.
Because, solution of javascript only works JScript, or require STUN server.
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
that with javascript/Jscript. All modern browsers have that capability.
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.
Amos
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users