Home >Backend Development >PHP Tutorial >The difference between forward proxy and reverse proxy

The difference between forward proxy and reverse proxy

WBOY
WBOYOriginal
2016-07-29 08:55:591232browse

Reprinted from: http://blog.csdn.net/m13666368773/article/details/8060481
The concept of forward proxy
Forward proxy, also known as the legendary proxy, works like a springboard,
Simply put,
I am a user, I cannot access a certain website, but I can access a proxy server
What about this proxy server? It can access the website that I cannot access
So I first connected to the proxy server and told him that I needed the content of the inaccessible website
The proxy server goes to get it back and returns it to me
From the perspective of the website, there is only one record when the proxy server comes to retrieve the content
Sometimes the user’s request is not known and the user’s information is hidden. It depends on whether the agent tells the website or not
The conclusion is that a forward proxy is a server between the client and the origin server. In order to obtain content from the origin server, the client sends a request to the proxy and specifies the target (origin server), and then the proxy forwards it to the origin server. Request and return the obtained content to the client. The client must make some special settings to use the forward proxy.
The concept of reverse proxy
Continuing with the example:
Example user visits http://ooxx.me/readme
But the readme page does not exist on ooxx.me
He secretly retrieved it from another server and then spat it out to the user as his own content
But users don’t know
This is normal, users are generally stupid
The server corresponding to the domain name ooxx.me mentioned here has a reverse proxy function
The conclusion is that a reverse proxy is just the opposite. It acts like the original server to the client, and the client does not need to make any special settings. The client sends a normal request to the content in the reverse proxy's namespace (name-space), and then the reverse proxy will determine where to forward the request (original server) and return the obtained content to the client, like these The content is its own original content.
The difference between the two
In terms of usage:
A typical use of a forward proxy is to provide access to the Internet for LAN clients within the firewall. Forward proxies can also use buffering features to reduce network usage. A typical use of a reverse proxy is to provide access to a server behind a firewall to Internet users. A reverse proxy can also provide load balancing for multiple servers on the backend, or buffering for slower servers on the backend.
In addition, reverse proxy can also enable advanced URL policies and management technologies, so that web pages in different web server systems exist in the same URL space at the same time.
From a security perspective:
A forward proxy allows clients to access arbitrary websites through it and hides the client itself, so you must take security measures to ensure that only authorized clients are served.
Reverse proxies are transparent to the outside world, and visitors do not know that they are accessing a proxy.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced the difference between forward proxy and reverse proxy, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn