Squid Web Proxy as ICAP Client

Version 1.2.1
October 30, 2002
Project Update, Nov 2003: 

The development of squid icap is now transferred to the main Squid developer source base. See ICAP projects at http://squid.sf.net/projects.html#icap for more info.
If you are looking for the latest, working src tar file of squid icap, use one of the links below:

  • Duane's version  at  ftp://ftp.measurement-factory.com/pub/squid-icap
  • Ralf's version at http://www.webwasher.com/squid-icap



    This package gives the necessary files to ICAP enable Squid Web Proxy [5]. It contains the following files:

     For systems requirements, configuration guide and user manuals please check out the Squid HomePage.This version has only been tested on Redhat 7.1 Linux on i586.

    An earlier version of these sources are also available as a squid developer project.

    Download squid-icap-client and install now!

    See Also:
    Ralf's  Squid ICAP client configuration  page
    Squid ICAP client project page

    What's New ?

    Over release 1.2:

    1. Support for processing OPTIONS header.
    2. A new configuration option "icap_send_client_ip"  to send IP address of client in ICAP header as X-Client-IP .
    3. Supports configurable preview size, with new config parameter, icap_preview_size.
    4. The redundant configuration option icap_mode is removed, now.
    5.  Some bug fixes  (default port number, host redirection bug, header modification bug, small icap header size)

    Over release 1.1:

    1. Squid is now fully ICAP 1.0 compatible.
    2. Support for both RESPMOD and REQMOD on a single request
    3. Good configuration support using squid acl's . New config parameters include icap_service, icap_class, icap_access, icap_mode , icap_enable.
    4. Chunked response from ICAP is supported if you set ICAP_CHUNKED on .
    5. The ugly "-i" option is no more there!
    6. A few bug fixes.

    Over release 1.0 :

    1. The icap config parameter name is changed from icap to "icap_mode"
    2. The responses in respmod are sent in chunked form to the ICAP server
    3. The ICAP client now sends a "Preview:" header for RESPMOD and waits for a 100 Continue from the ICAP server before sending rest of "chunked" response.
    4. The icap patch is upgraded to Squid HEAD. So, the binaries may have developer bugs :-(

    Over normal squid :

    1.  It is ICAP enabled. See file icap.c
    2.  New set of config parameters can be set in the configuration file to reflect the mode of content modification
    3. Enable ICAP support by configuring with "--enable-icap-support"

    Installation Instructions

    1.  If you  have a Linux Redhat 7.1 (or above) machine,  you can just extract the file isquid-bin.tgz  under /  . This contains the pre-compiled binaries of icap enabled squid at /usr/local/squid .  Configure and run squid.
    If you want to play with the sources or  add new features to squid or icap client please follow the  remaining  instructions,

    2.  Download  ICAP enabled squid sources using one the following methods:

        (A) TARBALL: Download the gzipped tarball of  icap enabled squid sources from http://sourceforge.net/project/showfiles.php?group_id=47737

        (B)  SQUID DEVELOPERS: Patch the squid sources with ICAP support:
                (a)  Download squid HEAD sources from http://www.squid-cache.org/Versions/v2/HEAD/  or use the one you already have.
                (b) The patch file  is available with the release. It is squid-HEAD-icap1.2.patch
                (c)  Goto the parent directory containing subdirectory squid and apply the patch.
                        patch -p4 < squid-HEAD-icap1.2.patch
                (d) Alternatively, you can download the sources from the "icap" branch  from squid developer cvs repository at  http://sf.net/cvs/?group_id=1781    . Please note that this may NOT be really up to date w.r.t icap support.

        (C)  SQUID_ICAP CLIENT DEVELOPERS: Check out sources from  squid-icap CVS repository using the 'stable' tag as per the instructions at http://sf.net/cvs/?group_id=47737 using
                    cvs z3 -d:pserver:anonymous@cvs.icap-server.sourceforge.net:/cvsroot/icap-server  co -r stable squid-icap-client

      and execute the script "bootstrap.sh" to  create the configure script.

    3.  Configure and build squid sources with this patch.
            cd squid
            ./configure --prefix=/usr/local/squid --enable-icap-support
            make install

            You now have the squid installed at /usr/local/squid

    4. Please refer to http://www.squid-cache.org/Doc/FAQ/FAQ-2.html for  other options to configure script and a detailed info on compiling squid in general.

    Configuration Hints

    The complete configuration manual is available at  http://squid.visolve.com/   . We just give you some quick reference here.

    The config file for squid is /usr/local/squid/etc/squid.conf  (assuming your prefix was /usr/local/squid).

    1. Note that the default port at which squid runs is 3128. If you want to change it, change the line starting from http_port

    2. If you are using an upstream proxy, you may want to set it using the cache_peer parameter.
                    cache_peer proxy.india.hp.com  parent 8088 default

    3. You may also have to check whether the following lines show a valid username and group.
                     cache_effective_user   geetham
                     cache_effective_group   users

    4. Check that the access permissions are right! If you want to be liberal, you can just have
                    http_access allow all
       as the last line under http_access category.

    5. Ensure that you have the write permissions to the log  directory, cache_dir and pid_filename

    6.  Configure the ICAP support using the instructions here

    Run Instructions

    1. The first time you run squid, you need to create cache directories as
                    squid -z

    2. To run squid

    3. To run squid  in debug mode
                    squid -N -X

       Now point your browser's proxy to the host running squid at port 3128 (or whateever)


    [1] The ICAP forum at http://www.i-cap.org/
    [2] The OPES forum at http://www.ietf-opes.org/
    [3] "Proxylet Local Execution Environment Local Binding", IETF  Draft.
    [4] IRML: A Rule Specification Language for Intermediary Services, IETF
    Draft,  http://www.ietf-opes.org/documents/draft-beck-opes-irml-00.txt
    [5] Squid Web Proxy , http://www.squid-cache.org/
    [6] Python Based ICAP Server, http://icap-server.sourceforge.net
    [7] The Project Page, http://sf.net/projects/icap-server
    [8] Squid ICAP client development page at Web Washer http://www.webwasher.com/squid-icap/

    Contact Info

    For any comments or feedback on this code , please feel free to write to:

    ($Id: squid.html,v 1.9 2003/12/08 04:47:46 geetham Exp $ )

    Hosted at SourceForge