What is Proxy Server | How to configure it

What is Proxy Server

Today we will guide you about Proxy Server. A proxy, in its most general form, is a class functioning as an interface to something else. Proxy could interface to anything that is expensive. Proxy is a wrapper or agent object that is being called by the client to access the real serving object behind the scenes. It acts as an intermediary. A client connects to the proxy server. Requesting some service, such as a file, connection, web page. The proxy server evaluates the request as a way to simplify and control its complexity.

Proxy Server

Why we need Proxy Serve

Why we use it ?

Use of the proxy can simply be forwarding to the real object, or can provide additional logic. In the proxy, extra functionality can be provided. For example caching when operations on the real object are resource intensive. Check preconditions before operations on the real object are invoked.

The reverse proxy can distribute the load to several web servers, each web server serving its own application area. In such a case, the reverse proxy may need to rewrite the URLs in each web page.


A reverse proxy can offload the web servers by caching static content like pictures and other static graphical content.


The proxy server can optimize and compress the content to speed up the load time.
Reduces resource usage caused by slow clients on the web servers by caching the content the web server sent and slowly “spoon feeding” it to the client. This especially benefits dynamically generated pages.

What is Forwarding ?

Forwarding used in number of design patterns. Where some members are forwarded to another object. While others handled by the directly used object. The forwarding object is frequently called a wrapper object, and explicit forwarding members are called wrapper functions.

Example: // Sender
void n() {
print(“n1”);
}
// Receiver
void m() {
print(“m2, “); n();
}
void n() {
print(“n2”);
}

What is proxy server
How Proxy Server Work

Delegation

Under delegation this will output m2, n1 because n() is evaluated in the context of the original object, while under forwarding this will output m2, n2 because n() is evaluated in the context of the receiving object. In casual use, forwarding often referred to as “delegation”. Considered a form of delegation, but in careful usage they clearly distinguished by what self refers to.

While delegation is analogous to inheritance, allowing behavioral without changing evaluation context, forwarding is analogous to composition, as execution depends only on the receiving object, not the sending object. Reuse is dynamic. Meaning determined at run time. Rather than static, meaning determined compile/ link time.

Types of Proxy

Virtual Proxy

In place of a complex or heavy object. When an underlying image is huge in size, it may be represented using a virtual proxy object, loading the real object on demand.

Protection Proxy

It is used to control access to a resource based on access rights.

Open Proxy

It is a forwarding proxy server that is accessible by any Internet user.
 As of 2008, Gordon Lyon estimates there are “hundreds of thousands” of open proxies on the Internet. An anonymous open proxy allows users to conceal their IP address while browsing the Web or using other Internet services.

Anonymous Proxy

Thіs server reveаls іts іdentіty аs а server but does not dіsclose the іnіtіаl IP аddress. Though thіs server cаn be dіscovered eаsіly іt cаn be benefіcіаl for some users аs іt hіdes the Internet Protocol аddress.

Trаnspаrent Proxy

Thіs proxy server аgаіn іdentіfіes іtself, аnd wіth the support of HTTP heаders, the fіrst IP аddress cаn be vіewed. The mаіn benefіt of usіng thіs sort of server іs іts аbіlіty to cаche the websіtes. Sometіmes, your IP mаy get bаnned аs а result of the use of trаnspаrent proxy. Your Internet Protocol аddress іs not hіdden іn thіs server.

Reserve Proxy

It is a proxy server that appears to clients to be an ordinary server. Reverse proxies forward requests to one or more ordinary servers which handle the request. The response from the proxy server returned as if it came directly from the original server;leaving the client with no knowledge of the origin servers.

These are installed in the neighborhood of one or more web servers. All traffic coming from the Internet and with a destination of one of the neighborhood’s web servers goes through the proxy server.

Web Proxy

They forward HTTP requests. The request from the client is the same as a regular HTTP request except the full URL is passed, instead of just the path.

Socks Proxy

They also forwards arbitrary data after a connection phase, and is similar to HTTP CONNECT in web proxies.

The proxy server is an additional layer of defence and can protect against some OS and Web Server specific attacks. However, it does not provide any protection from attacks against the web application or service itself, which is generally considered the larger threat.

A reverse proxy server facing the Internet can be used to communicate to a firewall server internal to an organization, providing extranet access to some functions while keeping the servers behind the firewalls.

How Proxy Works
Features

Java Program

The Proxy Image class used to access a remote method. The example creates first an interface against which the pattern creates the classes. This interface contains one method for displaying image.

Repairing Errors

Proxy used to automatically repair errors in the proxied content. 
 For instance, the BikiniProxy system instruments Javascript code on the fly in order to detect and automatically repair errors happening in the browser. Another kind of repair that can be done by a proxy is to fix accessibility issues.