Squid for Windows

Source: Internet
Author: User
Tags squid proxy
Squid for Windows
Is everyone may not know, squid has a version for Windows, for: http://www.acmeconsulting.it/pagine/opensource/squid/SquidNT.htm

First, let's talk about the installation of squid for Windows. Requirement: You need to have a computer that is networked and running Windows NT/2000/XP/Server 2003, and squid

For Windows software package. The squid for Windows binary files downloaded from the Internet are compressed to a zip file. First, extract the file. After pressurization, a squid folder is generated, copy this folder to C:. So far, squid for Windows is "installed" on your windows computer. (Note: squid for Windows is installed under C: Squid by default. Of course, you can place squid in other paths, but you need to configure a large number of path information in the squid configuration file, it will be troublesome)

Most of the software in the Unix like operating system is based on the command line and configured using text files. Although some friends who are familiar with the software in Windows may feel a little complicated, however, such software is still advantageous. After all, it has higher performance without GUI, and configuration file writing is more flexible. Let's take a look at how to configure it.

Squid for Windows. First, click [start], select "run", Enter cmd to open the windows "command prompt" window, and enter the following command in the Command Prompt window:

C:> Cd C: squidetc

C: squidetc> copy squid. conf. Default squid. conf ** copy the default configuration file of squid and name it Squid. conf.

C: squidetc> copy mime. conf. Default mime. conf ** copy mime. conf. Default and name it mime. conf.

Next, we can use any text editor to edit squid. conf (configuration file), modify the squid configuration statement, and comment the text after # in the file.

First, we find the tag: ACL segment, which defines the IP address for accessing squid and its corresponding name.

In this section, we add a new line after ACL safe_ports port 777 # multiling HTTP and write "ACL name src ip Address"

Example: ACL name1 SRC 192.168.100.0 # define the name of all machines from 192.168.100. * as name1

Then we find the tag: http_access segment, which defines the list of allowed access squid.

In this section, http_access deny connect! Add a new line after ssl_ports and write "http_access allow/deny name". Allow indicates that access is allowed, and deny indicates that access is rejected.

Never access.

Example: http_access allow name1 # define all machines identified as name1 (192.168.100. *) to allow access to the Squid Proxy Server

Add another line of http_access deny all to the end.

Any network application will correspond to one or N ports, and the default port of squid is 3128. If you want to change it, find # http_port 3128. Here, delete the previous # and modify it.

The port number.

Example: http_port 7777 # change the squid service port to 7777

Because squid is a cache-based proxy server, it is necessary to set the cache size to optimize the server performance. The following describes how to set the cache size.

Find the # cache_mem 8 Mb clause and delete the previous # To change the default 8 to the required size. The value here depends on the available memory of the specific machine, should be exhausted as memory permits

To improve the performance of the proxy server, but the cache size of the proxy server cannot affect the performance of the machine.

Example: cache_mem 200 MB # Set squid to use MB of memory as the proxy server Cache

Finally, we need to take another step. Otherwise, an error will be reported when the squid service is started, that is, the configuration Tag: visibl

E_hostname segment. Find this segment and add it later.

Visible_hostname: The machine name (whatever you want.

Example: visible_hostname supersrv # Set hostname to supersrv

Now, you can save squid. conf and exit the text editor. The simple squid for Windows configuration has been completed.

Return to the command line and enter the following command:

C:> Cd C: squidsbin

C: squidsbin> squid-I (register squid as a Windows Service. The default service name is squidnt. You can use "service" in "Administrative Tools" to start/stop the service)

C: squidsbin> squid-z (directory for generating high-speed cache)

C: squidsbin> squid)

The preceding section briefly describes how to install, configure, and start squid for windows. In this article, simple configurations of squid in Unix/Linux are also feasible.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.