A proxy server acts as an intermediary between the end users computer and the Internet in order to ensure security, and to provide caching service.
Hypertext Transfer Protocol (HTTP) is an application level network protocol used to deliver a wide variety of data like files or queries results on the Internet.
In this article we will look at HTTP 1.1 and to design an HTTP Proxy Server that will implement some of the features of HTTP 1.1.
Proxy as a gateway
A proxy server is usually associated with or part of a gateway server that separates the Intranet from the outside network and a firewall server that protects the subnet from outside intrusion
Proxy as a Cache Server
One very important use of Proxy is as a Cache Server. Cache mechanism ensures saving some cacheable requests for later use by any user and thus reduce both latency and Internet traffic.
Protocols used by Proxy
Generally Proxy can be based on any kind of application level protocol for transferring data like HTTP or FTP.
Hypertext Transfer Protocol (HTTP) is an application level protocol used to transfer data on the network. It normally takes place over TCP/IP connections. The default port is TCP 80. It can be implemented on any protocols that gives a stable transport.
The HTTP protocol is a request/response protocol.
A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a message containing request modifiers, client information, and possible body content over a connection with a server.
The server responds with a status line, including the messages protocol version and a success or error code. The response will also contain a message containing server information, entity metainformation, and possible entity-body content.
Features of HTTP Proxy Server:
1. It is similar to FTP because it transfers files and uses the services of TCP.
2. It is simpler than FTP as it uses only one TCP connection on a well known port 80.
3. It is similar to SMTP since data is transferred from client and the server.
4. HTTP differs from SMTP in the way messages are sent.
Types of HTTP Servers based on their Anonymity Levels:
4. Highly Anonymous.
HTTP/1.1 is the latest version of HTTP.
Advantages of HTTP/1.1 are:
Better Cache service
Byte range specifiers
Additional methods, condition qualifiers, status codes
This Proxy designed according to the client/server-programming model. It consists of six module.
Manager a configuration module.
Syntaxer responsible for HTTP support: generation, parsing and modification of HTTP messages.
Server a module that interacts with proxy clients.
Mediator an interface layer between Server and Client.
Client accepts requests from Mediator and executes them.
Cache a part of mediator that keeps copies of received data.
Proxy is easily extendable to support more protocols
Clean Object-Oriented Design from the beginning can make development much easier.