CentOS – install Squid proxy server and configure

A, introduction

English name is the Proxy Server Proxy Server, its function is to network users access to network information.

Squid is a caching Internet data software, receives the user to download the application and automatically processes the downloaded data. When a user wants to download a website, you can send a request to Squid, Squid instead of downloading it, then Squid that connects to the application site and requesting the home page, then the home page to the user while retaining a backup, when the other user is applying to the same page, Squid immediately to save backups of the user, making users feel very fast. Squid proxy HTTP, FTP, GOPHER, and SSL and WAIS protocol and Squid can be handled automatically, you can set up Squid to suit your needs, so that it filters out unwanted things.

1.1 workflow

When data needed by the client are in the proxy server:

A. client sends data to the proxy server requests;

B. proxy server checks its own data cache;

C. proxy server was found in the cache the user wants the data, remove the data;

D. proxy server will cache data returned to the client.

When the proxy server when there is no data needed by the client:

1. the client sends the data to the proxy server requests;

2. the proxy server checks its own data cache;

3. the proxy user not found in the cache to the data;

4. proxy server send data requests to remote servers on the Internet;

5. remote server response and return the appropriate data;

6. Proxy Server remote server data returned to the client, and keep a copy of your data in the cache.

Squid proxy server in the TCP/IP application layer.

Squid

1.2 classification of Squid

In accordance with different types of proxy, Squid proxy can be divided into a forward proxy and reverse proxy, forward proxy, according to the different implementations, and can be divided into common proxy and transparent proxy.

General Agent: requires a client proxy server address and port specified in the browser;

Transparent proxy: gateway for the enterprise hosting (shared access to the Internet), the client does not need to specify the proxy server address, port, and other information, proxy server firewall policy needs to be set to the client’s Web access to the data transmitted to the proxy service procedures;

Reverse proxy: refers to the proxy server to accept the connection request on the Internet, and then forwards the request to the server on the internal network, and the results returned from the server to the client requesting a connection on the Internet, proxy server behaves as a server at this time.

Official address: http://www.squid-cache.org/

Reference documentation: http://www.squid-cache.org/Doc/config/

Second, the system environment

Operating system: CentOS release 6.4 (Final)

Squid version: Squid-3.1.10-20.el6_5.3.x86_64

SELINUX=disabled

HTTP Service: stoped

Third, install the Squid service

3.1 check the Squid software is installed

# rpm -qa|grep squid

3.2 If you do not install, use the yum installation

# yum -y install squid

2

3.3 post your startup

# Chkconfig–level 35 squid on//3, level 5 automatic running squid on services

Four, the Squid server profile description

Squid/etc/squid/squid.conf is the main configuration file, all squid settings are configured in this file, we’ll explain the configuration options of the file.

Copy the code

http_port MB MB /var/spool/squid %>a %ui %un [%tl] %Hs %