How to Build Squid 3.5 for Windows on CygwinΒΆ


We now have a new project - Web Filtering Proxy for Microsoft Windows. It combines best features of Web Safety but runs natively on Windows. No need to use Hyper-V or dive into Linux specifics. You can enable proxy authentication, HTTPS decryption and filtering with several mouse clicks from Microsoft Management Console. See

This post explains how to build latest Squid 3.5 for Microsoft Windows using Cygwin.

  1. Install Cygwin (tested with 64 bit) including:

    • gcc core

    • gcc g++

    • gcc tools epoch

    • gcc make dep

    • gdb (if you would like to debug squid in case of any problems)

    • make

    • automake (and automake last version)

    • autoconf

    • libtool

  2. For some of the advanced external modules consider also installing:

    • cppunit

    • libcom_err-devel

    • libcrypt-devel

    • libdb-devel

    • libexpat-devel

    • libkrb5-devel

    • libiconv-devel

    • openldap-devel

    • openssl-devel

    • libsasl2-devel

    • libxml2-devel

    • perl-DBI

  3. Download latest stable version of Squid from, for example 3.5.11.tar.gz to the /usr/src

  4. Unpack squid: tar -xvf squid-3.5.11.tar.gz

  5. Download this patch and apply it inside the /usr/src/squid-3.5.11 (the patch allows increasing the number of file descriptors from 256 to 3200 on cygwin)

    • patch -p1 < 3-5-11.patch

  6. for configure we use this command (written as ONE line!)

    ./configure --bindir=/bin/squid --sbindir=/usr/sbin/squid --sysconfdir=/etc/squid
        --datadir=/usr/share/squid --libexecdir=/usr/lib/squid --disable-strict-error-checking
        --with-logdir=/var/log/squid --with-swapdir=/var/cache/squid
        --with-pidfile=/var/run/ --enable-ssl --enable-delay-pools
        --enable-ssl-crtd --enable-icap-client --enable-esi --disable-eui
        --localstatedir=/var/run/squid --sharedstatedir=/var/run/squid
        --datarootdir=/usr/share/squid --enable-disk-io="AIO,Blocking,DiskThreads,IpcIo,Mmapped"
        --enable-auth-ntlm='fake' --enable-auth-negotiate='kerberos,wrapper'
        --with-openssl --with-filedescriptors=65536
  7. make

  8. make install

Wait until Squid is built and watch out for possible errors!