CN108063714B - Network request processing method and device - Google Patents

Network request processing method and device Download PDF

Info

Publication number
CN108063714B
CN108063714B CN201610987509.9A CN201610987509A CN108063714B CN 108063714 B CN108063714 B CN 108063714B CN 201610987509 A CN201610987509 A CN 201610987509A CN 108063714 B CN108063714 B CN 108063714B
Authority
CN
China
Prior art keywords
network request
network
server
proxy server
target
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
CN201610987509.9A
Other languages
Chinese (zh)
Other versions
CN108063714A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201610987509.9A priority Critical patent/CN108063714B/en
Publication of CN108063714A publication Critical patent/CN108063714A/en
Application granted granted Critical
Publication of CN108063714B publication Critical patent/CN108063714B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • 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

Abstract

The invention discloses a method and a device for processing a network request, relates to the technical field of Internet, and mainly aims to select an effective proxy server according to a target server accessed by the network request when VPN service is started so as to quickly respond to the network request. The main technical scheme of the invention is as follows: acquiring a network request of a terminal application in a virtual private network; analyzing the network request to obtain a target server accessed by the network request; judging whether a proxy server which successfully forwards a network request to the target server exists or not, wherein the proxy server is one of a plurality of virtual private network servers connected with the terminal; and if so, sending the network request to the proxy server so as to forward the network request to the target server through the proxy server. The invention is mainly used for selectively sending the network request under the condition of opening the VPN service.

Description

Network request processing method and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a network request.
Background
Virtual Private Network (VPN) refers to a technology for establishing a Private Network on a public Network. A VPN network may be understood as an enterprise-wide virtual line. It can be connected by a special encrypted communication protocol, and a private communication line is established between two or more intranets located at different places on the Internet. Generally, after a terminal in a VPN network starts a VPN service, network requests of all applications in the terminal are acquired by a virtual network card and sent to a VPN proxy server, and then the VPN proxy server forwards the network requests to a target server.
However, in the way that the VPN proxy server processes all network requests applied by the terminal, the terminal often sends all the acquired network requests to a specified VPN proxy server after opening the VPN service, and the VPN proxy server analyzes, forwards and receives a request result fed back by the target server. Because the data sent by the terminal only points to one single-function proxy server, the whole requirements of the user cannot be met. For example, when a user uses an android client, two proxy servers, namely a company proxy server and a foreign proxy server, need to be connected to meet different access requirements. In this case, it is difficult to implement using the conventional proxy technique.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for processing a network request, and mainly aims to select an effective proxy server according to a target server accessed by a network request when a VPN service is opened, so as to quickly respond to the network request.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in one aspect, the present invention provides a method for processing a network request, where the method includes:
acquiring a network request of a terminal application in a virtual private network;
analyzing the network request to obtain a target server accessed by the network request;
judging whether a proxy server which successfully forwards a network request to the target server exists or not, wherein the proxy server is one of a plurality of virtual private network servers connected with the terminal;
and if so, sending the network request to the proxy server so as to forward the network request to the target server through the proxy server.
Preferably, the determining whether there is a proxy server that successfully forwards the network request to the target server includes:
acquiring forwarding lists of a plurality of proxy servers connected with the terminal, wherein server information of network requests successfully forwarded by the proxy servers is recorded in the forwarding lists;
and judging whether the target servers are in the forwarding list one by one.
Preferably, when there is no proxy server that successfully forwards the network request to the target server, the method further comprises:
sending the network request to a target server;
if the network request is failed to be sent to the target server, the network request is sent to a plurality of proxy servers connected with the terminal one by one, and the proxy servers forward the network request;
if the proxy server is successfully forwarded, adding the target server which the network requests to access to a forwarding list of the proxy server;
and if the forwarding of the network request is not successful, prompting that the network request fails to be sent.
Preferably, after sending the network request to the proxy server, the method further includes:
and receiving feedback data of the network request sent by the proxy server.
Preferably, the acquiring the network request of the terminal application in the virtual private network includes:
acquiring a network request of a terminal application in a virtual private network by using a virtual network card in the terminal;
and extracting the network request acquired by the virtual network card.
Preferably, the analyzing the network request to obtain the target server accessed by the network request includes:
analyzing the network request to obtain a target address and a target port number;
and determining the target server according to the target address and the target port number.
In another aspect, the present invention further provides a device for processing a network request, where the device includes:
an obtaining unit, configured to obtain a network request of a terminal application in a virtual private network;
the analysis unit is used for analyzing the network request acquired by the acquisition unit to obtain a target server accessed by the network request;
a judging unit, configured to judge whether there is a proxy server that successfully forwards a network request to the target server obtained by the parsing unit, where the proxy server is one of multiple virtual private network servers connected to the terminal;
and the sending unit is used for sending the network request to the proxy server when the judging unit judges that the proxy server which successfully forwards the network request to the target server exists.
Preferably, the judging unit includes:
the acquisition module is used for acquiring a forwarding list of a plurality of proxy servers connected with the terminal, wherein the forwarding list records server information of network requests successfully forwarded by the proxy servers;
and the judging module is used for judging whether the target servers are in the forwarding list acquired by the acquiring module one by one.
Preferably, the apparatus further comprises:
the sending unit is further configured to send the network request to the target server when the judging unit judges that there is no proxy server that has successfully forwarded the network request to the target server;
the distribution unit is used for sending the network requests to a plurality of proxy servers connected with the terminal one by one when the sending unit fails to send the network requests to the target server, and forwarding the network requests by the proxy servers;
the adding unit is used for adding the target server information of the network request access to a forwarding list of the proxy server when the proxy server is successfully forwarded;
and the prompting unit is used for prompting that the network request fails to be sent when the proxy server fails to forward.
Preferably, the apparatus further comprises:
and the receiving unit is used for receiving the feedback data of the network request sent by the proxy server after the sending unit sends the network request to the proxy server.
Preferably, the acquiring unit includes:
the acquisition module is used for acquiring a network request of the terminal application in the virtual private network by using a virtual network card in the terminal;
and the extracting module is used for extracting the network request acquired by the acquiring module.
Preferably, the analysis unit includes:
the analysis module is used for analyzing the network request to obtain a target address and a target port number;
and the determining module is used for determining the target server according to the target address and the target port number obtained by the analyzing module.
According to the method and the device for processing the network request, provided by the invention, under the condition that the VPN service is started, the target server accessed by the network request is determined by locally acquiring and analyzing the network request applied by the terminal at the terminal, and then whether the network request needs to be forwarded by the proxy server or not is determined by judging whether the target server is accessed or not, so that the network request is directly sent to the target server or sent to one of a plurality of proxy servers for forwarding. Compared with the prior art that the network request can only be sent to a specified VPN proxy server, the method for intelligently selecting the VPN proxy server in the terminal realizes that the network request is analyzed locally at the terminal, and how to send the network request is selected according to the analysis result so as to obtain the fastest response.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for processing a network request according to an embodiment of the present invention;
fig. 2 is a flow chart of another method for processing a network request according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating a device for processing a network request according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating another apparatus for processing a network request according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
An embodiment of the present invention provides a method for processing a network request, and as shown in fig. 1, the method is applied to a terminal capable of using a VPN network service function to selectively send a network request of a terminal application, and the following specific steps are provided for the embodiment of the present invention:
101. and acquiring a network request of the terminal application in the VPN network.
At present, the technology of using the VPN service packet capturing is generally implemented by automatically intercepting network requests generated by all applications in a terminal after the terminal starts a VPN service, and sending the network requests to a specified VPN proxy server for processing. Specifically, a virtual network card is created in the terminal for communication connection between the terminal and the VPN proxy server, and the virtual network card acquires all network requests in the terminal.
In this step, the network request intercepted by the virtual network card is directly extracted under the condition that the VPN service is started by using the characteristics of all network requests that the virtual network card can obtain when the VPN service is started. These network requests include network requests of the terminal system itself and network requests of third party applications installed on the terminal.
102. And analyzing the acquired network request to obtain a target server accessed by the network request.
The operation of analyzing the network request applied by the terminal locally can be realized by extracting the network request in the virtual network card, and the analysis mode needs to perform corresponding analysis operation according to the specific mode and the frame of the network request, and the specific analysis mode is the same on the terminal side or the VPN proxy server side and is also the conventional operation which is very mature in the prior art, so that the detailed description is not repeated here. By analyzing the result obtained by the network request, the destination address and the destination port number in the network request can be obtained, and the destination address and the destination port number determine the destination server to be accessed by the network request, that is, the destination address and the destination port number point to the corresponding destination server. The target server to be accessed by the network request can be determined through the analysis operation of the network request in the local terminal.
103. And judging whether a proxy server which successfully forwards the network request to the target server exists.
In this step, it is mainly determined to which VPN proxy server to forward the network request when there are multiple VPN proxy servers, and the determination criterion is based on whether the VPN proxy server has successfully sent the network request to the target server.
In practical applications, it is necessary to determine whether a server has access to the information of the server that can be accessed or has been accessed at the terminal, and since the number of target servers is large, the manner in which the server information is maintained at the terminal is not practical, and for this reason, embodiments of the present invention employ determining to which servers all VPN proxies connected to the terminal are capable of forwarding network requests, and if the servers include the target server, determining that the network request needs to be forwarded by the VPN proxy, when the servers do not include the target server, it may be determined that none of the currently connected VPN proxy servers has sent the network request to the target server, that is, the VPN proxy server may not be able to successfully forward the network request.
104. The network request is sent to a VPN proxy server.
This step is a sending operation executed after it is determined in step 103 that there is a VPN proxy server that has successfully forwarded the network request to the target server. The VPN proxy server can send the network request and the result of the terminal analysis to the VPN proxy server, so that the VPN proxy server can directly forward the network request to the target server according to the analysis result.
In addition, when a network request is transmitted to a VPN proxy server, since there are a plurality of VPN proxy servers, it is necessary to determine a VPN proxy server capable of forwarding the network request, and then transmit the network request to the VPN proxy server to perform a forwarding operation.
It can be seen from the foregoing implementation manner that, in the method for processing a network request according to the embodiment of the present invention, when a VPN service is opened, a target server accessed by the network request is determined by locally obtaining and analyzing the network request applied by a terminal at the terminal, and then it is determined whether to forward the network request by a proxy server or not by determining whether to access the target server, so as to directly send the network request to the target server or send the network request to one of multiple proxy servers for forwarding. Compared with the prior art that the network request can only be sent to a specified VPN proxy server, the embodiment of the invention realizes that the network request is analyzed locally at the terminal, and how to send the network request is selected according to the analysis result so as to obtain the fastest response, in particular to the terminal connected with the requirements of a plurality of VPN proxy servers.
In order to describe the processing method of a network request provided by the present invention in more detail, especially how a terminal selects a transmission path of an application network request after the terminal acquires the network request after a VPN service is opened, as shown in fig. 2, the method includes the steps of:
201. and acquiring a network request of the terminal application in the VPN network.
And acquiring all network requests of the terminal by using the virtual network card established in the terminal. The main content of this step is the same as step 101 in the above embodiment, and reference may be made to the above step for details, which are not described herein again.
202. And analyzing the acquired network request to obtain a target server accessed by the network request.
In this step, the destination address and the destination port number in the network request are extracted from the analysis result to determine the destination server to be accessed. For example, the access address and the access port number of the target server are determined by parsing the message of the network request and extracting the content of the field recording the target address and the target port number in the message.
203. The method comprises the steps of obtaining forwarding lists of a plurality of VPN proxy servers connected with a terminal, and judging whether a target server accessed by a network request is in the forwarding lists one by one.
The forwarding list is a list in which server information that the VPN proxy server successfully forwards the network request is recorded, and the server information recorded in the list includes: the name or IP address of the server. Typically, each VPN proxy server stores a forwarding list for recording the target servers that the VPN proxy server can access. Meanwhile, the terminal can synchronize the forwarding list in the VPN proxy server to judge whether the network request needs to be forwarded by the VPN proxy server.
When the terminal is connected to multiple VPN proxy servers, the terminal will obtain the forwarding lists of all VPN proxy servers, and match the target servers obtained in step 202 with the servers stored in the forwarding lists one by one. If the matching is successful, the VPN proxy server corresponding to the forwarding list can forward the network request. If there are multiple VPN proxy servers capable of forwarding the network request, the terminal may further determine to which VPN proxy server the network request is to be sent by analyzing the current specific state of each VPN proxy server, for example, selecting the most suitable VPN proxy server according to the current load of the VPN proxy server or the data transmission rate of the link.
204. The network request is sent to a VPN proxy server.
When it is determined in step 203 that the network request can be forwarded by the VPN proxy server, the terminal transmits the network request to the determined VPN proxy server, and transmits the result of the analysis to the VPN proxy server.
Further, after it is determined that the VPN proxy server forwards the network request, the terminal will also obtain feedback data of the target server responding to the network request from the VPN proxy server, that is, the feedback data is also forwarded to the terminal by the target server through the VPN proxy server.
205. The network request is sent to the target server.
When it is determined in step 203 that there is no proxy server that has successfully forwarded the network request to the target server, the terminal directly sends the network request to the target server, and at this time, two results may occur:
one is that the transmission is successful, that is, the target server responds to the network request, and at this time, the terminal directly obtains the response data fed back by the target server.
The other is a transmission failure, that is, the target server does not respond to the network request, which indicates that the terminal cannot directly access the target server, at this time, the terminal may directly prompt the network request to fail to transmit, or further attempt to forward the network request using the VPN proxy server to access the target server, and in the case of multiple VPN proxy servers, the terminal will transmit the network requests one by one according to preset rules until the network request gets the response of the target server. The preset rule is a sorting rule set according to factors such as the current load of the VPN proxy server or the data transmission rate of a link, and the preset rule is used for sorting the VPN proxy servers so as to send the network requests in sequence.
When a proxy server which successfully forwards the network request exists in the VPN proxy server connected with the terminal, the terminal receives response data fed back by a target server through the VPN proxy server, meanwhile, relevant information of the target server is added into a forwarding list of the VPN proxy server, and correspondingly, a VPN proxy server end also updates a local forwarding list.
When all VPN proxy servers connected with the terminal fail to forward, the terminal prompts the network request to fail to send so as to inform a user using the terminal that the network request without response exists.
Further, as an implementation of the foregoing method, an embodiment of the present invention provides a device for processing a network request, where the embodiment of the device corresponds to the foregoing method embodiment, and for convenience of reading, details in the foregoing method embodiment are not described in detail again in this device embodiment, but it should be clear that the device in this embodiment can correspondingly implement all the contents in the foregoing method embodiment. The apparatus is used in a terminal capable of using a VPN network service function, performs network request analysis, and selects a path for sending a network request according to a specific analysis result, and specifically, as shown in fig. 3, the apparatus includes:
an obtaining unit 31, configured to obtain a network request of a terminal application in a virtual private network;
an analyzing unit 32, configured to analyze the network request acquired by the acquiring unit 31, so as to obtain a target server accessed by the network request;
a determining unit 33, configured to determine whether there is a proxy server that successfully forwards a network request to the target server obtained by the analyzing unit 32, where the proxy server is one of multiple virtual private network servers connected to the terminal;
a sending unit 34, configured to send the network request to the proxy server when the determining unit 33 determines that there is a proxy server that has successfully forwarded the network request to the target server.
Further, as shown in fig. 4, the judging unit 33 includes:
an obtaining module 331, configured to obtain a forwarding list of multiple proxy servers connected to a terminal, where server information that a proxy server successfully forwards a network request is recorded in the forwarding list;
a determining module 332, configured to determine whether the target server is in the forwarding list acquired by the acquiring module 331 one by one.
Further, as shown in fig. 4, the apparatus further includes:
the sending unit 34 is further configured to send the network request to the target server when the determining unit 33 determines that there is no proxy server that has successfully forwarded the network request to the target server;
a distributing unit 35, configured to, when the sending unit 34 fails to send the network request to a target server, send the network request to a plurality of proxy servers connected to a terminal one by one, and forward the network request by the proxy servers;
an adding unit 36, configured to add, when the proxy server succeeds in forwarding, the target server information that the network requests to access to the forwarding list of the proxy server;
and a prompting unit 37, configured to prompt that the network request fails to be sent when no proxy server succeeds in forwarding.
Further, as shown in fig. 4, the apparatus further includes:
a receiving unit 38, configured to receive feedback data of the network request sent by the proxy server after the sending unit 34 sends the network request to the proxy server.
Further, as shown in fig. 4, the acquiring unit 31 includes:
a first obtaining module 311, configured to obtain a network request of a terminal application in a VPN network by using a virtual network card in the terminal;
an extracting module 312, configured to extract the network request acquired by the first acquiring module 311.
Further, as shown in fig. 4, the parsing unit 32 includes:
an analyzing module 321, configured to analyze the network request to obtain a target address and a target port number;
a determining module 322, configured to determine the destination server according to the destination address and the destination port number obtained by the analyzing module 321.
In summary, the method and apparatus for processing a network request according to the embodiments of the present invention determine, when a VPN service is turned on, a target server accessed by the network request by locally obtaining and analyzing the network request applied by the terminal at the terminal, and determine whether to forward the network request to the target server by a proxy server or not by determining whether to forward the network request to the target server or to one of a plurality of proxy servers. Compared with the prior art that the network request can only be sent to a specified VPN proxy server, the embodiment of the invention realizes that the network request is analyzed locally at the terminal, and how to send the network request is selected according to the analysis result so as to obtain the fastest response, in particular to the terminal connected with the requirements of a plurality of VPN proxy servers.
The processing device of the network request comprises a processor and a memory, wherein the acquisition unit, the analysis unit, the judgment unit, the sending unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and effective proxy servers are selected according to target servers accessed by the network requests when the VPN service is started by adjusting kernel parameters so as to quickly respond to the network requests.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The present application further provides a computer program product adapted to perform program code for initializing the following method steps when executed on a data processing device: acquiring a network request of a terminal application in a virtual private network; analyzing the network request to obtain a target server accessed by the network request; judging whether a proxy server which successfully forwards a network request to the target server exists or not, wherein the proxy server is one of a plurality of virtual private network servers connected with the terminal; and if so, sending the network request to the proxy server so as to forward the network request to the target server through the proxy server.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, 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 process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for processing a network request, the method comprising:
acquiring a network request of a terminal application in a virtual private network;
analyzing the network request to obtain a target server accessed by the network request;
judging whether a proxy server which successfully forwards a network request to the target server exists or not, wherein the proxy server is one of a plurality of virtual private network servers connected with the terminal;
if the network request exists, the network request is sent to the proxy server, so that the network request is forwarded to the target server through the proxy server;
the judging whether the proxy server which successfully forwards the network request to the target server exists comprises the following steps:
acquiring forwarding lists of a plurality of proxy servers connected with the terminal, wherein server information of network requests successfully forwarded by the proxy servers is recorded in the forwarding lists;
and judging whether the target servers are in the forwarding list one by one.
2. The method of claim 1, wherein when there is no proxy server that successfully forwards the network request to the target server, the method further comprises:
sending the network request to a target server;
if the network request is failed to be sent to the target server, the network request is sent to a plurality of proxy servers connected with the terminal one by one, and the proxy servers forward the network request;
if the proxy server is successfully forwarded, adding the target server which the network requests to access to a forwarding list of the proxy server;
and if the forwarding of the network request is not successful, prompting that the network request fails to be sent.
3. The method of claim 1, wherein after sending the network request to the proxy server, the method further comprises:
and receiving feedback data of the network request sent by the proxy server.
4. The method of claim 1, wherein obtaining the network request of the terminal application in the virtual private network comprises:
acquiring a network request of a terminal application in a virtual private network by using a virtual network card in the terminal;
and extracting the network request acquired by the virtual network card.
5. The method according to any one of claims 1-4, wherein the parsing the network request to obtain a target server accessed by the network request comprises:
analyzing the network request to obtain a target address and a target port number;
and determining the target server according to the target address and the target port number.
6. An apparatus for processing network requests, the apparatus comprising:
an obtaining unit, configured to obtain a network request of a terminal application in a virtual private network;
the analysis unit is used for analyzing the network request acquired by the acquisition unit to obtain a target server accessed by the network request;
a judging unit, configured to judge whether there is a proxy server that successfully forwards a network request to the target server obtained by the parsing unit, where the proxy server is one of multiple virtual private network servers connected to the terminal;
a sending unit, configured to send the network request to the proxy server when the determining unit determines that there is a proxy server that has successfully forwarded the network request to the target server;
the judging unit includes:
the acquisition module is used for acquiring a forwarding list of a plurality of proxy servers connected with the terminal, wherein the forwarding list records server information of network requests successfully forwarded by the proxy servers;
and the judging module is used for judging whether the target servers are in the forwarding list acquired by the acquiring module one by one.
7. The apparatus of claim 6, further comprising:
the sending unit is further configured to send the network request to the target server when the judging unit judges that there is no proxy server that has successfully forwarded the network request to the target server;
the distribution unit is used for sending the network requests to a plurality of proxy servers connected with the terminal one by one when the sending unit fails to send the network requests to the target server, and forwarding the network requests by the proxy servers;
the adding unit is used for adding the target server information of the network request access to a forwarding list of the proxy server when the proxy server is successfully forwarded;
and the prompting unit is used for prompting that the network request fails to be sent when the proxy server fails to forward.
8. The apparatus of claim 6, further comprising:
and the receiving unit is used for receiving the feedback data of the network request sent by the proxy server after the sending unit sends the network request to the proxy server.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the network request processing method of any one of claims 1 to 5.
10. A processor, configured to execute a program, wherein the program executes the method for processing the network request according to any one of claims 1 to 5.
CN201610987509.9A 2016-11-09 2016-11-09 Network request processing method and device Active CN108063714B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610987509.9A CN108063714B (en) 2016-11-09 2016-11-09 Network request processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610987509.9A CN108063714B (en) 2016-11-09 2016-11-09 Network request processing method and device

Publications (2)

Publication Number Publication Date
CN108063714A CN108063714A (en) 2018-05-22
CN108063714B true CN108063714B (en) 2021-02-12

Family

ID=62136612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610987509.9A Active CN108063714B (en) 2016-11-09 2016-11-09 Network request processing method and device

Country Status (1)

Country Link
CN (1) CN108063714B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111224832B (en) * 2018-11-26 2023-06-16 阿里巴巴集团控股有限公司 Method, control equipment, proxy server and system for capturing network data
CN111355693B (en) * 2018-12-24 2023-10-31 北京奇虎科技有限公司 Proxy service realization method, device, electronic equipment and storage medium
CN109995867A (en) * 2019-04-04 2019-07-09 深圳市喏喏网络科技有限公司 One-stop insurance service system, implementation method and computer readable storage medium
CN110177128B (en) * 2019-04-15 2022-02-01 达闼机器人有限公司 Data transmission system and method for establishing VPN connection, terminal and VPN proxy thereof
CN110489346B (en) * 2019-08-15 2023-06-06 深圳乐信软件技术有限公司 Application testing method and device of IOS (input/output) system, server and storage medium
CN111245914B (en) * 2020-01-06 2022-07-22 北京小米松果电子有限公司 Analog communication method and device of terminal equipment and storage medium
CN113347222B (en) * 2020-03-03 2022-08-05 北京搜狗科技发展有限公司 Data processing method and device and electronic equipment
CN111405039A (en) * 2020-03-16 2020-07-10 深圳市网心科技有限公司 Data transparent transmission method, device and system, client and server
CN113315687B (en) * 2021-05-25 2023-09-08 Oppo广东移动通信有限公司 Proxy network management method, device, storage medium and terminal
CN114979099B (en) * 2022-04-14 2024-02-23 天津车之家软件有限公司 Target service access method, module and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244615A (en) * 2011-08-15 2011-11-16 福建星网锐捷网络有限公司 Forwarding entry sending method, device and system as well as autonomous system border router
CN102546594A (en) * 2011-12-07 2012-07-04 北京星网锐捷网络技术有限公司 Network resource access control method, device and related equipment
CN102624920A (en) * 2012-03-31 2012-08-01 奇智软件(北京)有限公司 Method and device for performing access through proxy server
CN103840994A (en) * 2012-11-23 2014-06-04 华耀(中国)科技有限公司 System and method for user side to access intranet through VPN
CN104202307A (en) * 2014-08-15 2014-12-10 小米科技有限责任公司 Data forwarding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244615A (en) * 2011-08-15 2011-11-16 福建星网锐捷网络有限公司 Forwarding entry sending method, device and system as well as autonomous system border router
CN102546594A (en) * 2011-12-07 2012-07-04 北京星网锐捷网络技术有限公司 Network resource access control method, device and related equipment
CN102624920A (en) * 2012-03-31 2012-08-01 奇智软件(北京)有限公司 Method and device for performing access through proxy server
CN103840994A (en) * 2012-11-23 2014-06-04 华耀(中国)科技有限公司 System and method for user side to access intranet through VPN
CN104202307A (en) * 2014-08-15 2014-12-10 小米科技有限责任公司 Data forwarding method and device

Also Published As

Publication number Publication date
CN108063714A (en) 2018-05-22

Similar Documents

Publication Publication Date Title
CN108063714B (en) Network request processing method and device
CN110300050B (en) Message pushing method and device, computer equipment and storage medium
US20210036907A1 (en) Methods and apparatuses for pushing a message
US9781161B2 (en) Network devices using TLS tickets for session persistence
CN108063712B (en) Method and device for sending network request
CN112751897B (en) Load balancing method, device, medium and equipment
CN111970315A (en) Method, device and system for pushing message
CN110535976B (en) Session maintaining method and device
US11163499B2 (en) Method, apparatus and system for controlling mounting of file system
CN111277481B (en) Method, device, equipment and storage medium for establishing VPN tunnel
CN107979627B (en) Network request processing method and device
CN107979539A (en) Message processing method and device
CN106899564A (en) A kind of login method and device
CN113315848A (en) Access control method, device and equipment
CN114465867A (en) Server maintenance method and device, storage medium and processor
CN112825524B (en) Method, device and system for determining network service node
US20230254146A1 (en) Cybersecurity guard for core network elements
CN108696509B (en) Access processing method and device for terminal
CN104270431B (en) A kind of method and device of con current control
CN116126462A (en) Method and device for service deployment in virtual scene and cloud server
CN115277816A (en) Service adaptation method, device, system and computer readable medium
CN108063713B (en) Network request processing method and device
CN107979517B (en) Network request processing method and device
CN108768987B (en) Data interaction method, device and system
CN113778709A (en) Interface calling method, device, server and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant