<div dir="auto">Hey Niels,<div dir="auto"><br></div><div dir="auto">Take a peek at:</div><div dir="auto"><a href="https://github.com/andybalholm/redwood">https://github.com/andybalholm/redwood</a><br></div><div dir="auto"><br></div><div dir="auto">I am using it in production and it was written because of squid limitations.</div><div dir="auto">squid is great but take a peek and see how it works for you.</div><div dir="auto">I have 2 servers in ha cluster which works great.</div><div dir="auto"><br></div><div dir="auto">An example I wrote to filter youtube traffic is at:</div><div dir="auto"><a href="https://github.com/elico/yt-classification-service-example">https://github.com/elico/yt-classification-service-example</a></div><div dir="auto"><br></div><div dir="auto">let me know if it helps you or gives you any direction.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">בתאריך יום ה׳, 4 במרץ 2021, 23:33, מאת Niels Hofmans ‏<<a href="mailto:hello@ironpeak.be">hello@ironpeak.be</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Alex,<div><br></div><div>Thanks for the feedback. Although I am not proficient in C for writing an ecap service, is there some binding available online for Go?</div><div>This was the reason I originally opted for an ICAP service since I can abstract Go behind the HTTP ICAP layer.</div><div>Now I understand this has its limitations, but AFAIK a preview cap at 100kb would be sufficient per request.</div><div>But this will slow down my current setup greatly, as I’m currently sending -only- the headers.</div><div><br></div><div>Would you think that a) using Go for the ecap adapter or b) using two ICAP services.</div><div>One would validate the headers and return OK or NOT (bypass=0), while the other only pushes the 1kb request/response to a queue.</div><div>Ideally those two would be contacted simultaneously while only the first one is blocking.</div><div>..just thinking aloud tough.</div><div><br></div><div>Regards,<div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Niels Hofmans<br><br>SITE   <a href="https://ironpeak.be" target="_blank" rel="noreferrer">https://ironpeak.be</a><br>BTW   BE0694785660<br>BANK BE76068909740795</div>
</div>
<div><br><div>On 4 Mar 2021, at 22:23, Alex Rousskov <<a href="mailto:rousskov@measurement-factory.com" target="_blank" rel="noreferrer">rousskov@measurement-factory.com</a>> wrote:</div><br><div><div>On 3/4/21 2:52 PM, Niels Hofmans wrote:<br><br><blockquote type="cite">is it possible to do full request/response logging?<br></blockquote><br>Squid can log HTTP headers with %>h and %<h logformat codes.<br><br>Squid cannot log HTTP message bodies.<br><br><br><blockquote type="cite">I do not see the appropriate log_format directive in the docs.<br>I was hoping not having to do this in my ICAP service since this slows<br>down approval of the HTTP request. (Empty preview v.s. a request capped<br>at 1MB that needs to be sent over every time)<br></blockquote><br>FWIW, an ICAP or eCAP service can start responding to the request<br>_before_ the service receives the entire HTTP message body. To get<br>things going, all the service needs is HTTP headers (and even that is,<br>technically, optional in some cases).<br><br>Using an adaptation service is still an overhead, of course, but, very<br>few legitimate Squid use cases involve logging message bodies, so there<br>is no built-in mechanism optimized for that specific rare purpose<br>(yet?). The fastest option available today is probably a dedicated eCAP<br>service that refuses to adapt the message bit continues to receive (and<br>log) the message body.<br><br><br>HTH,<br><br>Alex.<br>_______________________________________________<br>squid-users mailing list<br><a href="mailto:squid-users@lists.squid-cache.org" target="_blank" rel="noreferrer">squid-users@lists.squid-cache.org</a><br><a href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank" rel="noreferrer">http://lists.squid-cache.org/listinfo/squid-users</a><br></div></div></div><br></div></div>_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank" rel="noreferrer">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>