Data packet capturing method and device based on reverse proxy technology
Through the packet crawling method based on reverse proxy technology, the problem of crawling HTTP requests issued by C++ code and low processing efficiency when multiple servers in the LAN is frequently switched, and efficient packet crawling and development efficiency is achieved promote.
Patent Information
- Application Number
- CN202411588013.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-14
AI Technical Summary
The existing technology is difficult to capture HTTP requests issued by C++ code, and tools such as Wireshark are difficult to use, have raw data, and do not support HTTPS. The processing efficiency is low when multiple servers in the LAN are frequently switched.
Using the packet crawling method based on reverse proxy technology, by installing and configuring the reverse proxy server, configuring the proxy on the client, intercepting request and responding packets, extracting and parsing request and response information, and forwarding requests and responses according to proxy rules and Response data. If you need to capture HTTPS traffic, install a self-signed SSL certificate for encryption and decryption.
Through simple settings, you can capture requests issued by C++, improve development efficiency and productivity, realize packet capture of multiple servers in LAN, and improve the development efficiency of frequent switching of multiple servers in LAN.
Smart Images

Figure CN119449872A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data packet capture, and in particular to a method and device for capturing data packets based on reverse proxy technology. Background Art
[0002] Currently, iPhone / Android packet capture through system proxy is usually implemented based on Apple and Android network request APIs. If the network request is implemented through C++ code, it directly uses sockets or other network libraries to send HTTP requests, and these requests will not be captured by the system proxy. Because the system proxy is usually implemented based on the Hook of the network request API, it can only capture requests issued using the system network API. If you want to capture HTTP requests issued by C++ code, you can only capture TCP or socket packets through wireshark, etc., but there are several problems with capturing packets through wireshark, etc.:
[0003] First, it is difficult to use; Wireshark is a powerful network protocol analysis tool that requires a certain level of network knowledge and technical foundation to use it proficiently, while Charles is relatively easy to use.
[0004] Second, the packet capture data is relatively primitive. Compared with Charles, the packet capture data of Wireshark is relatively primitive and needs to be manually parsed and filtered, which may be difficult for beginners.
[0005] Third, it is not easy to filter and replay data; compared with Charles, Wireshark cannot easily filter and replay the captured data, which requires certain manual operations and technical support.
[0006] Fourth, it does not support SSL decryption of HTTPS. Wireshark does not support SSL decryption of HTTPS and requires additional plug-ins and certificates to decrypt HTTPS traffic. Charles, on the other hand, has built-in SSL decryption function and can directly decrypt HTTPS traffic.
[0007] In the related art, CN117749672A discloses a method for configuring a root certificate based on a certificate configuration instruction and adding the root certificate to a trust store; configuring a Hypertext Transfer Protocol Security agent based on a Secure Sockets Layer agent instruction; and after receiving a data packet capture instruction, capturing data packets of a mobile application to be tested based on the Hypertext Transfer Protocol Security agent. Although this technology can capture data packets of the mobile application. However, for a scenario where a client requests multiple servers in a local area network, it is necessary to frequently switch between multiple servers in the local area network, resulting in low processing efficiency.
[0008] Therefore, how to invent a data packet capture method that can capture requests issued by C++ through simple settings, improve development efficiency, and increase productivity has become an urgent problem to be solved. Summary of the invention
[0009] To this end, the present invention provides a data packet capture method and device based on reverse proxy technology, which can capture requests issued by C++ through simple settings, greatly improving development efficiency and productivity.
[0010] In order to achieve the above object, the present invention provides the following technical solution: a data packet capture method based on reverse proxy technology, comprising:
[0011] Install and configure a reverse proxy server according to user needs; configure a proxy on the client according to the reverse proxy server;
[0012] The reverse proxy server receives a request sent by a client; the reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy;
[0013] The reverse proxy server extracts the request header and request body information in the request data packet to obtain request information;
[0014] The reverse proxy server forwards the request sent by the client to the target server according to the proxy rules and the request information;
[0015] The reverse proxy server receives the response data of the target server, wherein the response data is generated by the target server after receiving the request and processing the request;
[0016] The reverse proxy server intercepts the response data packet by setting an interception strategy;
[0017] The reverse proxy server parses the response header and response body information in the response data packet to obtain response data;
[0018] The reverse proxy server analyzes and processes the response data to obtain the processed response data;
[0019] The reverse proxy server transmits the processed response data to the client.
[0020] As a preferred solution of a data packet capture method based on reverse proxy technology, during the process of installing and configuring the reverse proxy server according to user needs, if HTTPS traffic is to be captured, a self-signed SSL certificate is installed on the reverse proxy server; and the HTTPS traffic is encrypted and decrypted using the self-signed SSL certificate.
[0021] As a preferred solution of a data packet capture method based on reverse proxy technology, in the process of the reverse proxy server intercepting the request data packet by setting the interception strategy, the set interception strategy includes a monitoring network port strategy and an interception network traffic strategy.
[0022] As a preferred solution of a data packet capture method based on reverse proxy technology, the request information includes: the IP address of the client, the requested URL, the request policy, and the request parameters;
[0023] The response data includes: response status code, response content and response header data.
[0024] As a preferred solution of a data packet capture method based on reverse proxy technology, when the reverse proxy server forwards the request sent by the client to the target server, the reverse proxy server re-encapsulates the processed request into a new HTTP request and forwards the new HTTP request to the target server.
[0025] The present invention also provides a data packet capture device based on reverse proxy technology, comprising:
[0026] A reverse proxy server installation and configuration module is used to install and configure a reverse proxy server according to user requirements; and configure a proxy on the client side according to the reverse proxy server;
[0027] A request data packet interception module is used for the reverse proxy server to receive a request sent by a client; the reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy;
[0028] A request information extraction module, used for the reverse proxy server to extract the request header and request body information in the request data packet to obtain request information;
[0029] A request forwarding module, used for the reverse proxy server to forward the request sent by the client to the target server according to the proxy rules and the request information;
[0030] A response data receiving module, used for the reverse proxy server to receive the response data of the target server, wherein the response data is generated by the target server after receiving the request and processing the request;
[0031] A response data packet interception module, used for the reverse proxy server to intercept the response data packet by setting an interception strategy;
[0032] A response data extraction module is used for the reverse proxy server to parse the response header and response body information in the response data packet to obtain response data;
[0033] A response data analysis module, used for the reverse proxy server to analyze and process the response data to obtain the processed response data;
[0034] The response data returning module is used for the reverse proxy server to transmit the processed response data to the client.
[0035] As a preferred solution for a data packet capture device based on reverse proxy technology, in the reverse proxy server installation and configuration module, during the process of installing and configuring the reverse proxy server according to user needs, if HTTPS traffic is to be captured, a self-signed SSL certificate is installed on the reverse proxy server; and the HTTPS traffic is encrypted and decrypted using the self-signed SSL certificate.
[0036] As a preferred solution of a data packet capture device based on reverse proxy technology, in the request data packet interception module, when the reverse proxy server intercepts the request data packet through the set interception strategy, the set interception strategy includes a monitoring network port strategy and an interception network traffic strategy.
[0037] As a preferred solution of a data packet capture device based on reverse proxy technology, in the request information extraction module, the request information includes: the IP address of the client, the requested URL, the request policy, and the request parameters;
[0038] In the response data extraction module, the response data includes: response status code, response content and response header data.
[0039] As a preferred solution of a data packet capture device based on reverse proxy technology, in the request forwarding module, when the reverse proxy server forwards the request sent by the client to the target server, the reverse proxy server re-encapsulates the processed request into a new HTTP request and forwards the new HTTP request to the target server.
[0040] The present invention has the following advantages: a reverse proxy server is installed and configured according to user requirements, and a proxy is configured on a client according to the reverse proxy server, so that requests issued by C++ can be captured through simple settings, which can greatly improve development efficiency and productivity; after receiving the request sent by the client, the reverse proxy server extracts the request header and request body information in the request data packet to obtain request information; at the same time, the reverse proxy server forwards the request sent by the client to the target server according to the proxy rule and the request information, and receives response data from the target server, and then intercepts the response data packet and parses and processes it to obtain response data by setting an interception strategy, and transmits the processed response data to the client, so that the reverse proxy can capture packets to better realize the scenario in which a client requests multiple servers in a local area network, and can also effectively improve the efficiency for development scenarios in which multiple servers in a local area network need to be frequently switched. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0042] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0043] Figure 1 A schematic diagram of a flow chart of a method for capturing data packets based on a reverse proxy technology provided in Embodiment 1 of the present invention;
[0044] Figure 2 A schematic diagram of a specific implementation process of a data packet capture method based on reverse proxy technology provided in Example 1 of the present invention;
[0045] Figure 3 This is a schematic diagram of the architecture of a data packet capture device based on reverse proxy technology provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0046] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Example 1
[0048] See also Figure 1 and Figure 2 Embodiment 1 of the present invention provides a method for capturing data packets based on reverse proxy technology, comprising the following steps:
[0049] S1. Install and configure a reverse proxy server according to user requirements; configure a proxy on the client according to the reverse proxy server;
[0050] S2, the reverse proxy server receives the request sent by the client; the reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy;
[0051] S3, the reverse proxy server extracts the request header and request body information in the request data packet to obtain request information;
[0052] S4, the reverse proxy server forwards the request sent by the client to the target server according to the proxy rule and the request information;
[0053] S5, the reverse proxy server receives the response data of the target server, the response data is generated by the target server after receiving the request and processing the request;
[0054] S6, the reverse proxy server intercepts the response data packet by setting an interception strategy;
[0055] S7, the reverse proxy server parses the response header and response body information in the response data packet to obtain response data;
[0056] S8, the reverse proxy server analyzes and processes the response data to obtain the processed response data;
[0057] S9. The reverse proxy server transmits the processed response data to the client.
[0058] In this embodiment, in step S1, a reverse proxy server is installed and configured according to user requirements; a proxy is configured on the client according to the reverse proxy server;
[0059] Specifically, select a reverse proxy server according to user needs, and install and configure it according to the official documentation. For example, if you use Nginx as a proxy server, you need to edit the Nginx configuration file, set proxy rules and SSL certificates, etc.
[0060] After the reverse proxy server is installed and configured, you need to configure the proxy on the client so that the client's request can be intercepted by the reverse proxy server. The specific operation method depends on the operating system and application used by the user. For example, on an iOS device, you can forward requests to the proxy server by setting the proxy option of the Wi-Fi network.
[0061] In this embodiment, if HTTPS traffic is to be captured, a self-signed SSL certificate is installed on the reverse proxy server; and the HTTPS traffic is encrypted and decrypted using the self-signed SSL certificate.
[0062] When installing a self-signed SSL certificate, you can use the OpenSSL tool to generate a self-signed certificate and then install and configure it on the proxy server.
[0063] In this embodiment, the process of encrypting and decrypting HTTPS traffic through the self-signed SSL certificate is as follows: when establishing a secure connection between the client and the reverse proxy server, the SSL / TLS protocol is used to encrypt data transmission. The SSL / TLS protocol provides functions such as data encryption, identity authentication, and message integrity verification to ensure the security of data during transmission.
[0064] Among them, the SSL / TLS protocol is used for data transmission encryption, including symmetric encryption algorithms and asymmetric encryption algorithms. During the SSL / TLS handshake process, a symmetric encryption algorithm is used to encrypt the communication data. Commonly used symmetric encryption algorithms include AES, DES, 3DES, etc., which ensure the confidentiality of the communication data through key negotiation and data encryption and decryption processes. During the SSL / TLS handshake process, an asymmetric encryption algorithm is used for key negotiation and identity authentication. Commonly used asymmetric encryption algorithms include RSA, DSA, ECC, etc., which ensure the identities of the communicating parties and the integrity of the communication data through the pairing of public and private keys.
[0065] When using the SSL / TLS protocol for identity authentication, a digital certificate is used for identity authentication. The digital certificate contains the server's public key and server identity information. The client can confirm the server's identity by verifying the validity of the digital certificate to prevent security threats such as man-in-the-middle attacks.
[0066] In this embodiment, after completing the client configuration, start the packet capture tool and select the reverse proxy server as the source of the packet capture. If you need to capture HTTPS traffic, you need to import the SSL certificate into the packet capture tool.
[0067] In this embodiment, in step S2, the reverse proxy server receives a request sent by the client; the reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy;
[0068] Specifically, the client sends a request to the reverse proxy server; after receiving the request, the reverse proxy server intercepts the request data packet by monitoring the network port or intercepting the network traffic.
[0069] Among them, the request data packet contains the HTTP request information sent by the client, such as the request header, request parameters, etc.
[0070] In this embodiment, in step S3, the reverse proxy server extracts the request header and request body information in the request data packet to obtain request information;
[0071] The request information includes the client's IP address, requested URL, request method (GET, POST, etc.), request parameters, etc.
[0072] In this embodiment, in step S4, the reverse proxy server forwards the request sent by the client to the target server according to the proxy rule and the request information;
[0073] Specifically, the reverse proxy server re-encapsulates the processed request into a new HTTP request, and forwards the new HTTP request to the target server.
[0074] The processing of the request includes logical judgments such as load balancing, access control, and cache strategy.
[0075] In this embodiment, in step S5, the reverse proxy server receives the response data of the target server, and the response data is generated by the target server after receiving the request and processing the request; in step S6, the reverse proxy server intercepts the response data packet by setting an interception strategy;
[0076] Specifically, the reverse proxy server intercepts the response data packet by monitoring the network port or intercepting the network traffic. The response data packet includes information such as the HTTP response header and response body returned by the target server.
[0077] In this embodiment, in step S7, the reverse proxy server parses the response header and response body information in the response data packet to obtain response data;
[0078] Specifically, the reverse proxy server parses the intercepted response data packet, extracts information such as the response header and response body, and obtains the response data.
[0079] The response data includes the response status code, response content, response header, etc.
[0080] In this embodiment, in step S8, the reverse proxy server analyzes and processes the response data to obtain the processed response data;
[0081] Specifically, the reverse proxy server analyzes and processes the response data, which may include performance evaluation, security auditing, content filtering, etc. The analysis results can be used to optimize network performance, protect network security, etc.
[0082] In this embodiment, in step S9, the reverse proxy server transmits the processed response data to the client.
[0083] In summary, the present invention installs and configures a reverse proxy server according to user needs, and configures a proxy on the client according to the reverse proxy server, so that the request issued by C++ can be captured through simple settings, which can greatly improve development efficiency and productivity; after receiving the request sent by the client, the reverse proxy server extracts the request header and request body information in the request data packet to obtain the request information; at the same time, the reverse proxy server forwards the request sent by the client to the target server according to the proxy rules and the request information, and receives the response data of the target server, and then intercepts the response data packet and parses it to obtain the response data by setting the interception strategy, and transmits the processed response data to the client, so that the reverse proxy can capture the packet, and better realize the scenario in which a client requests multiple servers in the local area network, and can also effectively improve the efficiency for the development scenario in which multiple servers in the local area network need to be frequently switched.
[0084] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0085] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0086] Example 2
[0087] See also Figure 3 Embodiment 2 of the present invention further provides a data packet capture device based on reverse proxy technology, comprising:
[0088] The reverse proxy server installation and configuration module 001 is used to install and configure the reverse proxy server according to user needs; configure the proxy on the client according to the reverse proxy server;
[0089] The request data packet interception module 002 is used for the reverse proxy server to receive the request sent by the client; the reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy;
[0090] The request information extraction module 003 is used for the reverse proxy server to extract the request header and request body information in the request data packet to obtain the request information;
[0091] The request forwarding module 004 is used for the reverse proxy server to forward the request sent by the client to the target server according to the proxy rules and the request information;
[0092] Response data receiving module 005, used for the reverse proxy server to receive the response data of the target server, the response data is generated by the target server after receiving the request and processing the request;
[0093] A response data packet interception module 006, used for the reverse proxy server to intercept the response data packet by setting an interception strategy;
[0094] Response data extraction module 007, used for the reverse proxy server to parse the response header and response body information in the response data packet to obtain response data;
[0095] Response data analysis module 008, used for the reverse proxy server to analyze and process the response data to obtain the processed response data;
[0096] The response data returning module 009 is used for the reverse proxy server to transmit the processed response data to the client.
[0097] In this embodiment, in the reverse proxy server installation and configuration module 001, during the process of installing and configuring the reverse proxy server according to user requirements, if HTTPS traffic needs to be captured, a self-signed SSL certificate is installed on the reverse proxy server; and the HTTPS traffic is encrypted and decrypted using the self-signed SSL certificate.
[0098] In this embodiment, in the request data packet interception module 002, when the reverse proxy server intercepts the request data packet by setting the interception strategy, the set interception strategy includes a monitoring network port strategy and an interception network traffic strategy.
[0099] In this embodiment, in the request information extraction module 003, the request information includes: the IP address of the client, the requested URL, the request policy, and the request parameters;
[0100] In the response data extraction module 007, the response data includes: response status code, response content and response header data.
[0101] In this embodiment, in the request forwarding module 004, when the reverse proxy server forwards the request sent by the client to the target server, the reverse proxy server re-encapsulates the processed request into a new HTTP request and forwards the new HTTP request to the target server.
[0102] It should be noted that the information interaction, execution process and other contents between the modules of the above-mentioned system are based on the same concept as the method embodiment in Example 1 of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0103] Example 3
[0104] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, in which a program code of a data packet capture method based on reverse proxy technology is stored. The program code includes instructions for executing embodiment 1 or any possible implementation method of a data packet capture method based on reverse proxy technology.
[0105] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0106] Example 4
[0107] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0108] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a data packet capture method based on reverse proxy technology in embodiment 1 or any possible implementation thereof.
[0109] Specifically, the processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor implemented by reading software codes stored in a memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.
[0110] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0111] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0112] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A data packet capture method based on reverse proxy technology, characterized in that: include: Install and configure the reverse proxy server according to user needs; Configure the proxy on the client according to the reverse proxy server; The reverse proxy server receives a request sent by the client; The reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy; The reverse proxy server extracts the request header and request body information in the request data packet to obtain request information; The reverse proxy server forwards the request sent by the client to the target server according to the proxy rules and the request information; The reverse proxy server receives the response data of the target server, wherein the response data is generated by the target server after receiving the request and processing the request; The reverse proxy server intercepts the response data packet by setting an interception strategy; The reverse proxy server parses the response header and response body information in the response data packet to obtain response data; The reverse proxy server analyzes and processes the response data to obtain the processed response data; The reverse proxy server transmits the processed response data to the client.
2. According to the method of claim 1, the method is characterized in that: In the process of installing and configuring the reverse proxy server according to user needs, if HTTPS traffic needs to be captured, a self-signed SSL certificate is installed on the reverse proxy server; and the HTTPS traffic is encrypted and decrypted using the self-signed SSL certificate.
3. According to the method of claim 2, the method is characterized in that: In the process of the reverse proxy server intercepting the request data packet by setting the interception strategy, the set interception strategy includes a monitoring network port strategy and an interception network traffic strategy.
4. According to the method of claim 3, the method is characterized in that: The request information includes: the client's IP address, the requested URL, the request policy, and the request parameters; The response data includes: response status code, response content and response header data.
5. The method for capturing data packets based on reverse proxy technology according to claim 4 is characterized in that: In the process of the reverse proxy server forwarding the request sent by the client to the target server, the reverse proxy server re-encapsulates the processed request into a new HTTP request, and forwards the new HTTP request to the target server.
6. A data packet capture device based on reverse proxy technology, characterized in that: include: Reverse proxy server installation and configuration module, used to install and configure the reverse proxy server according to user needs; Configure the proxy on the client according to the reverse proxy server; A request data packet interception module is used for the reverse proxy server to receive a request sent by a client; the reverse proxy server receives the request and intercepts the request data packet by setting an interception strategy; A request information extraction module, used for the reverse proxy server to extract the request header and request body information in the request data packet to obtain request information; A request forwarding module, used for the reverse proxy server to forward the request sent by the client to the target server according to the proxy rules and the request information; A response data receiving module, used for the reverse proxy server to receive the response data of the target server, wherein the response data is generated by the target server after receiving the request and processing the request; A response data packet interception module, used for the reverse proxy server to intercept the response data packet by setting an interception strategy; A response data extraction module is used for the reverse proxy server to parse the response header and response body information in the response data packet to obtain response data; A response data analysis module, used for the reverse proxy server to analyze and process the response data to obtain the processed response data; The response data returning module is used for the reverse proxy server to transmit the processed response data to the client.
7. A data packet capture device based on reverse proxy technology according to claim 6, characterized in that: In the reverse proxy server installation and configuration module, during the process of installing and configuring the reverse proxy server according to user requirements, if HTTPS traffic needs to be captured, a self-signed SSL certificate is installed on the reverse proxy server; and the HTTPS traffic is encrypted and decrypted using the self-signed SSL certificate.
8. The data packet capture device based on reverse proxy technology according to claim 7, characterized in that: In the request data packet interception module, during the process of the reverse proxy server intercepting the request data packet by using the set interception strategy, the set interception strategy includes a monitoring network port strategy and an interception network traffic strategy.
9. The data packet capture device based on reverse proxy technology according to claim 8, characterized in that: In the request information extraction module, the request information includes: the client's IP address, the requested URL, the request policy, and the request parameters; In the response data extraction module, the response data includes: response status code, response content and response header data.
10. The data packet capture device based on reverse proxy technology according to claim 9, characterized in that: In the request forwarding module, when the reverse proxy server forwards the request sent by the client to the target server, the reverse proxy server repackages the processed request into a new HTTP request and forwards the new HTTP request to the target server.