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:
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
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