Jump to content

Squid (software): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Monkbot (talk | contribs)
m →‎History: Task 16: replaced (1×) / removed (0×) deprecated |dead-url= and |deadurl= with |url-status=;
m Fixed typo (via WP:JWB)
 
(43 intermediate revisions by 32 users not shown)
Line 1: Line 1:
{{Short description|Caching and forwarding HTTP web proxy}}
{{about|the computer software|other uses|Squid (disambiguation)}}
{{Use dmy dates|date=January 2020}}
{{Infobox software
{{Infobox software
| name = Squid
| name = Squid
| logo = [[File:Squid Now.png|200px|Squid Project Logo]]
| logo = Squid Now.png
| caption = Squid logo<ref>{{Cite web| url=http://www.squid-cache.org/Artwork/ | title=Squid Project Logo |accessdate=2014-07-06}}</ref>
| logo caption = Squid project Logo<ref>{{cite web |url=https://www.squid-cache.org/Artwork/ |title=Squid Project Logo |access-date=6 July 2014}}</ref>
| logo alt =
| developer = Duane Wessels, Henrik Nordström, Amos Jeffries, Alex Rousskov, Francesco Chemolli, Robert Collins, Guido Serassio and volunteers<ref name="Who looks after the Squid project?">{{cite web |url=http://www.squid-cache.org/Intro/who.html |title=Who looks after the Squid project?}}</ref>
| logo size = 200px
| released = {{Start date|1996|07}}
| developer = Duane Wessels, Henrik Nordström, Amos Jeffries, Alex Rousskov, Francesco Chemolli, Robert Collins, Guido Serassio and volunteers<ref name="Who looks after the Squid project?">{{cite web |url=https://www.squid-cache.org/Intro/who.html |title=Who looks after the Squid project?}}</ref>
| latest release version = 4.7
| released = {{Start date and age|1996|07}}
| latest release date = {{release date and age|2019|05|07|df=yes}}<ref>{{Cite web|url=http://www.squid-cache.org/Versions/v4/|title=Squid version 4|accessdate=3 July 2019}}</ref>
| latest release version = {{wikidata|property|preferred|references|edit|Q841783|P348|P548=Q2804309}}
| status = Active
| latest release date = {{wikidata|qualifier|preferred|single|Q841783|P348|P548=Q2804309|P577}}
| repo = https://github.com/squid-cache/squid
| latest preview version = {{wikidata|property|preferred|references|edit|Q841783|P348|P548=Q51930650}}
| programming language = [[C++ (programming language)|C++]]
| latest preview date = {{wikidata|qualifier|preferred|single|Q841783|P348|P548=Q51930650|P577}}
| operating system = [[BSD]], [[Linux]], [[Unix]], [[Microsoft Windows|Windows]]<ref name="What is the Best OS for Squid?">{{cite web |url=http://wiki.squid-cache.org/BestOsForSquid |title=What is the Best OS for Squid?}}</ref>
| repo = {{URL|github.com/squid-cache/squid}}
| programming language = [[C++]]<ref>{{Citation |title=squid-cache/squid |date=2022-07-27 |url=https://github.com/squid-cache/squid |publisher=Squid |access-date=2022-07-27}}</ref>
| operating system = [[Berkeley Software Distribution|BSD]], [[Linux]], [[Unix]], [[Microsoft Windows|Windows]]<ref>{{cite web |url=https://wiki.squid-cache.org/BestOsForSquid |title=What is the Best OS for Squid?}}</ref>
| genre = [[Proxy server]]
| genre = [[Proxy server]]
| license = [[GNU General Public License#Version 2|GNU GPLv2]]<ref name="Squid License">{{cite web |url=http://bazaar.launchpad.net/~squid/squid/trunk/view/head:/COPYING |title=Squid License}}</ref>
| license = [[GNU General Public License|GPL]] 2.0 or later<ref name="Squid License">{{cite web |url=https://bazaar.launchpad.net/~squid/squid/trunk/view/head:/README |title=Squid License}}</ref>
| website = {{URL|http://www.squid-cache.org}}
| website = {{URL|https://www.squid-cache.org}}
}}
}}
[[File:LAMP software bundle.svg|thumb|300px|The [[LAMP (software bundle)]] with '''Squid''' as web cache.]]
'''Squid''' is a [[web cache|caching]] and forwarding HTTP [[web proxy]]. It has a wide variety of uses, including speeding up a [[web server]] by caching repeated requests, caching [[World Wide Web|web]], [[Domain Name System|DNS]] and other [[computer network]] lookups for a group of people sharing network resources, and aiding security by filtering traffic. Although primarily used for [[HTTP]] and [[File Transfer Protocol|FTP]], Squid includes limited support for several other [[protocol (computing)|protocols]] including [[Internet Gopher]], [[Secure Sockets Layer|SSL]],<ref>{{Cite web|title = Squid FAQ: About Squid |url = http://wiki.squid-cache.org/SquidFaq/AboutSquid |accessdate = 2007-02-13 }}</ref> [[Transport Layer Security|TLS]] and [[HTTPS]]. Squid does not support the [[SOCKS]] protocol, unlike [[Privoxy]], with which Squid can be used in order to provide SOCKS support.


[[File:LAMP software bundle.svg|thumb|300px|The [[LAMP (software bundle)|LAMP stack]] with Squid as web cache.]]
Squid was originally designed to run as a [[daemon (computer software)|daemon]] on [[Unix-like]] systems. A Windows port was maintained up to version 2.7. New versions available on Windows use the [[Cygwin]] environment.<ref>{{Cite web|title = Squid 3.5 for Windows |url = https://github.com/diladele/squid3-windows | quote = Current build is based on Squid 3.5.1 build for Cygwin Windows 64 bit |date = February 2019 }}</ref> Squid is [[free software]] released under the [[GNU General Public License]].

'''Squid''' is a [[web cache|caching]] and forwarding HTTP [[web proxy]]. It has a wide variety of uses, including speeding up a [[web server]] by caching repeated requests, caching [[World Wide Web]] (WWW), [[Domain Name System]] (DNS), and other [[Computer network|network]] lookups for a group of people sharing network resources, and aiding security by filtering traffic. Although used for mainly [[HTTP]] and [[File Transfer Protocol]] (FTP), Squid includes limited support for several other [[protocol (computing)|protocols]] including [[Internet Gopher]], Secure Sockets Layer (SSL),<ref name=":0" /> [[Transport Layer Security]] (TLS), and Hypertext Transfer Protocol Secure ([[HTTPS]]). Squid does not support the [[SOCKS]] protocol, unlike [[Privoxy]], with which Squid can be used in order to provide SOCKS support.

Squid was originally designed to run as a [[daemon (computer software)|daemon]] on [[Unix-like]] systems. A Windows port was maintained up to version 2.7. New versions available on Windows use the [[Cygwin]] environment.<ref>{{cite web|title=Squid for Windows |website=[[GitHub]] |url=https://github.com/diladele/squid-windows |quote=Current build is based on the latest Squid 4 build for Cygwin Windows 64 bit |date=February 2024}}</ref> <ref>{{cite web|title=Squid-cache.org Knowledge Base |url=https://wiki.squid-cache.org/KnowledgeBase/Windows |quote=Squid on Windows }}</ref> Squid is [[free software]] released under the [[GNU General Public License]].


==History==
==History==
Squid was originally developed as the ''Harvest object cache'',<ref>C.Mic Bowman, Peter B. Danzig, Darren R. Hardy, Udi Manper, Michael F. Schwartz, The Harvest information discovery and access system, Computer Networks and ISDN Systems, Volume 28, Issues 1–2, December 1995, Pages 119-125. [https://dx.doi.org/10.1016/0169-7552(95)00098-5 doi:10.1016/0169-7552(95)00098-5]</ref> part of the [[Harvest project]] at the [[University of Colorado Boulder]].<ref>[http://www.squid-cache.org/Intro/ Squid intro], on the Squid website</ref><ref>[http://mail-archives.apache.org/mod_mbox/httpd-dev/199504.mbox/%[email protected]%3E ''Harvest cache now available as an "httpd accelerator"''], by Mike Schwartz on the http-wg mailing list, Tue, 4 April 1995, as forwarded by [[Brian Behlendorf]] to the [[Apache HTTP Server]] developers' mailing list</ref> Further work on the program was completed at the [[University of California, San Diego]] and funded via two grants from the [[National Science Foundation]].<ref>{{Cite web|title = Squid Sponsors |url = http://www.squid-cache.org/SPONSORS.txt |archiveurl = https://web.archive.org/web/20070511220833/http://www.squid-cache.org/SPONSORS.txt |archivedate=11 May 2007 |accessdate = 2007-02-13 | quote = The NSF was the primary funding source for Squid development from 1996-2000. Two grants (#NCR-9616602, #NCR-9521745) received through the Advanced Networking Infrastructure and Research (ANIR) Division were administered by the University of California San Diego }}</ref> Duane Wessels forked the "last pre-commercial version of Harvest" and renamed it to Squid to avoid confusion with the commercial fork called Cached 2.0, which became [[NetCache]].<ref name="auug-keynote">Duane Wessels [https://web.archive.org/web/20051030045131/http://www.life-gone-hazy.com/writings/auug-keynote.ps.gz Squid and ICP: Past, Present, and Future], Proceedings of the Australian Unix Users Group. September 1997, Brisbane, Australia</ref><ref>{{cite web |url=http://www.netcache.com/ |title=netcache.com |accessdate=2012-08-07 |url-status=dead |archiveurl=https://web.archive.org/web/19961112032719/http://www.netcache.com/ |archivedate=12 November 1996 |df=dmy-all }}</ref> Squid version 1.0.0 was released in July 1996.<ref name="auug-keynote"/>
Squid was originally developed as the ''Harvest object cache'',<ref name=":0">C.Mic Bowman, Peter B. Danzig, Darren R. Hardy, Udi Manper, Michael F. Schwartz, The Harvest information discovery and access system, Computer Networks and ISDN Systems, Volume 28, Issues 1–2, December 1995, Pages 119–125. [https://dx.doi.org/10.1016/0169-7552(95)00098-5 doi:10.1016/0169-7552(95)00098-5]</ref> part of the [[Harvest project]] at the [[University of Colorado Boulder]].<ref>[http://www.squid-cache.org/Intro/ Squid intro], on the Squid website</ref><ref>[http://mail-archives.apache.org/mod_mbox/httpd-dev/199504.mbox/%[email protected]%3E ''Harvest cache now available as an "httpd accelerator"''], by Mike Schwartz on the http-wg mailing list, Tue, 4 April 1995, as forwarded by [[Brian Behlendorf]] to the [[Apache HTTP Server]] developers' mailing list</ref> Further work on the program was completed at the [[University of California, San Diego]] and funded via two grants from the [[National Science Foundation]].<ref>{{cite web|title=Squid Sponsors |url=http://www.squid-cache.org/SPONSORS.txt |archive-url=https://web.archive.org/web/20070511220833/http://www.squid-cache.org/SPONSORS.txt |archive-date=11 May 2007 |access-date=13 February 2007 |quote=The NSF was the primary funding source for Squid development from 1996–2000. Two grants (#NCR-9616602, #NCR-9521745) received through the Advanced Networking Infrastructure and Research (ANIR) Division were administered by the University of California San Diego}}</ref> Duane Wessels forked the "last pre-commercial version of Harvest" and renamed it to Squid to avoid confusion with the commercial fork called Cached 2.0, which became [[NetCache]].<ref name="auug-keynote">Duane Wessels [https://web.archive.org/web/20051030045131/http://www.life-gone-hazy.com/writings/auug-keynote.ps.gz Squid and ICP: Past, Present, and Future], Proceedings of the Australian Unix Users Group. September 1997, Brisbane, Australia</ref><ref>{{cite web |url=http://www.netcache.com/ |title=netcache.com |access-date=7 August 2012 |url-status=dead |archive-url=https://web.archive.org/web/19961112032719/http://www.netcache.com/ |archive-date=12 November 1996}}</ref> Squid version 1.0.0 was released in July 1996.<ref name="auug-keynote"/> [[SquidNT]], a port of the Squid proxy server was merged into the main Squid project in September 2006.<ref>{{cite web|title=Squid FAQ: Does Squid run on Windows? |url=https://wiki.squid-cache.org/SquidFaq/AboutSquid#head-500ddc367517c94cdf5cc49cb26868ab64becf63 }}</ref>


Squid is now developed almost exclusively through volunteer efforts.
Squid is now developed almost exclusively through volunteer efforts.

In October 2023, it was revealed that Squid continued to suffer from 35 security vulnerabilities which had not been fixed for two and a half years after their initial reporting.<ref>{{cite web | url=https://joshua.hu/squid-security-audit-35-0days-45-exploits | title=55 Vulnerabilities in Squid Caching Proxy and 35 0days | date=11 October 2023 }}</ref>


==Basic functionality==
==Basic functionality==
Line 31: Line 39:
A client program (e.g. browser) either has to specify explicitly the proxy server it wants to use (typical for ISP customers), or it could be using a proxy without any extra configuration: "transparent caching", in which case all outgoing HTTP requests are intercepted by Squid and all responses are cached. The latter is typically a corporate set-up (all clients are on the same LAN) and often introduces the privacy concerns mentioned above.
A client program (e.g. browser) either has to specify explicitly the proxy server it wants to use (typical for ISP customers), or it could be using a proxy without any extra configuration: "transparent caching", in which case all outgoing HTTP requests are intercepted by Squid and all responses are cached. The latter is typically a corporate set-up (all clients are on the same LAN) and often introduces the privacy concerns mentioned above.


Squid has some features that can help [[Anonymity|anonymize]] connections, such as disabling or changing specific header fields in a [[client (computing)|client's]] HTTP requests. Whether these are set, and what they are set to do, is up to the person who controls the computer running Squid. People requesting pages through a network which transparently uses Squid may not know whether this information is being logged.<ref>See the documentation for <tt>header_access</tt> and <tt>header_replace</tt> for further details.</ref> Within UK organisations at least, users should be informed if computers or internet connections are being monitored.<ref>See, for example, [http://www.yourprivacy.co.uk/computer-monitoring-workplace-your-privacy.html Computer Monitoring In The Workplace and Your Privacy]</ref>
Squid has some features that can help [[Anonymity|anonymize]] connections, such as disabling or changing specific header fields in a [[client (computing)|client's]] HTTP requests. Whether these are set, and what they are set to do, is up to the person who controls the computer running Squid. People requesting pages through a network which transparently uses Squid may not know whether this information is being logged.<ref>See the documentation for {{mono|header_access}} and {{mono|header_replace}} for further details.</ref> Within UK organisations at least, users should be informed if computers or internet connections are being monitored.<ref>See, for example, [http://www.yourprivacy.co.uk/computer-monitoring-workplace-your-privacy.html Computer Monitoring In The Workplace and Your Privacy]</ref>


==Reverse proxy==
==Reverse proxy==
The above setup—caching the contents of an unlimited number of [[webserver]]s for a limited number of clients—is the classical one. Another setup is "[[reverse proxy]]" or "webserver acceleration" (using <tt>http_port 80 accel vhost</tt>). In this mode, the cache serves an unlimited number of clients for a limited number of—or just one—web servers.
The above setup, caching the contents of an unlimited number of [[webserver]]s for a limited number of clients, is the classical one. Another setup is "[[reverse proxy]]" or "webserver acceleration" (using {{mono|http_port 80 accel vhost}}). In this mode, the cache serves an unlimited number of clients for a limited number of—or just one—web servers.


As an example, if ''slow.example.com'' is a "real" web server, and ''www.example.com'' is the Squid cache server that "accelerates" it, the first time any page is requested from ''www.example.com'', the cache server would get the actual page from ''slow.example.com'', but later requests would get the stored copy directly from the accelerator (for a configurable period, after which the stored copy would be discarded). The end result, without any action by the clients, is less traffic to the source server, meaning less CPU and memory usage, and less need for bandwidth. This does, however, mean that the source server cannot accurately report on its traffic numbers without additional configuration, as all requests would seem to have come from the reverse proxy. A way to adapt the reporting on the source server is to use the [[X-Forwarded-For]] HTTP header reported by the reverse proxy, to get the real client's IP address.
As an example, if ''slow.example.com'' is a "real" web server, and ''www.example.com'' is the Squid cache server that "accelerates" it, the first time any page is requested from ''www.example.com'', the cache server would get the actual page from ''slow.example.com'', but later requests would get the stored copy directly from the accelerator (for a configurable period, after which the stored copy would be discarded). The result, without any action by the clients, is less traffic to the source server, meaning less CPU and memory usage, and less need for bandwidth. This does, however, mean that the source server cannot accurately report on its traffic numbers without additional configuration, as all requests would seem to have come from the reverse proxy. A way to adapt the reporting on the source server is to use the [[X-Forwarded-For]] HTTP header reported by the reverse proxy, to get the real client's IP address.


It is possible for a single Squid server to serve both as a normal and a reverse proxy simultaneously. For example, a business might host its own website on a web server, with a Squid server acting as a reverse proxy between clients (customers accessing the website from outside the business) and the web server. The same Squid server could act as a classical web cache, caching HTTP requests from clients within the business (i.e., employees accessing the internet from their workstations), so accelerating web access and reducing bandwidth demands.
It is possible for one Squid server to serve simultaneously as a normal and a reverse proxy. For example, a business might host its own website on a web server, with a Squid server acting as a reverse proxy between clients (customers accessing the website from outside the business) and the web server. The same Squid server could act as a classical web cache, caching HTTP requests from clients within the business (i.e., employees accessing the internet from their workstations), so accelerating web access and reducing bandwidth demands.


==Media-range limitations==
==Media-range limits==
For example, a feature of the HTTP protocol is to limit a request to the range of data in the resource being referenced. This feature is used extensively by video streaming websites such as [[YouTube]], so that if a user clicks to the middle of the video progress bar, the server can begin to send data from the middle of the file, rather than sending the entire file from the beginning and the user waiting for the preceding data to finish loading.
For example, a feature of the HTTP protocol is to limit a request to the range of data in the resource being referenced. This feature is used extensively by video streaming websites such as [[YouTube]], so that if a user clicks to the middle of the video progress bar, the server can begin to send data from the middle of the file, rather than sending the entire file from the beginning and the user waiting for the preceding data to finish loading.


Partial downloads are also extensively used by Microsoft [[Windows Update]] so that extremely large update packages can download in the background and pause halfway through the download, if the user turns off their computer or disconnects from the Internet.
Partial downloads are also extensively used by Microsoft [[Windows Update]] so that extremely large update packages can download in the background and pause halfway through the download, if the user turns off their computer or disconnects from the Internet.


The [[Metalink]] download format enables clients to do [[segmented downloading|segmented downloads]] by issuing partial requests and spreading these over a number of mirrors.
The [[Metalink]] download format enables clients to do segmented downloads by issuing partial requests and spreading these over a number of mirrors.


Squid can relay partial requests to the origin web server. In order for a partial request to be satisfied at a fast speed from cache, Squid requires a full copy of the same object to already exist in its storage.
Squid can relay partial requests to the origin web server. In order for a partial request to be satisfied at a fast speed from cache, Squid requires a full copy of the same object to already exist in its storage.


If a proxy video user is watching a video stream and browses to a different page before the video completely downloads, Squid cannot keep the partial download for reuse and simply discards the data. Special configuration is required to force such downloads to continue and be cached.<ref>{{cite web|title=Squid Configuration Reference|url=http://www.squid-cache.org/Doc/config/quick_abort_min/|accessdate=26 November 2012}}</ref>
If a proxy video user is watching a video stream and browses to a different page before the video completely downloads, Squid cannot keep the partial download for reuse and simply discards the data. Special configuration is required to force such downloads to continue and be cached.<ref>{{cite web |title=Squid Configuration Reference |url=http://www.squid-cache.org/Doc/config/quick_abort_min/ |access-date=26 November 2012}}</ref>


==Supported operating systems==
==Supported operating systems==
Squid can run on the following [[operating system]]s:
Squid supports many [[operating system]]s, including:
{{Div col|colwidth=22em}}
{{Div col|colwidth=22em}}
* [[IBM AIX|AIX]]
* [[IBM AIX|AIX]]
Line 65: Line 73:
* [[NeXTStep]]
* [[NeXTStep]]
* [[OpenBSD]]
* [[OpenBSD]]
* [[OS/2]] and [[eComStation]]<ref name="SquidWarp">[http://os2ports.smedley.info/index.php?page=squid OS/2 Ports by Paul Smedley], OS/2 Ports</ref>
* [[OS/2]] (including [[ArcaOS]] and [[eComStation]])<ref name="SquidWarp">[http://os2ports.smedley.info/index.php?page=squid OS/2 Ports by Paul Smedley], OS/2 Ports</ref>
* [[SCO OpenServer]]
* [[SCO OpenServer]]
* [[Solaris (operating system)|Solaris]]
* [[Oracle Solaris|Solaris]]
* [[UnixWare]]
* [[UnixWare]]
* [[Windows]]<ref>https://wiki.squid-cache.org/KnowledgeBase/Windows</ref>
* [[Windows]]<ref>{{Cite web|url=https://wiki.squid-cache.org/KnowledgeBase/Windows|title=KnowledgeBase/Windows - Squid Web Proxy Wiki}}</ref>
{{div col end}}
{{div col end}}


==See also==
==See also==
{{Portal|Free and open-source software}}
{{Portal|Free and open-source software}}

* [[Web accelerator]] which discusses host-based HTTP acceleration
* [[Web accelerator]] which discusses host-based HTTP acceleration
* [[Proxy server]] which discusses client-side proxies
* [[Proxy server]] which discusses client-side proxies
Line 81: Line 88:


==References==
==References==
{{Reflist|2}}
{{Reflist}}


==Further reading==
==Further reading==
* {{cite book
* {{Cite book|last= Wessels |first= Duane |authorlink= |title= Squid: The Definitive Guide |year= 2004 |publisher= [[O'Reilly Media]] |location= |isbn= 978-0-596-00162-9 }}
|last=Wessels
* {{Cite book|last= Saini |first=Kulbir |authorlink= |title= Squid Proxy Server 3.1: Beginner's Guide |year= 2011 |publisher= [[Packt Publishing]] |location= |isbn= 978-1-849-51390-6 }}
|first=Duane
|year=2004
|title=Squid: The Definitive Guide
|publisher=[[O'Reilly Media]]
|isbn=978-0-596-00162-9}}
* {{cite book
|last=Saini
|first=Kulbir
|year=2011
|title=Squid Proxy Server 3.1: Beginner's Guide
|publisher=[[Packt Publishing]]
|isbn=978-1-849-51390-6}}


==External links==
==External links==
* {{Official website}}
* {{Official website}}
* [http://squidproxy.wordpress.com/ Squid Blog]
* [https://squidproxy.wordpress.com/ Squid Blog]
* [https://web.archive.org/web/20100415153216/http://www.deckle.co.za/squid-users-guide/ Squid User's Guide]
* [https://web.archive.org/web/20100415153216/http://www.deckle.co.za/squid-users-guide/ Squid User's Guide]
* [http://www.dd-wrt.com/wiki/index.php/Squid_Transparent_Proxy Squid Transparent Proxy For DD-WRT]
* [https://wiki.dd-wrt.com/wiki/index.php/Squid_Transparent_Proxy Squid Transparent Proxy For DD-WRT]
* [http://www.sweetnam.eu/index.php/Reverse_Proxy_with_Squid Squid reverse proxy] Create a reverse proxy with Squid
* [https://www.sweetnam.eu/index.php/Reverse_Proxy_with_Squid Squid reverse proxy] Create a reverse proxy with Squid
* [http://www.visolve.com/squid/ Configuration Manual] ViSolve Squid Configuration Manual Guide
* [https://www.visolve.com/squid/ Configuration Manual] ViSolve Squid Configuration Manual Guide
* [http://www.squid-cache.org/Doc/config/ Configuration Manual] Authoritative Squid Configuration Options
* [http://www.squid-cache.org/Doc/config/ Configuration Manual] Authoritative Squid Configuration Options
* {{cite web
* {{Cite web|url=http://www.webmasterwords.com/squid-proxy-on-solaris |title=Solaris Setup |archiveurl=https://web.archive.org/web/20080115182525/http://www.webmasterwords.com/squid-proxy-on-solaris |archivedate=2008-01-15}} — Setup squid on solaris
|url=http://www.webmasterwords.com/squid-proxy-on-solaris
|title=Solaris Setup
|archive-url=https://web.archive.org/web/20080115182525/http://www.webmasterwords.com/squid-proxy-on-solaris
|archive-date=15 January 2008}} – Setup squid on solaris
* [https://linuxinpakistan.com/squid-installation-centos-fedora-red-hat SQUID – Installation on CentOS, Fedora and Red Hat]
* [https://linuxinpakistan.com/squid-installation-centos-fedora-red-hat SQUID – Installation on CentOS, Fedora and Red Hat]
{{Use dmy dates|date=September 2010}}


{{DEFAULTSORT:Squid (Software)}}
{{DEFAULTSORT:Squid (Software)}}

Latest revision as of 20:20, 20 April 2024

Squid
Developer(s)Duane Wessels, Henrik Nordström, Amos Jeffries, Alex Rousskov, Francesco Chemolli, Robert Collins, Guido Serassio and volunteers[2]
Initial releaseJuly 1996; 27 years ago (1996-07)
Stable release
6.10[3] Edit this on Wikidata / 10 June 2024
Repositorygithub.com/squid-cache/squid
Written inC++[4]
Operating systemBSD, Linux, Unix, Windows[5]
TypeProxy server
LicenseGPL 2.0 or later[6]
Websitewww.squid-cache.org
The LAMP stack with Squid as web cache.

Squid is a caching and forwarding HTTP web proxy. It has a wide variety of uses, including speeding up a web server by caching repeated requests, caching World Wide Web (WWW), Domain Name System (DNS), and other network lookups for a group of people sharing network resources, and aiding security by filtering traffic. Although used for mainly HTTP and File Transfer Protocol (FTP), Squid includes limited support for several other protocols including Internet Gopher, Secure Sockets Layer (SSL),[7] Transport Layer Security (TLS), and Hypertext Transfer Protocol Secure (HTTPS). Squid does not support the SOCKS protocol, unlike Privoxy, with which Squid can be used in order to provide SOCKS support.

Squid was originally designed to run as a daemon on Unix-like systems. A Windows port was maintained up to version 2.7. New versions available on Windows use the Cygwin environment.[8] [9] Squid is free software released under the GNU General Public License.

History[edit]

Squid was originally developed as the Harvest object cache,[7] part of the Harvest project at the University of Colorado Boulder.[10][11] Further work on the program was completed at the University of California, San Diego and funded via two grants from the National Science Foundation.[12] Duane Wessels forked the "last pre-commercial version of Harvest" and renamed it to Squid to avoid confusion with the commercial fork called Cached 2.0, which became NetCache.[13][14] Squid version 1.0.0 was released in July 1996.[13] SquidNT, a port of the Squid proxy server was merged into the main Squid project in September 2006.[15]

Squid is now developed almost exclusively through volunteer efforts.

In October 2023, it was revealed that Squid continued to suffer from 35 security vulnerabilities which had not been fixed for two and a half years after their initial reporting.[16]

Basic functionality[edit]

After a Squid proxy server is installed, web browsers can be configured to use it as a proxy HTTP server, allowing Squid to retain copies of the documents returned, which, on repeated requests for the same documents, can reduce access time as well as bandwidth consumption. This is often useful for Internet service providers to increase speed to their customers, and LANs that share an Internet connection. Because the caching servers are controlled by the web service operator, caching proxies do not anonymize the user and should not be confused with anonymizing proxies.

A client program (e.g. browser) either has to specify explicitly the proxy server it wants to use (typical for ISP customers), or it could be using a proxy without any extra configuration: "transparent caching", in which case all outgoing HTTP requests are intercepted by Squid and all responses are cached. The latter is typically a corporate set-up (all clients are on the same LAN) and often introduces the privacy concerns mentioned above.

Squid has some features that can help anonymize connections, such as disabling or changing specific header fields in a client's HTTP requests. Whether these are set, and what they are set to do, is up to the person who controls the computer running Squid. People requesting pages through a network which transparently uses Squid may not know whether this information is being logged.[17] Within UK organisations at least, users should be informed if computers or internet connections are being monitored.[18]

Reverse proxy[edit]

The above setup, caching the contents of an unlimited number of webservers for a limited number of clients, is the classical one. Another setup is "reverse proxy" or "webserver acceleration" (using http_port 80 accel vhost). In this mode, the cache serves an unlimited number of clients for a limited number of—or just one—web servers.

As an example, if slow.example.com is a "real" web server, and www.example.com is the Squid cache server that "accelerates" it, the first time any page is requested from www.example.com, the cache server would get the actual page from slow.example.com, but later requests would get the stored copy directly from the accelerator (for a configurable period, after which the stored copy would be discarded). The result, without any action by the clients, is less traffic to the source server, meaning less CPU and memory usage, and less need for bandwidth. This does, however, mean that the source server cannot accurately report on its traffic numbers without additional configuration, as all requests would seem to have come from the reverse proxy. A way to adapt the reporting on the source server is to use the X-Forwarded-For HTTP header reported by the reverse proxy, to get the real client's IP address.

It is possible for one Squid server to serve simultaneously as a normal and a reverse proxy. For example, a business might host its own website on a web server, with a Squid server acting as a reverse proxy between clients (customers accessing the website from outside the business) and the web server. The same Squid server could act as a classical web cache, caching HTTP requests from clients within the business (i.e., employees accessing the internet from their workstations), so accelerating web access and reducing bandwidth demands.

Media-range limits[edit]

For example, a feature of the HTTP protocol is to limit a request to the range of data in the resource being referenced. This feature is used extensively by video streaming websites such as YouTube, so that if a user clicks to the middle of the video progress bar, the server can begin to send data from the middle of the file, rather than sending the entire file from the beginning and the user waiting for the preceding data to finish loading.

Partial downloads are also extensively used by Microsoft Windows Update so that extremely large update packages can download in the background and pause halfway through the download, if the user turns off their computer or disconnects from the Internet.

The Metalink download format enables clients to do segmented downloads by issuing partial requests and spreading these over a number of mirrors.

Squid can relay partial requests to the origin web server. In order for a partial request to be satisfied at a fast speed from cache, Squid requires a full copy of the same object to already exist in its storage.

If a proxy video user is watching a video stream and browses to a different page before the video completely downloads, Squid cannot keep the partial download for reuse and simply discards the data. Special configuration is required to force such downloads to continue and be cached.[19]

Supported operating systems[edit]

Squid supports many operating systems, including:

See also[edit]

References[edit]

  1. ^ "Squid Project Logo". Retrieved 6 July 2014.
  2. ^ "Who looks after the Squid project?".
  3. ^ "squid : Optimising Web Delivery". 10 June 2024. Retrieved 10 June 2024.
  4. ^ squid-cache/squid, Squid, 27 July 2022, retrieved 27 July 2022
  5. ^ "What is the Best OS for Squid?".
  6. ^ "Squid License".
  7. ^ a b C.Mic Bowman, Peter B. Danzig, Darren R. Hardy, Udi Manper, Michael F. Schwartz, The Harvest information discovery and access system, Computer Networks and ISDN Systems, Volume 28, Issues 1–2, December 1995, Pages 119–125. doi:10.1016/0169-7552(95)00098-5
  8. ^ "Squid for Windows". GitHub. February 2024. Current build is based on the latest Squid 4 build for Cygwin Windows 64 bit
  9. ^ "Squid-cache.org Knowledge Base". Squid on Windows
  10. ^ Squid intro, on the Squid website
  11. ^ Harvest cache now available as an "httpd accelerator", by Mike Schwartz on the http-wg mailing list, Tue, 4 April 1995, as forwarded by Brian Behlendorf to the Apache HTTP Server developers' mailing list
  12. ^ "Squid Sponsors". Archived from the original on 11 May 2007. Retrieved 13 February 2007. The NSF was the primary funding source for Squid development from 1996–2000. Two grants (#NCR-9616602, #NCR-9521745) received through the Advanced Networking Infrastructure and Research (ANIR) Division were administered by the University of California San Diego
  13. ^ a b Duane Wessels Squid and ICP: Past, Present, and Future, Proceedings of the Australian Unix Users Group. September 1997, Brisbane, Australia
  14. ^ "netcache.com". Archived from the original on 12 November 1996. Retrieved 7 August 2012.
  15. ^ "Squid FAQ: Does Squid run on Windows?".
  16. ^ "55 Vulnerabilities in Squid Caching Proxy and 35 0days". 11 October 2023.
  17. ^ See the documentation for header_access and header_replace for further details.
  18. ^ See, for example, Computer Monitoring In The Workplace and Your Privacy
  19. ^ "Squid Configuration Reference". Retrieved 26 November 2012.
  20. ^ OS/2 Ports by Paul Smedley, OS/2 Ports
  21. ^ "KnowledgeBase/Windows - Squid Web Proxy Wiki".

Further reading[edit]

External links[edit]