Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Squid under Windows

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to use Squid under Windows. It is very detailed and has a certain reference value. Friends who are interested must finish it!

[version selection]

According to the instructions at the bottom of the official binaries page:

It is recommended that Windows XP/2003 choose a third-party version, and Windows 7swap 2008 or above, choose official binaries.

[Squid-3.5 under Windows 7amp 2008]

Download the squid.msi installation file, there is nothing to say about the installation process.

Basic configuration of anonymous agents. Modify or add the following in the configuration file (D:\ Squid\ etc\ squid\ squid.conf):

Forwarded_for deletevia off

Change the default port. Modify the http_port entry of the configuration file:

Http_port 3128

Access control forbids access to certain domain names.

# define forbidden group # group name: walkerdenysite# dstdomain is the keyword acl walkerdenysite dstdomain .qq.com .google.com # disable domain name access can also be matched with the file # http_access deny "/ etc/squid/denysite.list" # prohibit access to walkerdenysite group # if the prohibition is invalid, check the location of the following command in the file http_access deny walkerdenysite

Access control, define a control group named walker, and allow this control group.

Class An address acl walker src 5.4.3.2 acl walker src 99.0.0.0 IP segment 8 # 99 32 # single walker address 5.4.3.2http_access allow walker # allow walker groups

Modify or add dns.

Dns_nameservers 223.5.5.5 119.29.29.29 114.114.114.114

Remember to reload the configuration file (under the D:\ Squid\ bin directory):

Squid-k reconfigure

For more details, please refer to the configuration file description: d:\ Squid\ etc\ squid\ squid.conf.documented.

[Squid-2.7 under Windows XP/2003]

1. Download squid-2.7.STABLE8-bin.zip and extract it to disk C.

2. initialize the configuration file. Go to the C:\ squid\ etc directory and modify the file name: (pay attention to backup)

Cachemgr.conf.default-> cachemgr.confmime.conf.default-> mime.confsquid.conf.default-> squid.confsquid_radius_auth.conf.default-> squid_radius_auth.conf

3. Initialize cache directory-> and install service-> start service. To the C:\ squid\ sbin directory, execute the command:

Squid-z # initializes the cache directory squid-I-n walker_proxy # installation service. If the-n parameter is not used, the default name is squidnet start walker_proxy # startup service

4. reload the configuration file.

Squid-k reconfigure-n walker_proxy

[secondary proxy and port mapping]

The requirements are as follows:

Port 8011-squid (secondary agent)-192.168.90.11 (primary agent)

Port 8022-squid (secondary agent)-192.168.90.22 (primary agent)

Note that the two secondary agents above are on the same machine, that is, different ports are mapped to different primary agents. It can be realized through cache_peer and cache_peer_access. Examples of configurations are as follows:

Http_port 8011http_port 8022acl myport8011 myport8011 # myport points to squid's own port number, which is used to accept customer requests for acl myport8022 myport 8022http_access allow myport8011http_access allow myport8022# to specify two neighbors (that is, first-level agents). Note that the port here is the neighbor's port. Non-native port cache_peer 192.168.90.11 parent 8011 0 default no-querycache_peer 192.168.90.22 parent 8022 0 default no-query# let incoming requests from port 8011 go 192.168.90.11 this first-level proxy # let incoming requests from port 8022 go 192.168.90.22 this first-level proxy cache_peer_access 192.168.90.11 allow myport8011cache_peer_access 192.168.90.22 allow myport8022 is above All the contents of the article "how to use Squid under Windows" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report