[squid-users] Can squid work as http response parse only ?

Alex Rousskov rousskov at measurement-factory.com
Fri Apr 21 14:39:24 UTC 2017


On 04/20/2017 11:34 PM, Amos Jeffries wrote:
> On 21/04/17 15:37, 钱国正 wrote:
>> I know squid+ecap can modify http response with a relatively fast
>> speed, and I have done that before.
>> But, in real environment, there is a lot of reqeusts, that don't need
>> processs http response, which would make network slow.
>> So I am thinking whether I can use libnetfilter_queue to judge that
>> http response has content-type with text/html , if it has such
>> things, we can redirect the packet to squid or some http parser, then
>> modify it and send it to client.

>> I don't know whether it can work, if not, can anyone give me some advice.

> It cannot.

The "or some http parser" part can work AFAICT, but it would be very
difficult to do serious text/html adaptations at the TCP packet level.
Configuring Squid to be more selective about adaptations, and making
Squid generally faster may be a better overall direction.


> If the request is not sent through Squid there is no way it
> can correctly handle the response.

Agreed. That "some http parser" alternative would have to make
libnetfilter an eCAP host application (essentially), completely
bypassing Squid.

Alex.



More information about the squid-users mailing list