Talk about forward proxy and reverse proxy?


What is a proxy server (Proxy Serve)?

Computer systems or other types of network terminals that provide proxy services, instead of network users to obtain network information.

Why use a proxy server?

1. Improve access speed

Since the data returned by the target host will be stored in the hard disk of the proxy server, the next time the customer visits the same site data, it will be directly read from the hard disk of the proxy server, which acts as a cache, especially for popular web pages. Improve access speed.

2. Firewall function

Since all client requests must pass through the proxy server to access the remote site, restrictions can be set on the proxy server to filter out some unsafe information. At the same time, Internet users in the forward proxy can hide their IP and avoid attacks.

3. Break through access restrictions

There are many proxy servers developed on the Internet. When the client computer has limited access, it can access the target site through an unlimited proxy server. Generally speaking, when we use some other websites, we use the proxy server and can directly access them.

What is a forward proxy

Forward proxy (forward proxy), a server located between the client and the original server, in order to obtain content from the original server, the client sends a request to the proxy and specifies the target (the original server), and then the proxy forwards the request to the original server and Return the obtained content to the client, and the client can use the forward proxy. The agent we usually refer to refers to the forward agent.
Simple: A borrows money from C, but due to some circumstances, he cannot directly borrow money from C, so A thinks of a way, he asks B to borrow money from C, so that B borrows money from C instead of A, and A gets C's money For money, C does not know the existence of A, so B acts as A's agent.
insert image description here

What is a reverse proxy

Reverse proxy (Reverse Proxy), accepts the connection request on the Internet with the proxy server, then forwards the request to the server on the internal network, and returns the result obtained from the server to the client requesting on the Internet, at this time, the proxy The server acts as a reverse proxy server externally.
It’s a bit abstract to understand, so it can be said: A borrows money from B, B does not take his own money, but borrows money from C quietly, and then hands it over to A after getting the money, A thinks it is B’s money, but he does not know the existence of C.
insert image description here

The difference between forward proxy and reverse proxy

different location

The forward proxy is set up between the client and the target host;
the reverse proxy is set up on the server side;

Proxies are different

Forward proxy, proxy client, the server does not know the client that actually initiates the request;
reverse proxy, proxy server, the client does not know the server that actually provides the service;

Different uses

Forward proxy, providing access to the Internet for LAN clients inside the firewall;
reverse proxy, providing Internet access to servers behind the firewall;

Security is different

The forward proxy allows the client to access any web page through it and hides the client itself, so security measures must be taken to ensure that only authorized clients are served; the reverse proxy is transparent to the
outside world, and visitors do not know that they are visiting Which agent is it.

Forward Proxy Application

  1. Access resources that were previously inaccessible
  2. Used as a cache to speed up access
  3. Authorize client access and authenticate online
  4. The agent can record user access records (online behavior management) and hide user information from the outside world

Application of reverse proxy

  1. Protect intranet security
  2. load balancing
  3. Cache, reduce server pressure

Guess you like

Origin blog.csdn.net/zhaojiaxing123/article/details/129122967