How to install Squid proxy on Windows
June 15, 2021
Squid is a high performance caching proxy for web clients supporting FTP, gopher, ICAP, ICP, HTCP and HTTP data objects. Squid reduces network bandwidth, data transfer and improves response times by caching and reusing frequently requested web pages. Squid has extensive access control and is a great server accelerator. It runs on most of the available operating systems, including Windows, and is licensed under the GNU GPL.
Squid proxy official website: http://www.squid-cache.org
Squid can be compiled and run on Windows as a system service using the Cygwin emulation environment, or it can be compiled in Windows native mode using the MinGW + MSYS development environment. Windows NT 4 SP4 and later are supported.
- Squid features that don't work on Windows:
- DISKD: still needs to be ported
- Transparent proxy: missing non-commercial intercept driver for Windows
- WCCP: These features have not been ported. Without transparent proxy support, this is not necessary.
- SMP support: Windows equivalent of UDS sockets is not implemented
- Certain sections of code can make blocking calls.
- Some external helpers may not work.
- The number of file descriptors is strictly limited to 2048 when building with MinGW.
- Squid-3.x of all official releases has serious build problems.
Squid prebuilt binaries for Windows
This is the easiest way to get Squid on Windows: open source project https://github.com/diladele/squid-windows provides Windows MSI installer files for Squid Proxy Server. It makes it possible to install Squid in just a few clicks. The current build is based on the latest Squid 4.14 build for Cygwin under Windows 64 bit.
To download the installer, go to the website: https://squid.diladele.com/ and click the link “MSI installer for SQUID FOR WINDOWS”.
Run the downloaded file with a double click and follow the prompts of the installer.
Immediately after the installer completes, an icon will appear next to the clock to control the Squid service:
When you click on it, the following options will be available:
- Open Squid Configuration
- Open Squid Folder
- Start Squid Service
- Stop Squid Service
The path to the configuration file in Windows: C:\Squid\etc\squid\squid.conf. Keep this in mind, as all subsequent sections will show the setup using a Linux example.
For the changes made in the configuration file to take effect, you need to restart the Squid service, to do this, stop and start it again.
The Squid service will automatically start when the computer is turned on, and for the icon to appear in the tray for managing Squid, you need to run the file C:\Squid\bin\Diladele.Squid.Tray.exe.
In the config file you can see paths like this: “/cygdrive/d/squid/cache”. To understand them, see How to access disks in Cygwin. In this case /cygdrive/d/squid/cache is D:\squid\cache.
There will also be paths like this: /var/cache/squid – these are all directories inside the C:\Squid folder. That is, for example, /var/cache/squid is actually C:\Squid\var\cache\squid\.
To check if the Squid service is actually listening on a port to connect, you can do the following:
1. Press Win+x and select “Windows PowerShell (admin)” in the menu that opens.
2. Run the commands in sequence:
cmd for /f "tokens=1,2,3,4,5*" %i in ('netstat -aon ^| findstr ":3128" ^| findstr /i listening') do echo %j %l & @tasklist | findstr %m
You will verify that Squid is indeed listening on port 3128.
Remember that if you are using a firewall, then you need to open the port that the proxy service is listening on, if you have not changed it, then by default it is 3128.
The following steps are shown using Linux as an example, since Squid is much more common on Linux, not Windows. However, you Windows users can use the following information to configure Squid on Windows. But you need to keep in mind the following nuances:
1. When the command to open a file is given, you must open your configuration file, the path to which is given just above.
2. When it is said that you need to restart the service and the command is given for this, you need to open the assistant in the tray and stop, and then start the service there.
If you are an advanced user, you can manage the service from the command line (open with administrator rights):
net stop squidsrv net start squidsrv
See also: How to manage services on Windows
To control the autostart of a service, see the article “How to disable autostart of programs and services in Windows”.
3. Most likely (I did not check) you will not be able to configure authorization by login and password on the proxy server, since many (or all) helpers do not work in Windows.
4. In the configuration file, the paths to the files in Linux and Windows may be the same, since Cygwin emulates the Linux working environment, but double-check.
See also the Squid setup guide: How to create and configure a Squid proxy server
- Error “Authentication helper program /usr/lib64/squid/basic_ncsa_auth: (2) No such file or directory” (SOLVED) (95%)
- How to recover metadata in processed photos (55%)
- How to install Apache web server with PHP, MySQL and phpMyAdmin on Windows (55%)
- Free analogue of Total Commander (55%)
- How to display all environment variables at the Windows command prompt (55%)
- How to enable DNS over HTTPS in Windows 11 (RANDOM - 50%)