[squid-users] Adding headers in ICAP server with no preview

2021-01-17 Thread Moti Berger
Hi I have an environment with squid version 5.0.4 with ICAP server adapting requests by adding an header. When I'm trying to send a POST request with a body I'm having an issue of a stuck connection. What should the ICAP response look like? What I do is to reply like this: > (dI./M..ICAP/1.0 200

Re: [squid-users] Adding headers in ICAP server with no preview

2021-01-17 Thread Alex Rousskov
On 1/17/21 3:08 PM, Moti Berger wrote: > What should the ICAP response look like? The vast majority off ICAP responses containing an HTTP POST message will look like ICAP header + HTTP header + HTTP body. Please see RFC 3507 and its errata for examples of and discussion about those three component

[squid-users] Making destination IP available in ICAP REQMOD request

2021-01-17 Thread Moti Berger
Hi My goal is to obtain the destination IP when sending an HTTP request for my ICAP server so it would be able to decide the kind of adaptation required based on it. Looking at squid (5.0.4) code I discovered the following: It seems that "everything" starts at ClientRequestContext. I've noticed

Re: [squid-users] Making destination IP available in ICAP REQMOD request

2021-01-17 Thread ‪Amos Jeffries‬
As you have found. There is no destination IP at REQMOD time. Even if squid were to do a lookup it does not know the outcome of the routing decision in order to select which IP to send REQMOD. Especially if REQMOD is the source of that decision.A normal (forward) proxy has only a server host name (

Re: [squid-users] Making destination IP available in ICAP REQMOD request

2021-01-17 Thread NgTech LTD
Hey Moti, It is a good assumption that the same caching dns server (not 8.8.8.8 or 1.1.1.1) that the client use will return the relevant destination ip for the domain. Its possible to do such a query in the icap service with low timeout(2-3) seconds. can this be good enough for your use case? Eli