What is HTTP proxy used for?

What is a proxy middleware?

Mostly, it's a proxy that is used to pass an incoming request to some service inside another server (usually a public server). In other words, this proxy server passes the request on to another server, and provides a response to the client. Let's try to understand with some examples.

Example 1: Assume we have 2 servers (S1 and S2) and a proxy (P) in between them. Here's what happens when S1 has a HTTP GET request: S1 -> P -> S2. In this case, all HTTP request headers from S1 are passed on to S2. Let's assume that P has cached some content from S2.

When P responds, it will contain the content from S2. The client will then see a response from P, and S1's headers in this response.

Why use a proxy in the first place? There are many reasons why one would want to use a proxy. Some of them are: Protection of sensitive information. Protection of user privacy. Reduce the attack surface. Reduce the attack complexity. One of the ways for you to think of this is to understand how HTTP requests are made. A HTTP request is made in the following order: The client initiates the connection (via TCP/IP) The client sends a request line with the request headers A server receives the connection and immediately sends back a response line to the client which contains the response headers The client receives the response headers and interprets the response. This normal HTTP request sequence can be very complicated. For example, imagine the case where a user tries to access a resource on your website, and he makes an HTTP request to the server. There are lots of things to keep track of:

Which IP address does he use? Which IP address does the server have? Which IP address does he have? Is he using a local proxy or is he using a public proxy? Is he using a browser or is he using a web application? Which ports does he use? Which port does the server have? What's the User-Agent string on his request? What's the domain he is trying to access?

What is an example of a HTTP proxy?

A HTTP proxy is a server that sits in front of a user's web browser, and intercepts the user's web traffic, allowing it to be handled by other websites. This is an important concept for most users of web proxies who access the internet via their web browser, so it is useful to know what one looks like. If you are using a program such as Internet Explorer or Firefox then the web proxy is a feature built into those programs, and is transparently used when you connect to a web site. However, an HTTP proxy is something completely different. What this program does is provide us with the ability to hide our identity online, so if you are a government employee or simply wish to hide your online activities (or both) then an HTTP proxy is an essential tool. When I first needed to use an HTTP proxy it made no sense to me at all! That being said, here we will look at how an HTTP proxy works, how to set it up, and how to check whether your web browser is using an HTTP proxy.

How an HTTP Proxy Works. If you have ever been sent a link through a Facebook notification or WhatsApp message (for instance) then this sort of web traffic works via a HTTP proxy - your smartphone downloads some resources and when it does so the HTTP traffic takes place. That is, when you try to access the website that has sent you the notification you are in fact asking the proxy to download resources from their servers and return them to you so that you can see them in your web browser, or do whatever they are capable of doing. When a website uses an HTTP proxy then there are several advantages - the main ones being anonymity, safety and cost. Let's take a closer look at how each of these works.

Anonymity: If you have ever visited any websites in countries where access is restricted or the country itself has poor internet coverage or is even censored then you may know what is meant when I say that using an HTTP proxy is important. By hiding your identity online you can remain undetected, and it is easy to do. You can make your own domain name and point that to any proxy you wish, with the benefit of remaining anonymous on the net.

Related Answers

Is Postman an API Gateway?

An API gateway is a software layer that processes the traffic of a backend...

What is difference between API gateway and load balancer?

The main difference is that HAProxy is for load bal...

Does AWS use a reverse proxy?

And if it does, what kind of proxy (eg, Nginx, Varnish) If it doesn't, I s...