Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the role of node agent

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what is the role of node agent". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what is the role of node agent"?

In node, the agent is used to get content from the original server, and the client sends a request to the agent and specifies the target, that is, the original server, and then the agent transfers the request to the original server and returns the obtained content to the client.

This article operating environment: Windows10 system, nodejs version 12.19.0, Dell G3 computer.

What is the use of node agent

Forward agent

The forward agent, that is, the legendary agent, works like a springboard. To put it simply, I am a user, I can't access a website, but I can access a proxy server, this proxy server. He can access the website that I can't access, so I first connect to the proxy server and tell him that I need the content proxy server that can't access the site to get it back, and then return it to me.

From the point of view of the website, only once when the proxy server comes to pick up the content, there is a record that sometimes does not know that it is the user's request, and hides the user's information, depending on whether the agent tells the site or not.

The conclusion is that the forward proxy is a server between the client and the original server (origin server). In order to get the content from the original server, the client sends a request to the agent and specifies the target (the original server), and then the agent transfers the request to the original server and returns the obtained content to the client. The client must make some special settings to use the forward proxy.

The concept of reverse proxy

Continue to give an example: for example, when a user visits http://ooxx.me/readme, but there is no readme page on ooxx.me, he secretly takes it from another server and vomits it to the user as his own content, but the user does not know this is normal, and the user is generally very stupid.

The server corresponding to the domain name ooxx.me mentioned here has set up the reverse proxy function. The conclusion is that the reverse proxy is just the opposite, it is 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), which then determines where to forward the request (the original server) and returns the obtained content to the client as if it were already its own.

The difference between the two

In terms of use

A typical use of forward proxies is to provide access to Internet for LAN clients in firewalls. Forward agents can also use buffering features to reduce network usage. A typical use of a reverse proxy is to provide a server behind a firewall for Internet users to access. Reverse proxies can also provide load balancing for multiple servers at the back end, or buffering services for slower servers at the back end. In addition, reverse proxy can also enable advanced URL policies and management techniques so that web pages on different web server systems exist in the same URL space at the same time.

In terms of security:

The forward agent allows the client to access any website 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 they are accessing a proxy.

At this point, I believe you have a deeper understanding of "what is the role of node agent". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report