+

CN110493318B - HTTP request information processing method, device, medium and equipment - Google Patents

HTTP request information processing method, device, medium and equipment Download PDF

Info

Publication number
CN110493318B
CN110493318B CN201910666272.8A CN201910666272A CN110493318B CN 110493318 B CN110493318 B CN 110493318B CN 201910666272 A CN201910666272 A CN 201910666272A CN 110493318 B CN110493318 B CN 110493318B
Authority
CN
China
Prior art keywords
http
request
proxy server
preset
network access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910666272.8A
Other languages
Chinese (zh)
Other versions
CN110493318A (en
Inventor
王明晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910666272.8A priority Critical patent/CN110493318B/en
Publication of CN110493318A publication Critical patent/CN110493318A/en
Application granted granted Critical
Publication of CN110493318B publication Critical patent/CN110493318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a processing method, a device, a medium and electronic equipment for HTTP/HTTPS request information, wherein the processing method comprises the following steps: setting a first attribute of a network access proxy server for processing HTTP/HTTPS request information; acquiring second attribute information of the network access proxy server, wherein the second attribute is used for realizing a preset extended function; the configuration of the preset function is carried out through a packet written by a Web programming language with a preset format running at a server, and the network access proxy server is controlled to monitor the request event of any HTTP/HTTPS request and/or the response event aiming at any HTTP/HTTPS request in an event monitoring mode. The configuration of the preset function is carried out through the package compiled by the Web programming language in the preset format running at the server, so that the preset extended function of the network access proxy server can be enriched continuously to meet different requirements; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.

Description

HTTP request information processing method, device, medium and equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, a medium and electronic equipment for processing HTTP/HTTPS request information.
Background
The existing technology, as an intelligent device, needs to send network requests and various service communications continuously. As programmers and test workers, frequent network requests to debug mobile devices or their own devices are required. Due to the lack of built-in checker tools on mobile devices, testers must complete the network requested checks with third party tools. What the existing third party tools do is: all network requests on the device are monitored (monitored), and are displayed after being captured, and meanwhile, normal sending and returning of the network requests are not influenced.
For such third-party tools, Charles, which is a one-time payment type software, is a closed-source software running on macOS from Java, and Charles, which is a network packet intercepting tool commonly used under Mac, exists most widely at present, and when mobile development is performed, in order to debug a network communication protocol with a server, it is often necessary to intercept a network packet for analysis. Charles implements interception and analysis of network packets by setting itself as a network access proxy of the system so that all network access requests are completed through it.
Except for Charles, the implementation of these software is basically in the form of man-in-the-middle attack, the software itself acts as a network agent to which all network requests of the device to be monitored are sent, and the agent, after receiving the requests, records the request data for later presentation; and then, the request is directly transmitted to the real back end, the response to the request is recorded in the same way, and then the response data is directly returned to the monitoring equipment.
For the existing solution, taking Charles as an example,
the disadvantages of Charles are as follows:
charles is a paid App with poor quality, a configuration interface needs to be provided, and the configuration function corresponding to the configuration interface is limited, so that different requirements of users cannot be met; and the process of setting the configuration function through the configuration interface is too complex, and a large amount of manpower and material resources are consumed.
Therefore, in the long-term research and development, the inventor has conducted a great deal of research on a processing method of HTTP/HTTPs request information, and has proposed a processing method of HTTP/HTTPs request information to solve one of the above technical problems.
Disclosure of Invention
The invention aims to provide a method, a device, a medium and an electronic device for processing HTTP/HTTPS request information, which can solve at least one technical problem mentioned above. The specific scheme is as follows:
according to a specific implementation manner of the present invention, in a first aspect, the present invention provides an HTTP/HTTPs request information processing method, including:
setting a first attribute of a network access proxy server for processing HTTP/HTTPS request information; the first attribute is used for setting a preset processing mode for the network access proxy server to process the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request, so that the network access proxy server is controlled to process the corresponding HTTP/HTTPS request information in the preset processing mode;
acquiring second attribute information of the network access proxy server, wherein the second attribute is used for realizing a preset extended function of the network access proxy server;
the configuration of the preset function is carried out through a packet written by a Web programming language with a preset format running at a server, and the network access proxy server is controlled to monitor the request event of any HTTP/HTTPS request and/or the response event aiming at any HTTP/HTTPS request in an event monitoring mode.
Optionally, the method further includes:
acquiring type information of an HTTP/HTTPS request;
setting a preset processing mode for the network access proxy server to process the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request so as to control the network access proxy server to process the corresponding HTTP/HTTPS request information in the preset processing mode;
the preset processing mode comprises a first preset processing mode and a second preset processing mode, and the first preset processing mode corresponds to the current request which is an unencrypted HTTP request in type; the second preset processing mode corresponds to the fact that the type of the current request is an encrypted HTTPS request.
Optionally, the controlling the network access proxy server to process the corresponding HTTP/HTTPs request information in the preset processing manner includes:
if the type of the current request is an unencrypted HTTP request, controlling the network access proxy server to process unencrypted HTTP request information in the first preset processing mode; and
the controlling the network access proxy server to process the unencrypted HTTP request information in the first preset processing manner includes:
the network access proxy server acquires corresponding request data information, analyzes the request data information and obtains associated data associated with the non-encrypted HTTP request;
storing the request data information and the associated data, and triggering a corresponding request event;
wherein the associated data comprises at least: time-consuming data for each stage, transmission information for each stage.
Optionally, controlling the network access proxy server to process the corresponding HTTP/HTTPs request information in the preset processing manner further includes:
if the type of the current request is an encrypted HTTPS request, controlling the network access proxy server to process encrypted HTTPS request information in the second preset processing mode; and
controlling the network access proxy server to process the encrypted HTTPS request information in the second preset processing manner includes:
any HTTPS request sends a connection request to an HTTP proxy server, wherein the connection request is an unencrypted request of HTTP;
the HTTP server monitors the connection request, guides the connection request into the HTTPS server, issues a certificate through a built-in root certificate, and returns the certificate to the client side provided with the root certificate so as to control the network access proxy server to decrypt encrypted HTTPS request information, wherein the root certificate is used for issuing certificate decryption information;
capturing any HTTPS request, sending any HTTPS request to a request address, and obtaining corresponding return information;
collecting and storing corresponding return information; triggering a corresponding response event.
Optionally, the method further includes:
acquiring a first preset rule matched with a uniform resource locator of a current HTTP/HTTPS request, and modifying the uniform resource locator according to the first preset rule to obtain a modified address.
Optionally, the method further includes:
acquiring a second preset rule for prohibiting the request from being sent;
and if the format of the current HTTP/HTTPS request accords with a second preset rule for prohibiting the request from being sent, prohibiting the current HTTP/HTTPS request from being sent.
Optionally, the method further includes:
setting a visual interface, and viewing the HTTP/HTTPS request information through the visual interface.
According to a second aspect of the present invention, there is provided an HTTP/HTTPs request information processing apparatus including:
a first attribute setting unit for setting a first attribute of a network access proxy server for processing HTTP/HTTPS request information; the first attribute is used for setting a preset processing mode for the network access proxy server to process the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request, so that the network access proxy server is controlled to process the corresponding HTTP/HTTPS request information in the preset processing mode;
the acquisition unit is used for acquiring second attribute information of the network access proxy server, and the second attribute is used for realizing a preset extended function of the network access proxy server;
the configuration unit is used for configuring the preset function through a package written by a Web programming language in a preset format running at the server;
and the monitoring unit is used for controlling the network access proxy server to monitor a request event of any HTTP/HTTPS request and/or a response event aiming at any HTTP/HTTPS request in an event monitoring mode. According to a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a method of processing HTTP/HTTPs request information as described in any one of the above.
According to a fourth aspect of the present invention, there is provided an electronic apparatus including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of processing HTTP/HTTPs request information as described in any one of the above.
Compared with the prior art, the scheme of the embodiment of the invention at least has the following beneficial effects: the invention provides a processing method, a device, a medium and electronic equipment for HTTP/HTTPS request information, which can continuously enrich the preset extended function of a network access proxy server by configuring the preset function through a packet compiled by a Web programming language with a preset format running at a server so as to meet different requirements of different users; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows a flow diagram of a method of processing HTTP/HTTPS request information according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a device for processing HTTP/HTTPS request information according to an embodiment of the present invention;
fig. 3 shows a schematic diagram of an electronic device connection structure according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present invention, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and similarly the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
As shown in fig. 1, according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a method for processing HTTP/HTTPs request information, including:
s102: setting a first attribute of a network access proxy server for processing HTTP/HTTPS request information; the first attribute is used for setting a preset processing mode of the network access proxy server for processing the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request, so that the network access proxy server is controlled to process the corresponding HTTP/HTTPS request information in the preset processing mode.
Http (hypertext Transfer protocol), hypertext Transfer protocol, is a rule that must be followed to browse web pages, online videos, listen to online music, and the like. It is under such rules that the browser (web client) can send a web document request to the web server, which then sends the requested document back to the browser. The interaction of requests and responses between the browser and the server must be in accordance with prescribed formats and rules that constitute the hypertext transfer protocol.
There is an 80 port in the computer system that is specifically open for HTTP, a protocol for the world wide web to transfer information. Each web site has a server process that listens to TCP at port 80. once it is found that the browser sends a connection establishment request to it, and subsequently establishes a TCP connection, the browser sends a request to the web server to browse a web page, and the server then returns the requested page as a response. Finally, the TCP connection is released.
It should be noted that the HTTP protocol is stateless, that is, when the same client accesses a page on the same server for the second time, the response of the server is the same as that of the first access. However, in practice, some web sites still want to be able to identify the user. For example, after a user adds a product to a shopping cart on a shopping website, the server needs to remember the identity of the user so that all the products can be checked out together when the user wishes to continue browsing and purchasing other products.
Cookies in HTTP provide this functionality.
Cookies work by: when a User (User) accesses a web site using cookies, the web site generates a unique identification code for the User and uses the unique identification code as an index to generate an item in a back-end database of the server. The header line of the Set-cookie is then added to the HTTP response message to the User. Here, the "header field name" is "Set-cookie", and the following "value" is the "identification code" assigned to the user.
When the User receives this response, his browser adds a line to the particular Cookie file it manages, including the server's hostname and the identification code given after the Set-Cookie. When the User continues to browse the website, the browser will take the identification code of the website from the Cookie file and put the identification code into the Cookie header line of the HTTP request message when sending an HTTP request message. Therefore, the website can track the activity of the User on the website, and the purchased goods can be paid together.
In this step, if the type information of the HTTP/HTTPs request indicates that the type of the current request is an unencrypted HTTP request, setting a preset processing mode in which the network access proxy server processes unencrypted HTTP request information as a first preset processing mode;
if the type information of the HTTP/HTTPS request shows that the type of the current request is an encrypted HTTPS request, setting a preset processing mode of the network access proxy server for processing the encrypted HTTPS request information as a second preset processing mode; therefore, processing can be performed in a corresponding preset processing mode according to different HTTP/HTTPS request types, and processing efficiency is improved.
In this step, the proxy server is accessed through the network, so that all network access requests are completed through the proxy server, thereby realizing the interception and analysis of the network packets.
S104: and acquiring second attribute information of the network access proxy server, wherein the second attribute is used for realizing the preset extended function of the network access proxy server.
In this step, by setting the second attribute, different preset extension functions can be given to the network access proxy server. Compared with the limited expandable function in the prior art, the processing method provided by the disclosure provides richer preset expandable functions, can meet the requirements of different users, and improves the user experience.
S106: the configuration of the preset function is carried out through a packet written by a Web programming language with a preset format running at a server, and the network access proxy server is controlled to monitor the request event of any HTTP/HTTPS request and/or the response event aiming at any HTTP/HTTPS request in an event monitoring mode.
In a specific example, for the aspect of extensibility, a packet written by node. js is used, so that the configuration is simple, all requests and responses are monitored in an event monitoring mode, the extension function can be freely used by a developer, and even a completely new tool is developed. It should be noted that node. js is a platform established based on Chrome JavaScript runtime, and is used to conveniently establish a network application with a fast response speed and easy expansion. Js uses an event-driven, non-blocking I/O model to be lightweight and efficient, and is suitable for running data-intensive real-time applications on distributed devices.
Js uses a Module to divide different functions to simplify the development of applications. Modules are somewhat like class libraries in the C + + language. The class library of each node comprises various functions, for example, the http module comprises a plurality of functions related to the http function, so that a developer can easily compare http, tcp/udp and the like for operation, and can easily create servers of http and tcp/udp.
It is very convenient to use the modules in the program, and only the following are needed:
here, an http class library is introduced and references to the http class library are deposited in the http variable. Js will search for the application if there is a directory for node _ modules and for the http module in this directory. Js can find the directory if the directory cannot be found, the directory can be found in a global module cache, and a user can specify the position of the module through a relative or absolute path.
Optionally, the method further includes:
acquiring type information of an HTTP/HTTPS request;
setting a preset processing mode for processing HTTP/HTTPS request information by the network access proxy server according to the type information of the HTTP/HTTPS request so as to control the network access proxy server to process corresponding HTTP/HTTPS request information in the preset processing mode;
the preset processing mode comprises a first preset processing mode and a second preset processing mode, and the first preset processing mode corresponds to the current HTTP request with the type of the request being non-encrypted; the second preset processing mode corresponds to the HTTPS request of which the type of the current request is encrypted.
Optionally, the controlling the network access proxy server to process the corresponding HTTP/HTTPs request information in a preset processing manner includes:
if the type of the current request is an unencrypted HTTP request, controlling a network access proxy server to process unencrypted HTTP request information in a first preset processing mode; and
the network access proxy server processing the non-encrypted HTTP request information in a first preset processing mode comprises the following steps:
the network access proxy server acquires corresponding request data information, analyzes the request data information and obtains associated data associated with the non-encrypted HTTP request;
storing request data information and associated data, and triggering a corresponding request event;
wherein the associated data comprises at least: time-consuming data for each stage, transmission information for each stage.
The above lists only some associated data, and the associated data has other contents, which are not described in detail herein.
Optionally, controlling the network access proxy server to process the corresponding HTTP/HTTPs request information in a preset processing manner further includes:
if the type of the current request is an encrypted HTTPS request, controlling the network access proxy server to process encrypted HTTPS request information in a second preset processing mode; and
the processing of the encrypted HTTPS request information by the network access proxy server in a second preset processing mode comprises the following steps:
any HTTPS request sends a connection request to the HTTP proxy server, wherein the connection request is an unencrypted request of HTTP;
the HTTP server monitors the connection request, introduces the connection request into the HTTPS server, issues a certificate through a built-in root certificate, and returns the certificate to the client side provided with the root certificate so as to control the network access proxy server to decrypt encrypted HTTPS request information, wherein the root certificate is used for issuing certificate decryption information;
capturing any HTTPS request, sending any HTTPS request to a request address, and obtaining corresponding return information;
collecting and storing corresponding return information; triggering a corresponding response event.
Optionally, the method further includes:
acquiring a first preset rule matched with a uniform resource locator of a current HTTP/HTTPS request, and modifying the uniform resource locator according to the first preset rule to obtain a modified address; in this way, a request address mapping function is provided, a request URL (Uniform Resource Locator) is captured and then matched with a first preset rule, and after matching, the address is modified through the first preset rule, so that a controllable request is realized.
The uniform resource locator is also called a web page address, and is an address of a standard resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it. The start of a uniform resource locator generally marks the network protocol used by a computer network.
Optionally, the method further includes:
acquiring a second preset rule for prohibiting the request from being sent;
if the format of the current HTTP/HTTPS request accords with a second preset rule for prohibiting the request from being sent, prohibiting the current HTTP/HTTPS request from being sent; thus, by configuring to disallow certain requests that meet the rules, these requests will not be issued when the rules are matched.
Optionally, the method further includes:
setting a visual interface, and viewing HTTP/HTTPS request information through the visual interface.
In an actual application scene, for a visual interface, a desktop-side App based on an Electron is developed, important information is listed, and a convenient debugging interface is provided.
In this step, the important information is: the type information of the current HTTP/HTTPs request, the preset processing mode information corresponding to the current HTTP/HTTPs request, and the like may also have other important information in addition to the above listed important information, and are not described in detail herein.
The Electron may let the user call rich native APIs (application program interfaces) using pure JavaScript to create the desktop application. Electron is a variant of io. js that focuses on desktop applications rather than web servers.
Electron, which uses a web page as its GUI (Graphical User Interface), can be viewed as: a reduced version of the chrome browser, controlled by JavaScript.
Graphical user interface GUI refers to a computer-operated user interface that is displayed graphically. A graphical user interface is a form of interface display for a person to communicate with a computer and allows a user to manipulate on-screen icons or menu options using an input device such as a mouse to select commands, call files, launch programs, or perform other routine tasks. Graphical user interfaces have many advantages over character interfaces that enter text or character commands through a keyboard to accomplish routine tasks. The graphical user interface, where the user sees and operates graphical objects, is composed of windows, pull-down menus, dialog boxes and their corresponding control mechanisms, all standardized in various new applications, i.e. the same operations are always done in the same way.
Optionally, the method further includes:
the HTTP proxy of the equipment to be debugged is configured to a preset IP (Internet Protocol) address and a preset port address under the same local area network.
The IP address is a 32-bit address assigned to each host connected to the internet, and is a digital label assigned to an IP device used by a user to access the internet. Optionally, the method further includes:
when the processing of the HTTP/HTTPS request information is started, two local servers are set, wherein each local server comprises a first local server and a second local server, the first local server is used for monitoring an HTTP request and monitoring a connection request before the HTTPS request, and the second local server is used for processing the HTTPS request.
Optionally, the processing, by the second server, the HTTPS request includes:
if the second server receives the request, triggering a request event, wherein the request event carries corresponding request information;
and if the second server responds to the request, triggering a response event, wherein the response event carries corresponding response information.
The invention provides a processing method, a device, a medium and electronic equipment of HTTP/HTTPS request information, which can continuously enrich the preset extended function of a network access proxy server by configuring the preset function through a packet compiled by a Web programming language with a preset format running at a server so as to meet different requirements of different users; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.
Example 2
As shown in fig. 2, according to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides an apparatus for processing HTTP/HTTPs request information, where the first attribute setting unit 202, the obtaining unit 204, the configuring unit 206, the monitoring unit 208, and the like are specifically as follows:
a first attribute setting unit 202 configured to set a first attribute of the network access proxy server that handles HTTP/HTTPs request information; the first attribute is used for setting a preset processing mode of the network access proxy server for processing the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request, so that the network access proxy server is controlled to process the corresponding HTTP/HTTPS request information in the preset processing mode;
an obtaining unit 204, configured to obtain second attribute information of the network access proxy server, where the second attribute is used to implement a preset extension function of the network access proxy server;
a configuration unit 206, configured to configure a preset function through a packet written in a Web programming language of a preset format running at a server;
a monitoring unit 208, configured to control the network access proxy server to process a request event for monitoring any HTTP/HTTPs request in an event monitoring manner and/or a response event for any HTTP/HTTPs request.
Optionally, the apparatus further comprises:
the obtaining unit 204 is further configured to:
acquiring type information of an HTTP/HTTPS request;
a processing manner setting unit (not shown in fig. 2) configured to set a preset processing manner in which the network access proxy server processes the HTTP/HTTPs request information according to the type information of the HTTP/HTTPs request acquired by the acquisition unit 204, so as to control the network access proxy server to process the corresponding HTTP/HTTPs request information in the preset processing manner;
the processing method comprises the steps that a preset processing mode set by a processing mode setting unit comprises a first preset processing mode and a second preset processing mode, wherein the first preset processing mode corresponds to the current request which is an unencrypted HTTP request in type; the second preset processing mode corresponds to the HTTPS request of which the type of the current request is encrypted.
Optionally, the apparatus further comprises:
and a control unit (not shown in fig. 2) for controlling the network access proxy server to process the corresponding HTTP/HTTPs request information in a preset processing manner.
Optionally, the control unit is specifically configured to:
if the type of the current request is an unencrypted HTTP request, controlling a network access proxy server to process unencrypted HTTP request information in a first preset processing mode; and
the control of the network access proxy server to process the non-encrypted HTTP request information in a first preset processing mode comprises the following steps:
the network access proxy server acquires corresponding request data information, analyzes the request data information and obtains associated data associated with the non-encrypted HTTP request;
storing request data information and associated data, and triggering a corresponding request event;
wherein the associated data comprises at least: time-consuming data for each stage, transmission information for each stage.
Optionally, the control unit is further specifically configured to:
if the type of the current request is an encrypted HTTPS request, controlling the network access proxy server to process encrypted HTTPS request information in a second preset processing mode; and
the step of controlling the network access proxy server to process the encrypted HTTPS request information in a second preset processing mode comprises the following steps:
any HTTPS request sends a connection request to the HTTP proxy server, wherein the connection request is an unencrypted request of HTTP;
the HTTP server monitors the connection request, introduces the connection request into the HTTPS server, issues a certificate through a built-in root certificate, and returns the certificate to the client side provided with the root certificate so as to control the network access proxy server to decrypt encrypted HTTPS request information, wherein the root certificate is used for issuing certificate decryption information;
capturing any HTTPS request, sending any HTTPS request to a request address, and obtaining corresponding return information;
collecting and storing corresponding return information; triggering a corresponding response event.
Optionally, the obtaining unit 204 is further configured to:
acquiring a first preset rule matched with a uniform resource locator of a current HTTP/HTTPS request;
the device further comprises:
a modifying unit (not shown in fig. 2) configured to modify the uniform resource locator according to the first preset rule acquired by the acquiring unit 204, so as to obtain a modified address.
Optionally, the obtaining unit 204 is further configured to:
acquiring a second preset rule for prohibiting the request from being sent;
the device further comprises:
a prohibiting unit (not shown in fig. 2) configured to prohibit sending of the current HTTP/HTTPs request if a format of the current HTTP/HTTPs request conforms to a second preset rule for prohibiting sending of the request acquired by the acquiring unit 204.
Optionally, the apparatus further comprises:
and an interface setting unit (not shown in fig. 2) for setting the visual interface and viewing the HTTP/HTTPs request information through the visual interface.
The invention provides a processing method, a device, a medium and electronic equipment of HTTP/HTTPS request information, which can continuously enrich the preset extended function of a network access proxy server by configuring the preset function through a packet compiled by a Web programming language with a preset format running at a server so as to meet different requirements of different users; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.
Example 3
As shown in fig. 3, this embodiment provides an electronic device, where the electronic device is used in a method for processing HTTP/HTTPs request information, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to: the configuration of the preset function is carried out through the package compiled by the Web programming language with the preset format running at the server, so that the preset extended function of the network access proxy server can be enriched continuously to meet different requirements of different users; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.
Example 4
The embodiment of the disclosure provides a non-volatile computer storage medium, where a computer-executable instruction is stored, and the computer-executable instruction can execute a processing method of HTTP/HTTPs request information in any method embodiment described above.
Example 5
Referring now to FIG. 3, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the configuration of the preset function is carried out through the package compiled by the Web programming language with the preset format running at the server, so that the preset extended function of the network access proxy server can be enriched continuously to meet different requirements of different users; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the configuration of the preset function is carried out through the package compiled by the Web programming language with the preset format running at the server, so that the preset extended function of the network access proxy server can be enriched continuously to meet different requirements of different users; and the configuration process of the preset function through the package written by the Web programming language with the preset format is automatically completed, so that the conventional excessively complicated function configuration process is simplified.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".

Claims (10)

1. A processing method of HTTP/HTTPS request information is characterized by comprising the following steps:
setting a first attribute of a network access proxy server for processing HTTP/HTTPS request information; the first attribute is used for setting a preset processing mode for the network access proxy server to process the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request, so that the network access proxy server is controlled to process the corresponding HTTP/HTTPS request information in the preset processing mode;
acquiring second attribute information of the network access proxy server, wherein the second attribute is used for realizing a preset extended function of the network access proxy server;
the configuration of the preset function is carried out through a packet written by a Web programming language with a preset format running at a server, and the network access proxy server is controlled to monitor the request event of any HTTP/HTTPS request and/or the response event aiming at any HTTP/HTTPS request in an event monitoring mode.
2. The method of claim 1, further comprising:
acquiring type information of an HTTP/HTTPS request;
setting a preset processing mode for the network access proxy server to process the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request so as to control the network access proxy server to process the corresponding HTTP/HTTPS request information in the preset processing mode;
the preset processing mode comprises a first preset processing mode and a second preset processing mode, and the first preset processing mode corresponds to the current request which is an unencrypted HTTP request in type; the second preset processing mode corresponds to the fact that the type of the current request is an encrypted HTTPS request.
3. The method according to claim 2, wherein controlling the net access proxy server to process the corresponding HTTP/HTTPs request message in the preset processing manner comprises:
if the type of the current request is an unencrypted HTTP request, controlling the network access proxy server to process unencrypted HTTP request information in the first preset processing mode; and
the controlling the network access proxy server to process the unencrypted HTTP request information in the first preset processing manner includes:
the network access proxy server acquires corresponding request data information, analyzes the request data information and obtains associated data associated with the non-encrypted HTTP request;
storing the request data information and the associated data, and triggering a corresponding request event;
wherein the associated data comprises at least: time-consuming data for each stage, transmission information for each stage.
4. The method of claim 2, wherein controlling the net access proxy server to process the corresponding HTTP/HTTPs request message in the preset processing manner further comprises:
if the type of the current request is an encrypted HTTPS request, controlling the network access proxy server to process encrypted HTTPS request information in the second preset processing mode; and
controlling the network access proxy server to process the encrypted HTTPS request information in the second preset processing manner includes:
any HTTPS request sends a connection request to an HTTP proxy server, wherein the connection request is an unencrypted request of HTTP;
the HTTP server monitors the connection request, guides the connection request into the HTTPS server, issues a certificate through a built-in root certificate, and returns the certificate to the client side provided with the root certificate so as to control the network access proxy server to decrypt encrypted HTTPS request information, wherein the root certificate is used for issuing certificate decryption information;
capturing any HTTPS request, sending any HTTPS request to a request address, and obtaining corresponding return information;
collecting and storing corresponding return information; triggering a corresponding response event.
5. The method of claim 1, further comprising:
acquiring a first preset rule matched with a uniform resource locator of a current HTTP/HTTPS request, and modifying the uniform resource locator according to the first preset rule to obtain a modified address.
6. The method of claim 1, further comprising:
acquiring a second preset rule for prohibiting the request from being sent;
and if the format of the current HTTP/HTTPS request accords with a second preset rule for prohibiting the request from being sent, prohibiting the current HTTP/HTTPS request from being sent.
7. The method of claim 1, further comprising:
setting a visual interface, and viewing the HTTP/HTTPS request information through the visual interface.
8. An apparatus for processing HTTP/HTTPs request information, comprising:
a first attribute setting unit for setting a first attribute of a network access proxy server for processing HTTP/HTTPS request information; the first attribute is used for setting a preset processing mode for the network access proxy server to process the HTTP/HTTPS request information according to the type information of the HTTP/HTTPS request, so that the network access proxy server is controlled to process the corresponding HTTP/HTTPS request information in the preset processing mode;
the acquisition unit is used for acquiring second attribute information of the network access proxy server, and the second attribute is used for realizing a preset extended function of the network access proxy server;
the configuration unit is used for configuring the preset function through a package written by a Web programming language in a preset format running at the server;
and the monitoring unit is used for controlling the network access proxy server to monitor a request event of any HTTP/HTTPS request and/or a response event aiming at any HTTP/HTTPS request in an event monitoring mode.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 7.
CN201910666272.8A 2019-07-23 2019-07-23 HTTP request information processing method, device, medium and equipment Active CN110493318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910666272.8A CN110493318B (en) 2019-07-23 2019-07-23 HTTP request information processing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910666272.8A CN110493318B (en) 2019-07-23 2019-07-23 HTTP request information processing method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN110493318A CN110493318A (en) 2019-11-22
CN110493318B true CN110493318B (en) 2022-03-15

Family

ID=68547951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910666272.8A Active CN110493318B (en) 2019-07-23 2019-07-23 HTTP request information processing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN110493318B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147329A (en) * 2019-12-27 2020-05-12 广东睿江云计算股份有限公司 Method and system for testing mobile item by front-end real machine
CN112039749B (en) * 2020-08-31 2022-03-15 广州鲁邦通物联网科技股份有限公司 Node js-based Internet of things equipment management method, system and storage medium
CN112241371A (en) * 2020-10-21 2021-01-19 四川长虹电器股份有限公司 Method for improving testing efficiency of Web application interface
CN115065723B (en) * 2022-08-17 2022-11-04 中航信移动科技有限公司 Data processing system for network disaster tolerance

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868738A (en) * 2012-08-30 2013-01-09 福建富士通信息软件有限公司 Hyper text transfer protocol (HTTP)/hypertext transfer protocol secure (HTTPS) behavior management and control auditing method based on Web proxy
CN103503419A (en) * 2011-03-11 2014-01-08 高通股份有限公司 System and method using a web proxy-server to access a device having an assigned network address
CN103973682A (en) * 2014-04-30 2014-08-06 北京奇虎科技有限公司 Method and device for having access to webpage
CN104580192A (en) * 2014-12-31 2015-04-29 网宿科技股份有限公司 Processing method and device for network access requests of application program
CN106161617A (en) * 2016-07-04 2016-11-23 微梦创科网络科技(中国)有限公司 Reverse proxy method based on NODEJS, Reverse Proxy and system
CN107483609A (en) * 2017-08-31 2017-12-15 深圳市迅雷网文化有限公司 A kind of Network Access Method, relevant device and system
CN109194749A (en) * 2018-09-11 2019-01-11 福建天泉教育科技有限公司 Monitor method, the storage medium of network request
CN109218368A (en) * 2017-07-05 2019-01-15 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable medium of Http reverse proxy

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587499B1 (en) * 2000-09-14 2009-09-08 Joshua Haghpassand Web-based security and filtering system with proxy chaining
KR20140052703A (en) * 2012-10-25 2014-05-07 삼성전자주식회사 Method and apparatus for accelerating web service using a proxy server

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103503419A (en) * 2011-03-11 2014-01-08 高通股份有限公司 System and method using a web proxy-server to access a device having an assigned network address
CN102868738A (en) * 2012-08-30 2013-01-09 福建富士通信息软件有限公司 Hyper text transfer protocol (HTTP)/hypertext transfer protocol secure (HTTPS) behavior management and control auditing method based on Web proxy
CN103973682A (en) * 2014-04-30 2014-08-06 北京奇虎科技有限公司 Method and device for having access to webpage
CN104580192A (en) * 2014-12-31 2015-04-29 网宿科技股份有限公司 Processing method and device for network access requests of application program
CN106161617A (en) * 2016-07-04 2016-11-23 微梦创科网络科技(中国)有限公司 Reverse proxy method based on NODEJS, Reverse Proxy and system
CN109218368A (en) * 2017-07-05 2019-01-15 北京京东尚科信息技术有限公司 Realize method, apparatus, electronic equipment and the readable medium of Http reverse proxy
CN107483609A (en) * 2017-08-31 2017-12-15 深圳市迅雷网文化有限公司 A kind of Network Access Method, relevant device and system
CN109194749A (en) * 2018-09-11 2019-01-11 福建天泉教育科技有限公司 Monitor method, the storage medium of network request

Also Published As

Publication number Publication date
CN110493318A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN110493318B (en) HTTP request information processing method, device, medium and equipment
CN110046021B (en) Page display method, device, system, equipment and storage medium
US20170180909A1 (en) Cloud-Based Custom Metric/Timer Definitions and Real-Time Analytics of Mobile Applications
US10146560B2 (en) Method and apparatus for automatic processing of service requests on an electronic device
CN110489101A (en) Interface analogy method, system, medium and electronic equipment
US9524089B1 (en) Common web component
CN109684571B (en) A data collection method and device, and storage medium
US20220375460A1 (en) Method and apparatus for generating interaction record, and device and medium
CN110716853A (en) A test script recording method, application program testing method and related device
CN109492210A (en) A kind of online document content displaying method, device, storage medium and electronic equipment
US10372512B2 (en) Method and apparatus for automatic processing of service requests on an electronic device
US20150120729A1 (en) Web-based representational state transfer api server
WO2020143557A1 (en) Method and device for displaying information
CN110765334A (en) Data capture method, system, medium and electronic device
WO2020199749A1 (en) Feedback-based information pushing method and apparatus, and electronic device
CN111930709A (en) Data storage method and device, electronic equipment and computer readable medium
CN111800451B (en) Assisted service provision
TWI677223B (en) Page display method and device
US10997357B2 (en) User interface navigation management
CN110673886B (en) Method and device for generating thermodynamic diagrams
CN111222067B (en) Information generation method and device
CN109582580A (en) For debugging system, the method and apparatus of the page
CN113094236A (en) System data acquisition method and device, computer equipment and storage medium
CN104363267B (en) A kind of load of data, display methods and device
CN111767447A (en) Method and apparatus for determining user traffic path

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

CP01 Change in the name or title of a patent holder
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载