Tuesday, October 26, 2010

Squid ICAP Configuration Example

The upcoming MyDLP SaaS will be working with your preferred ICAP enabled proxy server. So we are going to post ICAP configuration examples for widely used proxies, starting with Squid. Squid is an open source caching proxy which has a very large user base. It is open source and very stable.

Squid 3.0 and 3.1 have out of the box ICAP support with slightly different configuration parameters. Unfortunately, older versions have no built-in ICAP support but it is possible to enable it using patches.

For Squid 3.1 enter following lines into squid.conf file to enable request adaptation:
icap_enable on

icap_service service_req reqmod_precache bypass=0 icap://127.0.0.1:1344/dlp
adaptation_access service_req allow all
For Squid 3.0 enter following lines into squid.conf file to enable request adaptation:
icap_enable on

icap_service service_req reqmod_precache 0 icap://127.0.0.1:1344/dlp
icap_class class_req service_req
icap_access class_req allow all
There are more parameters for configuring ICAP which are explained here.

2 comments:

BhoMerT said...

thanks for your article, can you show me example to insert same Advertising like banner or java script in every user request to squid ?

Thanks in advance

Kerem said...

What you said could be established by developing a simple custom ICAP server and using ICAP RESPMOD operation.

You can even modify an ICAP implementation, for example reference implementation from ICAP-Forum or you can develop a module for c-icap project. Handling HTML responses and adding your code with an HTML XML parser will probably solve your problem.

Regards.

Post a Comment