[squid-dev] Online Translator interface for Squid

Jeffrey Merkey jeffmerkey at gmail.com
Mon Sep 25 04:34:58 UTC 2017


On 9/13/17, Alex Rousskov <rousskov at measurement-factory.com> wrote:
> On 09/13/2017 11:25 PM, Jeffrey Merkey wrote:
>
>> It will allow me to translate any web content read through such a
>> cache to downstream clients.  I need to know where to hook into your
>> cache at the layer it is reading html pages to insert the translator.
>
>
> Hello Jeffrey,
>
>     You should not hook this inside Squid. Implement an ICAP or eCAP
> service instead: http://wiki.squid-cache.org/SquidFaq/ContentAdaptation
>
>
>> Is there a neat and clean interface where I can get the pages being
>> read from the cache, and translate them, then send them to the
>> downstream clients.
>
> Not really. Squid does not even have a concept of a "page"; it operates
> on the level of HTTP messages. Adaptation services also have to work
> with HTTP messages, not pages, but at least you will not have to deal
> with Squid code (changes). As an added bonus, your service will work
> with any proxy that supports ICAP (most production proxies do) or eCAP
> (I am not aware of any production proxy that does, but that may change).
>
>
> Please note that due to the "success" of the "TLS everywhere" campaign,
> you will most likely have to attack and bump user TLS traffic in order
> to translate most pages on the fly. This opens up a big can of worms.
> http://wiki.squid-cache.org/Features/SslPeekAndSplice
>
> At the end of the day, you may want to write browser plugins instead,
> although that option also comes with its own set of serious problems. In
> theory, you can even write a browser plugin that will talk to an ICAP or
> eCAP service, so that you can cover all possible deployment vectors with
> a single adaptation service, but that is even more work, and I have not
> heard of anybody doing that.
>
>
> HTH,
>
> Alex.
>

Hi Alex,

Just wanted to let you know that got squid running perfectly with ssl
bumping and created a c-icap services module that loads under c-icap,
and I got that working too.  I am now focusing on the actual
translation code and everything is working well and I am translating
web pages into Cherokee on the fly..

Thanks for pointing me i the right direction.  I am somewhat amazed at
how well written both squid and c-icap are since the interface they
use under icap is incredibly easy to use.  Unlike squid, c-icap has
very sparse documentation so you have to go through their code.

Thanks for helping me out with this project.  Instead of taking months
it is only taking days to get everything running.  Now I have to focus
on the full translation matrix and language issues rather then having
to reinvent the proxy server.

Thanks so much.

Jeff


More information about the squid-dev mailing list