CN110838967B - Virtual private network connection method, server, client and storage medium - Google Patents

Virtual private network connection method, server, client and storage medium Download PDF

Info

Publication number
CN110838967B
CN110838967B CN201911158060.5A CN201911158060A CN110838967B CN 110838967 B CN110838967 B CN 110838967B CN 201911158060 A CN201911158060 A CN 201911158060A CN 110838967 B CN110838967 B CN 110838967B
Authority
CN
China
Prior art keywords
vpn
server
available
client
service end
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
CN201911158060.5A
Other languages
Chinese (zh)
Other versions
CN110838967A (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.)
Cloudminds Shanghai Robotics Co Ltd
Original Assignee
Cloudminds Robotics 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 Cloudminds Robotics Co Ltd filed Critical Cloudminds Robotics Co Ltd
Priority to CN201911158060.5A priority Critical patent/CN110838967B/en
Publication of CN110838967A publication Critical patent/CN110838967A/en
Application granted granted Critical
Publication of CN110838967B publication Critical patent/CN110838967B/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]

Abstract

The embodiment of the invention relates to the field of digital information transmission, and discloses a virtual private network connection method, a server, a client and a storage medium. The connection method of the virtual private network is applied to a registration server, receives a connection request sent by a Virtual Private Network (VPN) client, and the connection request is used for requesting to connect a VPN server; returning the connection information of the available VPN service end and a network quality detection strategy to the VPN client, wherein the network quality detection strategy is a strategy for detecting the network quality of the available VPN service end; and the VPN client selects a VPN server to be connected for connection according to the network quality detection strategy. The embodiment is convenient for increasing the number of the VPN service ends, increasing the success rate of accessing the VPN service ends and improving the network quality of connecting the VPN service ends.

Description

Virtual private network connection method, server, client and storage medium
Technical Field
The embodiment of the invention relates to the field of digital information transmission, in particular to a virtual private network connection method, a server, a client and a storage medium.
Background
A Virtual Private Network (VPN) is a tunnel that provides secure data transfer between enterprises or between individuals and companies. The OpenVPN software is widely used in network application, not only can realize safe point-to-point communication, but also can realize point-to-many distributed service. In the existing OpenVPN using process, a plurality of OpenVPN servers are configured in an OpenVPN client configuration file to improve the availability of network services. The following describes the process of connecting an OpenVPN server by an OpenVPN: if a plurality of OpenVPN servers are configured in the OpenVPN client configuration file, VPN client software tries to connect the OpenVPN servers according to the sequence of the OpenVPN servers in the configuration file, when the first OpenVPN server is connected for a plurality of times and unsuccessfully, the second OpenVPN server is connected, if the connection is successful, the client side and the VPN server start to communicate, and if the connection is unsuccessful, the next OpenVPN server continues to be connected until the client side accesses the VPNserver.
The inventors found that at least the following problems exist in the related art: when the IP information of the VPN server is changed, the configuration file of the VPN client needs to be changed, or the domain name resolution of the VPN server needs to be changed, which results in that if the number of the VPN servers is increased, the configuration file of the VPN client needs to be updated or the domain name resolution of the VPN server needs to be updated, which increases the workload and increases the cost.
Disclosure of Invention
Embodiments of the present invention provide a connection method, a server, a client, and a storage medium for a virtual private network, which are convenient for increasing the number of VPN servers, increasing the success rate of accessing the VPN servers, and improving the quality of a network connected to the VPN servers.
In order to solve the above technical problem, an embodiment of the present invention provides a connection method for a virtual private network, which is applied to a registration server, and includes: receiving a connection request sent by a Virtual Private Network (VPN) client, wherein the connection request is used for requesting to connect a VPN server; returning the connection information of the available VPN service end and a network quality detection strategy to the VPN client, wherein the network quality detection strategy is a strategy for detecting the network quality of the available VPN service end; and the VPN client selects a VPN server to be connected for connection according to the network quality detection strategy.
The embodiment of the invention also provides a connection method of the virtual private network, which is applied to the client and comprises the following steps: sending a connection request to a registration server; receiving connection information of an available VPN server and a network quality detection strategy returned by the server, wherein the network quality detection strategy is a strategy for detecting the network quality of the available VPN server; and selecting a VPN server to be connected for connection according to a network quality detection strategy.
An embodiment of the present invention further provides a server, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described method of connecting to a virtual private network on a registry server.
An embodiment of the present invention further provides a client, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described method for connecting to a virtual private network applied to a client.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the method for connecting to a virtual private network of a registration server or the method for connecting to a virtual private network of a client.
Compared with the prior art, the embodiment of the invention has the advantages that the registration server returns the connection information of the available VPN server to the VPN server after receiving the connection request sent by the VPN client, and the connection information of the available VPN server is provided by the registration server instead of the configuration information in the client configuration file, so that the VPN client does not need to be updated even if the IP address of the available VPN server is increased, and the applicability of the VPN client is improved; in addition, the VPN client can select a VPN server to be connected to connect according to a network quality detection strategy, and the network quality of the available VPN server can be determined through the network quality detection strategy, so that the determined VPN server to be connected can provide better network quality, the success rate of accessing the VPN client to the VPN server is increased, and the network quality of connecting the VPN server is improved.
In addition, before returning the connection information of the available VPN server and the network quality detection policy to the VPN client, the connection method of the virtual private network further includes: according to the stored registration information of the registered VPN server, selecting the registered VPN server matched with the VPN client as an available VPN server, wherein the registration information of the registered VPN server comprises the following steps: the port number of the registered VPN service end, the IP address of the registered VPN service end and the operation protocol type of the registered VPN service end, and the connection information of the available VPN service end comprises the IP address of the available VPN service end. The registration server stores the registration information of the registered VPN service ends, so that the information of each registered VPN service end can be obtained through the registration server, the number of the registered VPN service ends is increased conveniently, and the success rate of accessing the VPN client to the VPN is further improved by selecting the registered VPN service end matched with the connection request as an available VPN service end.
In addition, the connection request includes: the port number of the VPN client and the operation protocol type of the VPN client; according to the stored registration information of the registered VPN server, selecting the registered VPN server matched with the VPN client as an available VPN server, and specifically comprising the following steps: acquiring a port number of a VPN client and an operation protocol type of the VPN client; the following processing is carried out aiming at the registration information of the registered VPN service terminal: judging whether the registration information of the registered VPN server is matched with the port number of the VPN client and the operation protocol type of the VPN client; and if the VPN servers are matched, the registered VPN server is used as an available VPN server. Because different VPN clients have different port numbers and operation protocol types for accessing the VPN, the registered VPN server matched with the VPN client can be quickly selected by respectively matching the port numbers and the operation protocols of the VPN clients, and the speed of determining the available VPN server is improved.
In addition, before receiving the connection request sent by the virtual private network VPN client, the method for connecting a virtual private network further includes: receiving registration information sent by a VPN server, wherein the registration information of the VPN server comprises a port number of the VPN server, an IP address of the VPN server and an operation protocol type of the VPN server; determining a registered VPN server according to the registration information of the VPN server; and storing the registration information of each registered VPN server. The received registration information of the VPN service end is not stored, but the registration information of the VPN service end is stored, so that the stored data volume can be reduced, and the subsequent determination speed of the available VPN service end is further improved.
In addition, determining to register the VPN server according to the registration information of the VPN server includes: acquiring an IP address of a VPN server and an operation protocol type of the VPN server in the registration information; sending a specified detection packet to the IP address, wherein the operation protocol type of the specified detection packet is the same as the operation protocol type of the VPN server; and judging whether feedback information of the VPN server side is received or not, and if so, taking the VPN server side as a registered VPN server side. And sending a detection packet to the VPN service end, detecting whether a port of the VPN service end is available or not, or detecting whether a network of the VPN service end is available or not, if the feedback information is received, determining that the port of the VPN service end is available and the network is normal, determining that the VPN service end is a registered VPN service end, and quickly determining the registered VPN service end through the detection of the detection packet.
In addition, the connection method of the virtual private network further includes: re-determining the registered VPN service end every a first preset time, and updating the stored registration information of the registered VPN service end; and updating the network quality detection strategy every second preset time. The registration information of the registered VPN server is updated regularly, so that the VPN server network stored in the registration server can be ensured to be normal and the port can be used; and updating the network quality detection strategy at regular time to ensure that the network quality detection strategy acquired by the subsequent VPN client is latest and better accords with the detection of the network quality.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic structural diagram of an OpenVPN system provided in accordance with a first embodiment of the present invention;
fig. 2 is a schematic flowchart of a connection method of a virtual private network according to a first embodiment of the present invention;
fig. 3 is a connection relationship between a registration server, a VPN client and a VPN server provided according to a first embodiment of the present invention;
fig. 4 is a schematic diagram of a specific implementation of storing registration information for registering a VPN server according to a second embodiment of the present invention;
fig. 5 is a detailed flowchart of a connection method of a virtual private network according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of a specific implementation of selecting a to-be-connected VPN server for connection according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server provided in a fourth embodiment of the present invention;
fig. 8 is a schematic structural diagram of a client according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
The existing OpenVPN system includes a plurality of VPN service terminals to be connected, and connection information of the plurality of VPN service terminals is generally configured in a configuration file of the VPN client, for example, an IP address of the VPN service terminal or domain name information of the VPN service terminal. And the VPN client side tries to connect the first VPN server side in the configuration file according to the sequence of the connection information of the VPN server sides in the configuration file, and if the connection of the first VPN server side fails, tries to connect the second VPN server side according to the sequence of the connection information of the VPN server sides until the connection of the second VPN server side with one VPN server side succeeds. For example, the OpenVPN system has a structure as shown in fig. 1, where 2 VPN servers are configured in a configuration file of the VPN client, and the sequence is VPN server 01 and VPN server 02; then, the VPN client acquires the connection information of 2 VPN servers in the configuration file, first tries to connect to VPN server 01, and if the connection fails, continues trying to connect to VPN server 02. If the VPN server 01 is connected for the first time and the connection is successful, the VPN client and the VPN server 01 perform data transmission; when a VPN server 03 (not shown in fig. 1) is added to the OpenVPN system, in order to ensure that a VPN client successfully accesses a VPN, a configuration file of the VPN client needs to be updated. If the IP address of the VPN server 02 changes, the configuration file of the VPN client needs to be updated or the domain name resolution record of the VPN server needs to be changed, which results in that the change information of the VPN server cannot be obtained quickly and the VPN system cannot be applied in a large scale.
A first embodiment of the present invention relates to a virtual private network connection method. The connection method of the virtual private network is applied to a registration server, and the registration server is respectively connected with a VPN client and a VPN server. The specific flow of the connection method of the virtual private network is shown in fig. 2.
Step 101: and receiving a connection request sent by the virtual private network VPN client, wherein the connection request is used for requesting to connect the VPN server.
Specifically, a registration server is added, the registration server is connected to the VPN client and the VPN server, the connection structure between the registration server and the VPN client and the VPN server is as shown in fig. 3, fig. 3 includes a plurality of VPN clients and a plurality of VPN servers, a solid line in fig. 3 represents a communication connection between the VPN client and the VPN server, a dotted line represents a communication connection between the VPN client and the registration server or between the VPN client and the registration server before the VPN client is connected to the VPN server, the number of the VPN clients and the number of the VPN servers may be set according to actual needs, and the present embodiment is not limited.
The configuration information in the configuration file of the VPN client may be connection information of the registration server, for example, the configuration information is an IP address of the registration server or domain name information of the registration server. When the VPN client needs to be connected with a VPN server, the connection information of the registration server can be obtained through the configuration information of the VPN client, and then a connection request can be sent to the registration server quickly, wherein the connection request can include a port, an operation protocol type and the like of the VPN client. The operating protocol types are as follows: TCP protocol or UDP protocol, etc.; and the registration server receives the connection request sent by the VPN client.
Step 102: and returning the connection information of the available VPN service end and a network quality detection strategy to the VPN client, wherein the network quality detection strategy is a strategy for detecting the network quality of the available VPN service end. And the VPN client selects a VPN server to be connected for connection according to the network quality detection strategy.
Specifically, the registration server stores registration information of N registered VPN servers, wherein N is an integer greater than 0; that is, the registration information of one VPN server may be stored, and the registration information of a plurality of VPN servers may also be stored. The registration information for each VPN server includes: the method comprises the steps of registering a port number of a VPN service end, registering an IP address of the VPN service end and operating protocol types of the VPN service end. It is understood that other information of the VPN server may also be stored, such as the bandwidth of the VPN server, etc.
In one example, after receiving a connection request sent by a VPN client, all the stored registered VPN servers may be used as available VPN servers, and the registration information of the registered VPN servers may be used as the connection information of the available VPN servers. And returning the determined connection information of the available VPN service end to the VPN client.
In addition, the registration server further stores a network quality detection policy, where the network quality detection policy may be a calculation formula for calculating network quality of the VPN server, and the calculation formula may calculate the network quality of the VPN server based on a packet loss rate of the VPN server. The network quality detection strategy is stored in the registration server, so that after the network quality detection strategy is changed, the VPN client does not need to be changed, the network quality detection strategy acquired by the VPN client each time is the latest network quality detection strategy, and the accuracy of network quality detection is improved.
In another example, a registered VPN server matched with the VPN client may be selected as an available VPN server according to the stored registration information of the registered VPN server.
The connection information of the available VPN server includes an IP address of the available VPN server. The available VPN service end can be screened from the registered VPN service ends according to the connection request, and the returned connection information does not contain the unavailable VPN service end of the VPN client, so that the VPN client access speed is increased. The connection request includes: the port number of the VPN client and the running protocol type of the VPN client.
The specific process of selecting the registered VPN server matched with the VPN client as the available VPN server is as follows: and acquiring the port number of the VPN client and the operation protocol type of the VPN client. The following processing is carried out aiming at the registration information of each registered VPN service terminal: judging whether the registration information of the registered VPN server is matched with the port number of the VPN client and the operation protocol type of the VPN client; and if the VPN servers are matched, the registered VPN server is used as an available VPN server.
Specifically, the registration information of the registered VPN service end, which is matched with the port number of the VPN client and is matched with the operation protocol type of the VPN client, is searched, so that the registration information of each registered VPN service end can be sequentially judged in a traversal manner, and the registration information of the registered VPN service end, which is matched with the port number of the VPN client and is matched with the operation protocol type of the VPN client, is searched. The matched registered VPN server is used as an available VPN server, and the connection information of the available VPN server may include: the IP address of the available VPN server. For example, the registration server stores registration information of 3 registered VPN servers, which are registration information a, registration information B, and registration information C, respectively, determines whether the registration information a matches the port number and the operation protocol type of the VPN client, and if the port number in the registration information a is the same as the port number of the VPN client and the operation type in the registration information a is the same as the operation type of the VPN client, determines that the port numbers of the registration information a and the VPN client match the operation protocol type of the client, and takes the registered VPN client corresponding to the registration information a as an available VPN server. If the port number in the registration information B is the same as the port number of the VPN client and the operation type in the registration information B is different from the operation type of the VPN client, determining that the registration information B is not matched with the operation protocol type of the VPN client, and determining that the registration VPN client corresponding to the registration information B is not an available VPN server. If the port number in the registration information C is different from the port number of the VPN client and the operation type in the registration information C is the same as the operation type of the VPN client, determining that the registration information C is not matched with the port number of the VPN client, and determining that the registration VPN client corresponding to the registration information C is not an available VPN server.
After determining the available VPN server, the connection information of the available VPN server may be determined, for example, the IP address of the available VPN server is used as the connection information of the available VPN server.
And returning the connection information and the network quality detection strategy of the available VPN server to the VPN client, and after receiving the connection information and the network quality detection strategy of the available VPN server, detecting the network quality of the available VPN server according to the network quality detection strategy, and selecting the VPN server with the maximum network quality as the server to be connected for connection. The network quality detection strategy can be a calculation formula based on the round trip time and the packet loss rate of an available VPN service end; for example, the network quality detection policy is a formula for calculating the network quality, that is, the network quality is 1 × round trip time + packet loss rate × 2, and weight 1 and weight 2 are preset values.
Compared with the prior art, the embodiment of the invention has the advantages that the registration server returns the connection information of the available VPN server to the VPN server after receiving the connection request sent by the VPN client, and the connection information of the available VPN server is provided by the registration server instead of the configuration information in the client configuration file, so that the VPN client does not need to be updated even if the IP address of the available VPN server is increased, and the applicability of the VPN client is improved; in addition, the VPN client can select a VPN server to be connected to connect according to a network quality detection strategy, and the network quality of the available VPN server can be determined through the network quality detection strategy, so that the determined VPN server to be connected can provide better network quality, the success rate of accessing the VPN client to the VPN server is increased, and the network quality of connecting the VPN server is improved.
A second embodiment of the present invention relates to a virtual private network connection method. The second embodiment is a further improvement of the first embodiment, and the main improvements are as follows: in the second embodiment of the present invention, registration information for registering a VPN server is stored before receiving a connection request transmitted from a virtual private network VPN client. A specific implementation of storing the registration information for registering the VPN server in the second embodiment is shown in fig. 4.
Step 201: and receiving registration information sent by the VPN server, wherein the registration information of the VPN server comprises a port number of the VPN server, an IP address of the VPN server and an operation protocol type of the VPN server.
Specifically, the registration server may receive, in real time, the registration information sent by the VPN server, where the number of the VPN server is 1 or multiple, and in this embodiment, the number of the VPN server is multiple. After the VPN server establishes a connection with the registration server, the VPN server may send registration information to the registration server.
Step 202: and determining the VPN server to be registered according to the registration information of the VPN server.
In one example, the following processing is performed on the registration information of each VPN server: acquiring an IP address of a VPN server and an operation protocol type of the VPN server in the registration information; sending a specified detection packet to the IP address, wherein the operation protocol type of the specified detection packet is the same as the operation protocol type of the VPN server; and judging whether feedback information of the VPN server side is received or not, and if so, taking the VPN server side as a registered VPN server side.
Specifically, each detection packet supports different operation protocol types, and an operation protocol type corresponding to a VPN service end is determined by acquiring the operation protocol type of the VPN service end, wherein the operation protocol type of the specified detection packet is the same as the operation protocol type of the VPN service end. According to the IP address of the VPN server, sending a specified detection packet to the VPN server; and if the feedback information of the VPN service end is not received, the registration information of the VPN service end is not stored. The specified detection packet may be used to detect whether a port of the VPN server is available or whether a network of the VPN server is available.
Step 203: and storing the registration information for registering the VPN service terminal.
It can be understood that, in order to determine the accuracy of the registration information of the registered VPN server and the accuracy of the network quality detection policy, the registered VPN server may be determined again every first preset time period, and the stored registration information of the registered VPN server is updated; and updating the network quality detection strategy every second preset time.
Specifically, the first preset time period and the second preset time period may be set as needed, for example, the first preset time period may be 24 hours, and the second preset time period may be 1 month. The network quality detection strategy can detect whether a new network quality detection strategy exists in the network every month, and if the new network quality detection strategy exists, the stored network quality detection strategy is updated to be the latest network quality detection strategy.
In the connection method of the virtual private network provided by the embodiment, since the registration information of the registered VPN server is stored instead of storing all the received registration information of the VPN server, the amount of stored data can be reduced, and the subsequent determination speed of the available VPN server is further increased; in addition, the registration information of the registered VPN server is updated regularly, so that the condition that the VPN server network stored in the registration server is normal and the port is available can be ensured; and updating the network quality detection strategy at regular time to ensure that the network quality detection strategy acquired by the subsequent VPN client is latest and better accords with the detection of the network quality.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to a virtual private network connection method applied to a VPN client, and a specific flow of the virtual private network connection method is shown in fig. 5.
Step 301: a connection request is sent to the registration server.
Specifically, the VPN client is connected to a registration server, the registration server is connected to VPN servers, and the number of the VPN servers may be 1 or more. The configuration information of the configuration file at the VPN client may be connection information of the registry server, and the connection information may be an IP address of the registry server or domain name information of the registry server. And acquiring the connection information of the registration server in the configuration file, and sending a connection request to the registration server according to the connection information. The connection request includes: the port number of the VPN client and the running protocol type of the VPN client.
Step 302: and receiving the connection information of the available VPN service end and the network quality detection strategy returned by the service end.
Specifically, the registration server receives the connection request, returns connection information of the available VPN service end, and a network quality detection policy, which is a policy for detecting the network quality of the available VPN service end, and may be, for example, a calculation formula for calculating the network quality, where the network quality is 1 × round trip time + packet loss rate × weight 2, and weight 1 and weight 2 are preset values.
Step 303: and selecting a VPN server to be connected for connection according to a network quality detection strategy.
In one example, if the number of available VPN servers is multiple, selecting a VPN server to be connected to connect includes the following sub-steps, as shown in fig. 6.
S31: and determining the network quality of each available VPN service terminal according to the network quality detection strategy.
In one example, the connection information of each available VPN server includes: IP address of available VPN service end; the following processing is carried out aiming at each available VPN service end: sending detection information to the available VPN server according to the IP address of the available VPN server; acquiring a round trip time value and a packet loss rate of an available VPN server; and calculating the network quality of the available VPN service end according to the network quality detection strategy, the round trip time value and the packet loss rate of the available VPN service end.
Specifically, the connection information of each VPN server includes: the IP address of the available VPN service end is processed according to each available VPN service end as follows: sending detection information to a VPN service end, receiving round trip time (rtt) and packet loss rate returned by the available VPN service end, and determining the network quality of the available VPN service end according to the rtt and the packet loss rate. For example, the network quality detection policy is a formula for calculating the network quality, that is, the network quality is 1 × round trip time + packet loss rate × 2, and the weights 1 and 2 are preset values, so that the network quality of each available VPN server can be determined according to the formula.
Substep S32: ranking each available VPN server based on network quality.
Specifically, each available VPN server may be sorted based on network quality, for example, each available VPN server may be sorted in descending order of network quality, or each available VPN server may be sorted in ascending order of network quality.
Substep S33: and selecting the available VPN service end corresponding to the maximum network quality as a VPN service end to be connected, and connecting the VPN service end to be connected.
It should be understood that this embodiment is a system example corresponding to the first embodiment, and may be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
A fourth embodiment of the present invention relates to a server, and a specific configuration of the server 40 is as shown in fig. 7, and includes: at least one processor 401; and a memory 402 communicatively coupled to the at least one processor 401; the memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401, so that the at least one processor 401 can execute the connection method of the virtual private network according to the first embodiment or the second embodiment.
A fifth embodiment of the present invention relates to a client 50, and a specific configuration of the client 50 is as shown in fig. 8, and includes: at least one processor 501; and a memory 502 communicatively coupled to the at least one processor 501; the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501 to enable the at least one processor 501 to execute the virtual private network connection method according to the third embodiment.
The memory and the processor in either the fourth or fifth embodiments are connected by a bus, which may include any number of interconnected buses and bridges that link various circuits of the memory and the processor or processors together. The bus may also link various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method for connecting a virtual private network according to the first or second embodiment.
A seventh embodiment of the present invention relates to a computer-readable storage medium storing a computer program which, when executed by a processor, implements the virtual private network connection method of the third embodiment.
Those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (11)

1. A connection method of a virtual private network is applied to a registration server, and comprises the following steps:
receiving a connection request sent by a Virtual Private Network (VPN) client, wherein the connection request is used for requesting to connect a VPN server;
selecting a VPN server matched with the port number of a VPN client and the operation protocol type of the VPN client as an available VPN server according to the stored registration information of the registered VPN server; the registration information for registering the VPN server side comprises: the port number of the registered VPN service end, the IP address of the registered VPN service end and the operation protocol type of the registered VPN service end, and the connection information of the available VPN service end comprises the IP address of the available VPN service end;
returning connection information of an available VPN server and a network quality detection strategy to the VPN client, wherein the network quality detection strategy is a strategy for detecting the network quality of the available VPN server;
and the VPN client selects a VPN server to be connected for connection according to a network quality detection strategy.
2. The virtual private network connecting method according to claim 1, wherein the connection request includes: the port number of the VPN client and the operation protocol type of the VPN client;
selecting the registered VPN server matched with the VPN client as the available VPN server according to the stored registration information of the registered VPN server, and specifically comprising the following steps:
acquiring a port number of the VPN client and an operation protocol type of the VPN client;
the following processing is carried out aiming at the registration information of the registered VPN service terminal:
judging whether the registration information of the registered VPN server is matched with the port number of the VPN client and the operation protocol type of the VPN client; and if the VPN servers are matched, taking the registered VPN server as the available VPN server.
3. The virtual private network connection method according to claim 1 or 2, wherein before receiving the connection request sent by the virtual private network VPN client, the virtual private network connection method further comprises:
receiving registration information sent by a VPN server, wherein the registration information of the VPN server comprises a port number of the VPN server, an IP address of the VPN server and an operation protocol type of the VPN server;
determining a registered VPN server according to the registration information of the VPN server;
storing the registration information of the registered VPN server;
wherein, the determining the registered VPN server according to the registration information of the VPN server specifically includes:
acquiring the IP address of the VPN server and the operation protocol type of the VPN server in the registration information;
sending a specified detection packet to the IP address, wherein the operation protocol type of the specified detection packet is the same as the operation protocol type of the VPN server;
and judging whether the feedback information of the VPN server is received or not, and if so, taking the VPN server as a registered VPN server.
4. The virtual private network connecting method according to claim 3, wherein the virtual private network connecting method further comprises:
re-determining the registered VPN service end every a first preset time, and updating the stored registration information of the registered VPN service end;
and updating the network quality detection strategy every second preset time.
5. A connection method of a virtual private network is applied to a client and comprises the following steps:
sending a connection request to a registration server;
receiving connection information of an available VPN service end and a network quality detection strategy returned by the service end, wherein the network quality detection strategy is a strategy for detecting the network quality of the available VPN service end;
selecting a VPN server to be connected for connection according to a network quality detection strategy;
the connection information of the available VPN service end comprises an IP address of the available VPN service end; the available VPN server is determined according to stored registration information of a registered VPN server, and the registration information of the registered VPN server comprises the following steps: and the port number of the registered VPN service end, the IP address of the registered VPN service end and the operation protocol type of the registered VPN service end, and the VPN service end matched with the port number of the VPN client and the operation protocol type of the VPN client is used as the available VPN service end.
6. The virtual private network connecting method according to claim 5, wherein the number of the available VPN servers is plural;
the method for connecting the VPN servers comprises the following steps of selecting the VPN servers to be connected for connection according to a network quality detection strategy, wherein the method specifically comprises the following steps:
determining the network quality of each available VPN server according to the network quality detection strategy;
ranking each of the available VPN servers based on network quality;
and selecting the available VPN service end corresponding to the maximum network quality as a VPN service end to be connected, and connecting the VPN service end to be connected.
7. The connection method of virtual private network according to claim 6, wherein the connection information of each of the available VPN servers comprises: an IP address of the available VPN server;
the determining the network quality of each available VPN server according to the network quality detection policy specifically includes:
for each of the available VPN servers, the following processing is performed:
sending detection information to the available VPN server according to the IP address of the available VPN server;
obtaining a round trip time value and a packet loss rate of the available VPN server;
and calculating the network quality of the available VPN service end according to the network quality detection strategy, the round trip time value and the packet loss rate of the available VPN service end.
8. The virtual private network connection method according to any one of claims 5 to 7, wherein before sending the connection request to the registration server, the method further comprises:
and acquiring the stored IP address of the registration server from the configuration information.
9. A server, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of connecting to a virtual private network according to any one of claims 1 to 4.
10. A client, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for virtual private network connectivity of any of claims 5-8.
11. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for connecting a virtual private network according to any one of claims 1 to 4, or implements the method for connecting a virtual private network according to any one of claims 5 to 8.
CN201911158060.5A 2019-11-22 2019-11-22 Virtual private network connection method, server, client and storage medium Active CN110838967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911158060.5A CN110838967B (en) 2019-11-22 2019-11-22 Virtual private network connection method, server, client and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911158060.5A CN110838967B (en) 2019-11-22 2019-11-22 Virtual private network connection method, server, client and storage medium

Publications (2)

Publication Number Publication Date
CN110838967A CN110838967A (en) 2020-02-25
CN110838967B true CN110838967B (en) 2021-12-24

Family

ID=69577048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911158060.5A Active CN110838967B (en) 2019-11-22 2019-11-22 Virtual private network connection method, server, client and storage medium

Country Status (1)

Country Link
CN (1) CN110838967B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11418489B1 (en) * 2021-09-01 2022-08-16 Netflow, UAB Optimized server picking in a virtual private network

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789537A (en) * 2017-01-20 2017-05-31 网宿科技股份有限公司 A kind of VPN construction method and system
CN106730835A (en) * 2016-12-16 2017-05-31 青岛蘑菇网络技术有限公司 A kind of network game accelerated method and system based on router and vpn server
CN107624233A (en) * 2016-11-24 2018-01-23 深圳前海达闼云端智能科技有限公司 A kind of VPN transmission tunnel dispatching method, device and VPN client server
CN108616912A (en) * 2018-08-02 2018-10-02 竞技世界(北京)网络技术有限公司 A kind of network quality optimization method and device
CN108933840A (en) * 2018-09-28 2018-12-04 珠海沙盒网络科技有限公司 A kind of distributed agent method and system
US10182020B2 (en) * 2016-05-31 2019-01-15 Anchorfree Inc. System and method for improving an aggregated throughput of simultaneous connections
CN110177128A (en) * 2019-04-15 2019-08-27 深圳前海达闼云端智能科技有限公司 Data transmission system and method for establishing VPN connection, terminal and VPN proxy thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988465A (en) * 2005-12-23 2007-06-27 上海冰峰计算机网络技术有限公司 Managing and monitoring method for dynamic IP network VPN
CN102130811A (en) * 2010-01-14 2011-07-20 深圳市深信服电子科技有限公司 Method for accessing application servers through VPN (Virtual Private Network) and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10182020B2 (en) * 2016-05-31 2019-01-15 Anchorfree Inc. System and method for improving an aggregated throughput of simultaneous connections
CN107624233A (en) * 2016-11-24 2018-01-23 深圳前海达闼云端智能科技有限公司 A kind of VPN transmission tunnel dispatching method, device and VPN client server
CN106730835A (en) * 2016-12-16 2017-05-31 青岛蘑菇网络技术有限公司 A kind of network game accelerated method and system based on router and vpn server
CN106789537A (en) * 2017-01-20 2017-05-31 网宿科技股份有限公司 A kind of VPN construction method and system
CN108616912A (en) * 2018-08-02 2018-10-02 竞技世界(北京)网络技术有限公司 A kind of network quality optimization method and device
CN108933840A (en) * 2018-09-28 2018-12-04 珠海沙盒网络科技有限公司 A kind of distributed agent method and system
CN110177128A (en) * 2019-04-15 2019-08-27 深圳前海达闼云端智能科技有限公司 Data transmission system and method for establishing VPN connection, terminal and VPN proxy thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Asterisk与OpenVPN的企业集团IP分布式呼叫中心;潘云良,杨观赐,周应权;《计算机应用》;20100331;全文 *

Also Published As

Publication number Publication date
CN110838967A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
JP5624973B2 (en) Filtering device
EP2633667B1 (en) System and method for on the fly protocol conversion in obtaining policy enforcement information
CN108429701B (en) Network acceleration system
US20020129165A1 (en) Network address translation and port mapping
CN108429739B (en) Method, system and terminal equipment for identifying honeypots
CN111355667B (en) Data transmission method, device, system and computer readable storage medium
CN108200218A (en) A kind of method, apparatus and electronic equipment for realizing load balancing
CN110838967B (en) Virtual private network connection method, server, client and storage medium
US20220046028A1 (en) Method and system for determining a state of an account in a network device running a light client protocol of a distributed ledger technology network
CN113873057A (en) Data processing method and device
CN107278364B (en) Node authentication method and node authentication system
CN110460486B (en) Service node monitoring method and system
CN110730242B (en) File transmission method, device and equipment
CN109788075B (en) Private network system, data acquisition method and edge server
US6263001B1 (en) Packet data communication protocol with reduced acknowledgements in a client/server computing system
CN115002008B (en) Method, device, equipment and storage medium for measuring network delay
CN109995603B (en) Method and device for measuring packet loss under Tag model and electronic equipment
CN104994074A (en) Implementation method of communication server of physical examination machine
CN113055193B (en) Data multicast transmission method, device, equipment and storage medium
CN110324436B (en) Proxy method and device for transport layer proxy
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
CN108400974B (en) Flow guiding method and mobile terminal
CN116708041B (en) Camouflage proxy method, device, equipment and medium
CN112804161B (en) Domain name processing method
CN114726930A (en) Data packet tracking method, system, device and readable 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
TA01 Transfer of patent application right

Effective date of registration: 20210312

Address after: 200245 2nd floor, building 2, no.1508, Kunyang Road, Minhang District, Shanghai

Applicant after: Dalu Robot Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: Shenzhen Qianhaida Yunyun Intelligent Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 200245 Building 8, No. 207, Zhongqing Road, Minhang District, Shanghai

Patentee after: Dayu robot Co.,Ltd.

Address before: 200245 2nd floor, building 2, no.1508, Kunyang Road, Minhang District, Shanghai

Patentee before: Dalu Robot Co.,Ltd.

CP03 Change of name, title or address