Internet Technologies 简明教程

Proxy Server

Overview

Proxy server 是客户端和互联网之间的中介服务器。代理服务器提供以下基本功能:

Proxy server is an intermediary server between client and the internet. Proxy servers offers the following basic functionalities:

  1. Firewall and network data filtering.

  2. Network connection sharing

  3. Data caching

Purpose of Proxy Servers

使用代理服务器的原因如下:

Following are the reasons to use proxy servers:

  1. Monitoring and Filtering

  2. Improving performance

  3. Translation

  4. Accessing services anonymously

  5. Security

Monitoring and Filtering

代理服务器允许我们进行多种过滤,例如:

Proxy servers allow us to do several kind of filtering such as:

  1. Content Filtering

  2. Filtering encrypted data

  3. Bypass filters

  4. Logging and eavesdropping

Improving performance

它通过从缓存(先前由客户端发出的请求中保存)中检索内容的服务来加快服务速度。

It fasten the service by process of retrieving content from the cache which was saved when previous request was made by the client.

Translation

它通过排除源内容或用原始本地内容替换源内容来帮助为本地用户自定义源站点。在此过程中,全球用户的流量将通过翻译代理路由到源网站。

It helps to customize the source site for local users by excluding source content or substituting source content with original local content. In this the traffic from the global users is routed to the source website through Translation proxy.

Accessing services anonymously

在这种情况下,目标服务器从匿名的代理服务器收到请求,且不会收到有关最终用户的任何信息。

In this the destination server receives the request from the anonymzing proxy server and thus does not receive information about the end user.

Security

由于代理服务器隐藏了用户身份,它可以防止垃圾邮件和黑客攻击。

Since the proxy server hides the identity of the user hence it protects from spam and the hacker attacks.

Type of Proxies

下表简要描述了代理服务器的类型:

Following table briefly describes the type of proxies:

Forward Proxies

在这种情况下,客户端会要求其内部网络服务器转发至互联网。

In this the client requests its internal network server to forward to the internet.

internet forward proxy

Open Proxies

开放代理服务器可帮助客户端在浏览网络时隐藏其 IP 地址。

Open Proxies helps the clients to conceal their IP address while browsing the web.

internet open proxy

Reverse Proxies

在此,请求会转发到一个或多个代理服务器,代理服务器的响应则会像直接来自原始服务器一样被检索到。

In this the requests are forwarded to one or more proxy servers and the response from the proxy server is retrieved as if it came directly from the original Server.

internet reverse proxy

Architecture

代理服务器架构分为若干模块,如下面的图表所示:

The proxy server architecture is divided into several modules as shown in the following diagram:

internet proxy server architecture

Proxy user interface

此模块控制和管理用户界面,并向最终用户提供一个易用的图形界面、窗口和菜单。此菜单提供以下功能:

This module controls and manages the user interface and provides an easy to use graphical interface, window and a menu to the end user. This menu offers the following functionalities:

  1. Start proxy

  2. Stop proxy

  3. Exit

  4. Blocking URL

  5. Blocking client

  6. Manage log

  7. Manage cache

  8. Modify configuration

Proxy server listener

这是端口,用于侦听来自客户端浏览器的请求。此模块还可执行给定用户列表内的客户端的封锁。

It is the port where new request from the client browser is listened. This module also performs blocking of clients from the list given by the user.

Connection Manager

此模块包含代理服务器的主要功能。它执行下列功能:

It contains the main functionality of the proxy server. It performs the following functions:

  1. It contains the main functionality of the proxy server. It performs the following functions:

  2. Read request from header of the client.

  3. Parse the URL and determine whether the URL is blocked or not.

  4. Generate connection to the web server.

  5. Read the reply from the web server.

  6. If no copy of page is found in the cache then download the page from web server else will check its last modified date from the reply header and accordingly will read from the cache or server from the web.

  7. Then it will also check whether caching is allowed or not and accordingly will cache the page.

Cache Manager

此模块负责在高速缓存中存储、删除、清除和搜索网页。

This module is responsible for storing, deleting, clearing and searching of web pages in the cache.

Log Manager

此模块负责查看、清除和更新日志。

This module is responsible for viewing, clearing and updating the logs.

Configuration

此模块有助于创建配置设置,这个设置反过来允许其他模块执行所需配置,如高速缓存。

This module helps to create configuration settings which in turn let other modules to perform desired configurations such as caching.