Fun talk about the working principle of proxy server

Recently, students often have these questions:

  • What does a proxy mean and why do we use a proxy server.

  • After setting up the proxy, my browser or mobile phone can't access the website unexpectedly, I can't accept it!

Asking such a question is usually because you don’t know enough about the proxy server, let alone know the reason! Below, Huahua will take you 5 minutes to understand its function & setting skills. I hope I will encounter such a problem in the future, and never ask such a dubious question again!

Priority 1:

A: What do you mean by agency?

If you don’t understand this, you can choose to expand your knowledge in this way:

1) Baidu

2) Look at the example I gave. Big star Jay Chou-server (can respond to requests for singing, dancing, concerts, entertainment programs, etc.) investors in various entertainment activities/movies/concerts-client (will send requests to the server to sing, dance, etc.) Requirements for concerts, entertainment programs, etc.) Jay Chou’s agent-proxy server (I am his agent, what investors want to invest in, what shows and movies Jay Chou wants to participate in, must get my permission and contact me After that, we can proceed to the next step. Jay Chou cannot communicate directly with investors. Everything must go through me – this broker)

So the proxy means: the client initiates a request to the server, it must pass me first, if it doesn't pass me: the request is over, and both parties are in a disconnected state. However: this situation is limited to the case where an agent is set up. If there is no agent set up, you can play differently, and there is no middleman to make the difference.

B: Why do we use a proxy server?

Going back to the question A we just asked, we use an agent, in fact, to earn the "price difference" in the middle and get us useful information. What information can it get for you? To put it bluntly: it's the packet capture and data capture (http request and the data you transmit and the data returned by the server) that we put in our mouths all day long. Anyway, it works for you. Anyway, it can be used during the test. To.

C: The mechanism by which the agent operates.

I am clumsy, and I specially drew two pictures to help everyone understand the mechanism of this operation. The first: it is our common access mode. Don't set up any proxy. No matter whether you use a computer browser or a mobile phone browser, the access will be smooth without impurities or additions:

Fun talk about the working principle of proxy server

The second: Suddenly the boss asks you to record or copy all the data and information between you and the server no matter what method you use. At this time, our proxy method appeared, and the tools can be: Fiddler, Jmeter, Charles and other various other tool names that are not all listed. The way we act as an agent has already been explained, broker. Let's make another analogy here: big star-server broker-proxy server investor-client

Fun talk about the working principle of proxy server

Priority 2:

Back to the question: Why can't I access the network after setting up a proxy? The answer is as follows: 1) You set up the wrong agent. If you are looking for Jay Chou for a business performance, but you find Jay Chou’s agent, it must be no good~ 2) You set up the correct agent, but the agent is offline. . . . So you have to remember to activate your agent and make sure that the agent is online.

Of course, if you want to visit the website happily, it is very simple without going through a proxy~~Remove the proxy and it's OK! So far: The usage and meaning of the proxy have been explained. The next article will share with you: How to set the proxy on the browser and APP respectively by Fiddler Jmeter Charles, and the points of attention for setting.


Above are some videos and interview questions I collected.

For software testing friends, it should be the most comprehensive and complete interview preparation warehouse. In order to better organize each module, I also refer to many high-quality blog posts and projects on the Internet, and strive not to miss every knowledge point. Friends relied on these contents to review, and got offers from big factories such as BATJ. This warehouse has also helped many software test learners, and I hope it can also help you.

Follow my WeChat public account [Programmer Erhei] Get it for free
 

Guess you like

Origin blog.csdn.net/weixin_53519100/article/details/114988276