Retrieving the client's IP from an eCAP module ?

Asked by Magus on 2009-12-10

Hello again,

I have another (simple) question. As stated in the title. Is it possible, from an eCAP module, to retrieve the IP address of the client requesting a ressource ? (that is to say, the IP written in the second column of Squid's access.log)

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Magus
Solved:
2009-12-10
Last query:
2009-12-10
Last reply:
2009-12-10
Alex Rousskov (rousskov) said : #1

I do not think it is possible to retrieve HTTP connection metadata without modifying the host application (e.g., Squid). Future eCAP releases will have a standard API to communicate metadata and configuration info from host to the adapter. For now, you have at least three options:

* Change Squid to cast your adapter (to a known-to-Squid custom type) to supply the required info.
* Change your adapter to cast host transaction (to a known Squid type) to extract the required info.
* Change Squid to supply the required info in HTTP headers sent to the adapter.

HTH,

Alex.

Magus (davdeclerck) said : #2

Hmm, this is interresting. I'm gonna have a deep look at these options you suggested.

Thanks for your reply, Alex.