Related Send and Receive Session in ecap

Asked by NiceGirl on 2016-11-27

I run transparent proxy and use ecap to save all content of VLAN browsing data.

My architecture is :

     my lan <---> Transparent Proxy =

10.0.0.220 <---> ( 10.0.0.1 / 192.168.4.55 ) <---> ( internet )

for example, suppose i browse 'www.bing.com' on 10.0.0.220 and see result.

how do i have 10.0.0.220 and its port and bings ip & port in ecap ?
if it need to add some code in squid , how do i can do it?
and where i must add it.

my question is that :
how i can relate header and body in ecap ?
or
do i can have both detail information of send and receive (ip, port, session info) in ecap?

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Rousskov
Solved:
2017-01-04
Last query:
2017-01-04
Last reply:
2016-11-27
Alex Rousskov (rousskov) said : #1

> how do i have 10.0.0.220 and its port and bings ip & port in ecap?

This is a Squid-specific question that you should ask on Squid support forums, not here. You may want to investigate adaptation_send_client_ip and adaptation_meta in squid.cond.documented before you post your question on squid-users though.

> how do i have bings ip & port in ecap?

This is a Squid-specific question that you should ask on Squid support forums, not here. You may want to investigate adaptation_meta in squid.cond.documented before you post your question on squid-users though. Please note that the proxy may not know the origin server IP address at REQMOD time (and sometimes even at RESPMOD time).

> if it need to add some code in squid , how do i can do it?and where i must add it.

Again, this is not an eCAP-specific question. You probably do not need to modify Squid to accomplish what you want. If Squid modifications are necessary, you may try to receive guidance on the squid-dev mailing list.

> how i can relate header send and body receive in ecap ?

If you are asking about correlating HTTP request header with HTTP response body in RESPMOD, then see the linked FAQ article:
https://answers.launchpad.net/ecap/+faq/1576

> do i can have both detail information of send and receive (ip, port, session info) in ecap?

You should be able to configure Squid to send you most of the information you want, via the squid.conf directives mentioned above. Please post further Squid configuration questions to the squid-users mailing list.

Best Alex Rousskov (rousskov) said : #2

Alex Rousskov suggests this article as an answer to some of your questions:
FAQ #1576: “How an adapter can get requested URL?”.

Alex Rousskov (rousskov) said : #4

I have restored the old question. Please do not replace the old question text with a new question text. Create a brand new question instead.

> How i can call a public function of xaction class in service class.

This is a C++ question, not an eCAP question. To call a public class method, you need an object of that class. A Service object can access transactions when it creates transactions in Service::makeXaction() and/or by storing created or resumed transaction objects in a Service object for later use. For example, the sample async adapter stores to-be-resumed transactions in Adapter::Service::Resume().