VPN message transmission method and device

By adopting a dynamic or static allocation strategy between the VPN client and server, the target port number is determined from multiple service port numbers, which solves the problem of network node alarms and packet loss caused by the concentration of VPN message transmission, and improves the efficiency of VPN messages. Transmission stability and data transmission accuracy.

CN118740549APending Publication Date: 2024-10-01HILLSTONE NETWORKS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410748818.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing technology, VPN messages are transmitted to the same specific service port, causing intermediate network nodes to easily trigger security alarms and packet loss, especially in UDP protocol scenarios due to the lack of congestion avoidance and retransmission mechanisms.

Method used

By adopting a dynamic allocation strategy or a static allocation strategy between the VPN client and server, the target port number is determined from multiple service port numbers to avoid the centralized use of a fixed service port for the transmission of multiple VPN messages. The dynamic allocation strategy randomly selects service port numbers, and the static allocation strategy specifies service port numbers to ensure even distribution and dispersed use of port numbers.

Benefits of technology

It effectively solves the problems of intermediate network node alarms and packet loss caused by concentrated VPN message transmission, improves the stability of VPN message transmission, and ensures the order and accuracy of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740549A_ABST
    Figure CN118740549A_ABST
Patent Text Reader

Abstract

The invention discloses a VPN message transmission method and device, and relates to the technical field of communication. The method comprises the following steps: a VPN client determines a target port number in a VPN message from M service port numbers by using a dynamic allocation strategy or a static allocation strategy, the service port number is a service port number used by a VPN message outer layer transmission protocol, and M is a positive integer greater than or equal to 1; the dynamic allocation strategy is used for randomly selecting one service port number from the M service port numbers as a target port number, and the static allocation strategy is used for assigning one service port number from the M service port numbers as the target port number; and the VPN client transmits the VPN message to the VPN server according to the target port number. The technical problem that in the prior art, a VPN message is transmitted to the same specific service port, so that security alarm of an intermediate network node is easily triggered, and packet loss is easily caused is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a VPN message transmission method and device. Background Art

[0002] A Virtual Private Network (VPN) is a technology that connects one user terminal device to another user terminal device through a public network. User terminal devices can use VPN technology to achieve remote access or access within a local area network. In order to achieve a VPN connection, the user terminal device needs to generate a VPN message and transmit the VPN message to a service port of the VPN server.

[0003] However, in the prior art, some VPN messages, especially SSLVPN (Security Socket Layer VPN, a VPN technology that establishes a remote secure access channel based on the Secure Sockets Layer protocol) messages, usually have fixed ports opened by the corresponding SSLVPN servers during transmission, which causes the originally dispersed user traffic to be concentrated on the same port.

[0004] However, VPN packets need to cross the network between the VPN client and the VPN server, which may require passing through various gateways and transit nodes, which can be located on the client, the operator network, the SSLVPN server, etc. The traffic of different ports of each user is converted into VPN traffic of the same port. When these intermediate gateways or transit nodes are configured with some attack protection rules, it is very easy to cause false alarms. The intermediate nodes find that the VPN packets of a specific port are very dense, which usually triggers alarms or packet loss. This problem is particularly prominent in the scenario where the outer layer transmission protocol of the VPN packet is UDP (User Datagram Protocol), because UDP packets lack congestion avoidance and retransmission mechanisms. Once packets are lost in the network midway, the client cannot perform flow control or retransmission.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The present application provides a VPN message transmission method and device to at least solve the technical problem in the prior art that VPN messages are transmitted to the same specific service port, which easily triggers security alarms and packet loss of intermediate network nodes.

[0007] According to one aspect of the present application, a VPN message transmission method is provided, comprising: a VPN client uses a dynamic allocation strategy or a static allocation strategy to determine a target port number in a VPN message from M service port numbers, wherein the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1; the VPN client transmits the VPN message to a VPN server according to the target port number.

[0008] Optionally, the VPN client uses a dynamic allocation strategy to determine the target port number in the VPN message from M service port numbers, including: when all plaintext messages generated by the same application are encapsulated into VPN messages, the VPN client randomly selects a service port number from the M service port numbers as the target port number in each VPN message, or, when an i-th plaintext message among N plaintext messages generated by the same application is encapsulated into an i-th VPN message, the VPN client randomly selects a service port number from the M service port numbers as the target port number in the i-th VPN message, wherein N is an integer greater than 1, and i is a positive integer less than or equal to N.

[0009] Optionally, the VPN message transmission method also includes: when it is detected that the dynamic allocation strategy and the static allocation strategy are not enabled, encapsulating the plaintext messages generated by T applications among the K applications into the VPN messages through a first transmission protocol and transmitting them, and encapsulating the plaintext messages generated by applications other than the T applications among the K applications into the VPN messages through a second transmission protocol and transmitting them, wherein the first transmission protocol is a protocol that does not rely on a service port number for data transmission, the second transmission protocol is a protocol that relies on a service port number for data transmission, K is an integer greater than 1, and T is a positive integer less than K.

[0010] Optionally, the VPN client uses a static allocation strategy to determine a target port number in a VPN message from M service port numbers, including: specifying a service port number from the M service port numbers as a binding port number of an application on the VPN client through a balancing strategy, wherein the balancing strategy is used to ensure that the M service port numbers are evenly allocated to different applications for use; and when encapsulating a plaintext message generated by the application into the VPN message, using the binding port number of the application as the target port number of the VPN message.

[0011] According to another aspect of the present application, another VPN message transmission method is provided, comprising: a VPN server receives a VPN message sent by a VPN client through a target service port, wherein the target port number is a service port number corresponding to the target service port determined by the VPN client from M service port numbers according to a dynamic allocation strategy or a static allocation strategy, the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

[0012] Optionally, the VPN message transmission method further includes: the VPN server detecting whether each of the N VPN messages received includes a target identifier, wherein the N VPN messages are messages obtained by the VPN client encapsulating N plaintext messages of the same application; when it is detected that each VPN message includes a target identifier, the N VPN messages are forwarded in sequence according to a sequence number in each VPN message until each VPN message is forwarded to the resource server, wherein the forwarding in sequence is used to ensure that the N VPN messages after decapsulation are sent from the VPN server in sequence number order.

[0013] Optionally, forwarding the N VPN messages in sequence according to the sequence number in each VPN message includes: storing the N VPN messages in N storage units according to the sequence number order in each VPN message; and forwarding the VPN messages in the N storage units in sequence according to the sequence number order.

[0014] Optionally, the VPN message transmission method further includes: the VPN server performs a checking operation on the VPN message, wherein the checking operation includes at least one of the following operations: checking whether a target port number of the VPN message received by the VPN server is any one of the M service port numbers; checking whether header data of the VPN message received by the VPN server is header data of a normal VPN message; and checking whether information in the VPN message received by the VPN server satisfies information restriction conditions set in the VPN server.

[0015] According to another aspect of the present application, a VPN message transmission device is also provided, which includes: a determination unit, used to determine the target port number in the VPN message from M service port numbers using a dynamic allocation strategy or a static allocation strategy through a VPN client, wherein the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1; a transmission unit, used for the VPN client to transmit the VPN message to the VPN server according to the target port number.

[0016] According to another aspect of the present application, another VPN message transmission device is provided, which includes: a message transmission unit, which is used for a VPN server to receive a VPN message containing a target port number sent by a VPN client through a target service port, wherein the target port number is a target port number corresponding to the target service port determined by the VPN client from M service port numbers according to a dynamic allocation strategy or a static allocation strategy, the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

[0017] In the present application, a VPN client uses a dynamic allocation strategy or a static allocation strategy to determine a target port number in a VPN message, wherein the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, where M is an integer greater than 1; the VPN message is transmitted to a VPN server through the VPN client according to the target port number.

[0018] As can be seen from the above content, the present application changes the fixed service port number in the VPN message by adopting a dynamic allocation strategy or a static allocation strategy, wherein the dynamic allocation strategy is used to randomly select a service port number from M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from M service port numbers as the target port number. It should be noted that, whether the dynamic allocation strategy or the static allocation strategy is adopted, the purpose of no longer centrally using a fixed service port for the transmission of multiple VPN messages can be achieved, thereby solving the technical problem that the VPN message will be transmitted to the same specific service port in the prior art, which easily triggers the security alarm of the intermediate network node and the packet loss, thereby achieving the technical effect of improving the transmission stability of a large number of VPN messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 is a flow chart of an optional VPN message transmission method according to an embodiment of the present application;

[0021] Figure 2 is a schematic diagram of an optional SSLVPN client access process according to an embodiment of the present application;

[0022] Figure 3 is a flow chart of an optional VPN message transmission according to an embodiment of the present application;

[0023] Figure 4 It is a schematic diagram of an optional UDP-based protocol for transmitting SSLVPN messages according to an embodiment of the present application;

[0024] Figure 5 It is an optional timing diagram of message transmission based on a dynamic allocation strategy according to an embodiment of the present application;

[0025] Figure 6 It is another optional timing diagram of message transmission based on a dynamic allocation strategy according to an embodiment of the present application;

[0026] Figure 7 It is an optional timing diagram of message transmission based on a static allocation strategy according to an embodiment of the present application;

[0027] Figure 8 is a timing diagram of VPN message transmission using an optional protocol dispersion solution according to an embodiment of the present application;

[0028] Fig. 9 is a schematic diagram of an optional VPN message transmission device according to an embodiment of the present application;

[0029] Fig.10 is a schematic diagram of another optional VPN message transmission device according to an embodiment of the present application;

[0030] Fig.11 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] It should also be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) collected by this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0034] In addition, this application collects and analyzes customer information and provides users with corresponding operation entrances for them to choose to agree or reject automated decision-making results.

[0035] According to an embodiment of the present application, an embodiment of a VPN message transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] Figure 1 is a flow chart of an optional VPN message transmission method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0037] Step S101: The VPN client uses a dynamic allocation strategy or a static allocation strategy to determine a target port number in a VPN message from M service port numbers.

[0038] In step S101, the service port number is the server port number used by the VPN message outer layer transmission protocol, the target port number can be one of M service port numbers, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

[0039] Optionally, VPN refers to a network technology that establishes a private network on a public network for encrypted communication. Among them, the VPN gateway realizes remote access by encrypting data packets. The VPN client can also be called an SSLVPN client.

[0040] Optionally, the above-mentioned VPN message can be an SSLVPN message, wherein the application layer VPN technology represented by SSLVPN encrypts the original message and encapsulates it in a new message, that is, the original message becomes encrypted data and serves as the application layer payload of the VPN message. It should be noted that the VPN message includes encrypted data and VPN service port number, and the encrypted data is the plaintext message from the application.

[0041] Optionally, a schematic diagram of a message structure of an SSLVPN based on a UDP encapsulation protocol is shown in Table 1:

[0042] Table 1

[0043]

[0044] Among them, in Table 1, the contents of the three rows "Application Layer", "UDP1 or TCP1" and "IP1" are encrypted data, which are the original message parts, among which UDP 1 or TCP1 is the original transport layer header of the message, and UDP2 header is the outer UDP header of the VPN encapsulated message. In application scenarios, the data before encryption is often referred to as plaintext traffic. When the outer layer of the SSLVPN message is encapsulated using the UDP protocol, the encapsulated plaintext traffic transport layer can be either the UDP protocol or the TCP protocol.

[0045] Optionally, the technical solution of the present application is applicable to application layer VPN technology similar to SSLVPN. For the convenience of explanation, the specific implementation method of the solution will be described below using SSLVPN message as an example.

[0046] SSLVPN is widely used in situations where users access a target private network across the public network. Users usually use SSLVPN clients to access the target private network. Figure 2 As shown, in Figure 2 In the SSLVPN protocol, the firewall acts as an SSLVPN gateway, also known as an SSLVPN server. In addition to firewalls, SSLVPN gateways also have other forms, such as switches and routers with SSLVPN server functions and other intermediate network devices.

[0047] Optionally, the VPN client uses SSLVPN technology to encrypt the user's plaintext traffic and then encapsulates it into a VPN message based on the VPN service port number. After the VPN message passes through the public network, it is decapsulated on the SSLVPN server to obtain an encrypted message. The plaintext traffic obtained after decryption of the encrypted message is transmitted to the headquarters. After the headquarters resource server replies, the reply message is encapsulated again when passing through the firewall, passes through the public network, and finally replies to the user. However, the port opened by the SSLVPN server is usually fixed, that is, the SSLVPN server-side port included in the UDP 2header in Table 1 is fixed, which makes the originally dispersed user traffic concentrated on the same port. Figure 2 As shown, VPN messages need to cross the VPN client (including mobile and PC) and the SSLVPN server (i.e. Figure 2The network in the middle of the VPN (firewall in the network) may need to pass through various gateways and transit nodes, which can be located on the client, operator network, SSLVPN server, etc. The traffic of different ports of each user is converted into VPN traffic of the same port. When these intermediate gateways or transit nodes are configured with some attack protection rules, it is very easy to cause false alarms. For example, the intermediate node finds that the VPN messages of a specific port are very dense, which usually triggers alarms or packet loss. This problem is particularly prominent in the scenario where the outer layer transmission protocol of the VPN message is UDP, because UDP messages lack congestion avoidance and retransmission mechanisms. Once packets are lost in the network in the middle, the VPN client cannot perform traffic control or retransmission.

[0048] In order to solve the above problem, the embodiment of the present application provides a VPN message transmission method with a VPN client as the execution subject. The VPN client uses a dynamic allocation strategy or a static allocation strategy to change the fixed service port number in the VPN message to a target port number.

[0049] Optionally, the target port number is a service port number from M service port numbers, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

[0050] Optionally, Figure 3 is a flow chart of an optional VPN message transmission according to an embodiment of the present application, such as Figure 3 As shown, the VPN client first completes VPN negotiation with the VPN server (also known as the SSLVPN server), and then determines whether the VPN client uses a protocol dispersion scheme based on the negotiation result. If so, a protocol that does not rely on a service port number for data transmission, such as ICMP (Internet Control Message Protocol), is used to encapsulate the plaintext message generated by the application into a VPN message and complete subsequent communications. If the protocol dispersion scheme is not used, the stage of selecting a port allocation scheme is entered, and a static allocation scheme or a dynamic allocation scheme can be selected to complete subsequent communications based on the selected port allocation scheme.

[0051] Optionally, in order to solve the problem of SSLVPN fixed port traffic triggering intermediate network node alarms or packet loss, the present application first establishes a port pool, wherein the port pool includes M service port numbers, and the port pool is used to disperse the VPN messages of the original single port, and use the ports in the port pool to replace the original single outer port after being allocated by the VPN client.

[0052] Optionally, the VPN client first encapsulates the plaintext traffic generated by the application into a VPN message, such as the message shown in Table 1, wherein "dst_port 4433" in Table 1 refers to the fixed service port number opened by the SSLVPN server, and before the message is sent, the VPN client changes the port number to a service port number in the port pool. In addition, the service port number in the port pool is usually configured by the administrator of the VPN server, and is usually a number of service port numbers that can be used.

[0053] In an optional embodiment, Figure 4 is a schematic diagram of an optional UDP-based SSLVPN message transmission according to an embodiment of the present application, such as Figure 4 As shown in the figure, in a typical SSLVPN application scenario, the VPN client uses SSLVPN technology to protect multiple plaintext flows. The UDP packet connection of the plaintext flow can be regarded as an application on the user's terminal device requesting data from the resource server on the server side.

[0054] Optionally, the applications on the VPN client include but are not limited to: browsers, terminal session software, network tools, and other programs with specific functions. In addition, the service resources of the resource server are usually provided by multiple servers, corresponding to specific IP addresses, protocols, and ports. The SSLVPN server provides data encryption and protection functions for these resource servers, which can be regarded as the boundary barrier of these resource servers.

[0055] exist Figure 4 In the figure, APP1, APP2, and APP3 are applications on the VPN client. Users use these applications to access some resources on the far right. These resources are provided by the resource server. The VPN client and the resource server are connected through the Internet. In order to protect the traffic of users accessing the resource server, the traffic actually accessed by users will be encapsulated as VPN packets. The VPN packets are transmitted to Figure 4 After the VPN server in the network, the VPN server decapsulates the VPN message and transmits it to the resource server such as service1, service2, and service3. The reverse traffic is also processed similarly. Usually Figure 4 The VPN server is installed on the network boundary between the trusted intranet and the untrusted extranet.

[0056] The present application adopts a dynamic allocation strategy or a static allocation strategy to change the fixed service port number in the VPN message to a target port number, wherein the dynamic allocation strategy is used to randomly select a service port number from M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from M service port numbers as the target port number.

[0057] It should be noted that, regardless of whether a dynamic allocation strategy or a static allocation strategy is adopted, the purpose of no longer concentrating on using a fixed service port for message transmission can be ultimately achieved, thereby solving the technical problem in the prior art that VPN messages are transmitted to the same specific service port, which easily triggers security alarms and packet loss at intermediate network nodes, thereby achieving the technical effect of improving the transmission stability of a large number of VPN messages.

[0058] Step S102: The VPN client transmits the VPN message to the VPN server according to the target port number.

[0059] Optionally, the VPN client transmits the VPN message to a service port on the VPN server corresponding to the target port number.

[0060] Based on the contents of the above steps S101 to S102, it can be known that in the present application, the VPN client uses a dynamic allocation strategy or a static allocation strategy to determine the target port number in the VPN message from M service port numbers, wherein the service port number is the service port number used by the outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1; the VPN client transmits the VPN message to the VPN server according to the target port number.

[0061] As can be seen from the above content, the present application changes the fixed service port number in the VPN message to the target port number by adopting a dynamic allocation strategy or a static allocation strategy, wherein the dynamic allocation strategy is used to randomly select a service port number from M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from M service port numbers as the target port number. It should be noted that, whether the dynamic allocation strategy or the static allocation strategy is adopted, the purpose of no longer centrally using a fixed service port for the transmission of multiple VPN messages can be achieved, thereby solving the technical problem that the VPN message will be transmitted to the same specific service port in the prior art, which easily triggers the security alarm of the intermediate network node and the packet loss, thereby achieving the technical effect of improving the transmission stability of a large number of VPN messages.

[0062] In an optional embodiment, when the VPN client uses a dynamic allocation strategy to determine the target port number in the VPN message, all plaintext messages generated by the same application can be encapsulated into VPN messages that all include the same target port number. Specifically, when all plaintext messages generated by the same application are encapsulated into VPN messages, the VPN client randomly selects a service port number from the M service port numbers as the target port number in each VPN message.

[0063] Optionally, assuming that there are M available service port numbers in the port pool, there are currently K VPN clients, and each VPN client may have multiple applications communicating with the resource server in the private network through the VPN tunnel.

[0064] Optionally, the dynamic allocation scheme does not guarantee that the application on the VPN client is fixedly corresponding to a certain service port, that is, when encapsulating the message, the VPN client randomly selects a service port number in the port pool as the target port number. The target port number is the service port number in the outer TCP header of the VPN message when the VPN client sends the VPN message to the VPN server.

[0065] Optionally, the encapsulated packets corresponding to the plaintext traffic of different applications on the same client may use different VPN service ports. Depending on whether the plaintext traffic of the same application uses the same port, there are two implementation methods for the dynamic allocation scheme:

[0066] Method 1: The plaintext traffic of the same application uses the same service port. This method is relatively simple to handle and can ensure that the plaintext traffic messages of the same data stream remain as one data stream after being encapsulated.

[0067] Optionally, Figure 5 is an optional timing diagram of message transmission based on a dynamic allocation strategy according to an embodiment of the present application, such as Figure 5 As shown, the following steps are included:

[0068] Step S501, when encapsulating a message, the VPN client randomly selects a service port number from the port pool as the target port number, and uses the target port number to replace the original fixed port number in the message;

[0069] Step S502, after receiving the message sent by the VPN client, the VPN server checks the message, decapsulates the message, and caches the source port number of the VPN client;

[0070] Step S503, the VPN server sends the decapsulated message to the resource server;

[0071] Step S504, the resource server generates a plaintext message according to the received message, and sends the plaintext message to the VPN server;

[0072] Step S505, the VPN server encapsulates the received plaintext message into a reply message based on the cached source port number of the VPN client;

[0073] Step S506: After receiving the reply message, the VPN client decapsulates the reply message.

[0074] It should be noted that, in the above step S502, the inspection message includes the following contents:

[0075] Check whether the message received by the VPN server is a VPN message, wherein the SSL header of the VPN message can be checked to determine whether it is a VPN message; check whether the target service port number in the message received by the VPN server is in the port pool, if so, proceed to the next step, otherwise discard the message;

[0076] Perform other checks. If the message does not meet the requirements, the message will be discarded. Such checks include: if the VPN server is configured with restrictions on the client IP, carried information, etc., then perform corresponding checks; decrypt the message, and record the source and destination port information corresponding to the message based on session and other methods, and forward the message traffic.

[0077] It should be noted that when all plaintext messages generated by the same application are encapsulated as VPN messages, a service port number is randomly selected from the M service port numbers as the target port number in each VPN message, which can ensure that a unique data flow is maintained between the same application and the resource server. Once a service port is assigned to an application, the service port and the application constitute the two ends of a data flow, which facilitates data maintenance and management.

[0078] In an optional embodiment, in the process of determining the target port number in the VPN message by the VPN client using a dynamic allocation policy, when encapsulating the i-th plaintext message among N plaintext messages generated by the same application into the i-th VPN message, the VPN client can also randomly select a service port number from the M service port numbers as the target port number in the i-th VPN message, where N is an integer greater than 1 and i is a positive integer less than or equal to N.

[0079] Optionally, the dynamic allocation solution also includes the following another method:

[0080] Method 2: The plaintext traffic of the same application uses multiple service ports. For example, for 100 plaintext messages generated by the same application, for each plaintext message, a service port number is randomly selected from M service port numbers to encapsulate the message into a VPN message. Assuming that M is an integer greater than or equal to 100, the corresponding service port number in each of the 100 VPN messages may be different.

[0081] It should be noted that the second method further disperses the ports used by traffic, making the VPN service port distribution of traffic more even. It is suitable for situations where a certain application of a certain client has a large amount of traffic. For example, a certain client's plain text traffic uses TCP connection to transmit or download large files. At this time, if UDP is selected as the outer encapsulation protocol, it is easy to reach the UDP message upper limit of the same port of the intermediate link.

[0082] In an optional embodiment, after receiving a VPN message sent by a VPN client through a VPN server, the VPN server may detect whether each of the N VPN messages received includes a target identifier, wherein the N VPN messages are messages obtained by the VPN client encapsulating N plaintext messages of the same application; when it is detected that each VPN message includes a target identifier, the N VPN messages are forwarded in sequence according to a sequence number in each VPN message until each VPN message is forwarded to a resource server, wherein the sequential forwarding is used to ensure that the N VPN messages after decapsulation are sent from the VPN server in sequence number order.

[0083] Optionally, different from method 1, method 2 disperses the plaintext traffic of the same application into multiple data streams. Therefore, if the VPN server cannot guarantee the order of message transmission, the resource server will have a message order preservation problem. In order to solve this problem, additional processing is required for the messages transmitted in method 2, including:

[0084] When the VPN client encapsulates the plaintext traffic, it assigns a sequence number to the plaintext traffic and adds a special identifier (i.e., the target identifier). The VPN message encapsulated in this way is shown in Table 2:

[0085] Table 2

[0086]

[0087]

[0088] As shown in Table 2, the plaintext traffic belonging to the same application is arranged by sequence number. After the message is encapsulated, the dst port of the UDP2 header is a port randomly selected from the port pool. Even for the plaintext traffic of the same application, the port is different.

[0089] Optionally, after the VPN message reaches the VPN server, it is decapsulated and then undergoes a similar inspection process as in method 1. After the VPN server identifies the special identifier, it forwards the VPN message in sequence until it reaches the resource server. There are many ways to implement sequential forwarding, the purpose of which is to ensure that the decapsulated traffic is sent from the VPN server and other intermediate network devices in sequence.

[0090] It should be noted that the in-order forwarding ensures that the VPN messages can be processed in the correct order, thereby achieving the technical effect of ensuring the accuracy of data transmission.

[0091] In an optional embodiment, when the N VPN messages are forwarded in sequence according to the sequence number in each VPN message, the N VPN messages may be stored in N storage units according to the sequence number sequence in each VPN message, and then the VPN messages in the N storage units may be forwarded in sequence according to the sequence number sequence.

[0092] Optionally, the VPN server is pre-configured with P storage units, where P is an integer greater than or equal to N. After the 1st to Nth VPN messages arrive at the VPN server (the arrival order is disordered), the VPN server stores the 1st to Nth VPN messages in the N storage units in sequence, and then forwards the VPN messages in the N storage units in sequence.

[0093] In an optional embodiment, Figure 6 is another optional timing diagram of message transmission based on a dynamic allocation strategy according to an embodiment of the present application, such as Figure 6 As shown, the following steps are included:

[0094] Step S601, the VPN client encapsulates the VPN message, adds a special identifier and a sequence number to the VPN message, and randomly selects a service port number for the VPN message from a port pool;

[0095] Step S602, after receiving the VPN message, the VPN server checks the VPN message, deblocks the VPN message, caches the source port number of the VPN client, and sequentially forwards the VPN message to the resource server;

[0096] Step S603, the resource server generates a reply message in plain text according to the received VPN message;

[0097] Step S604, the VPN server encapsulates the reply message based on the cached source port number of the VPN client, and adds a special identifier and a sequence number;

[0098] Step S605: The VPN client decapsulates the reply message sent by the VPN server and processes the reply message in sequence.

[0099] It should be noted that when a dynamic allocation scheme is used to transmit VPN messages, the service ports used are more random, thereby further enhancing the privacy of communication. The random algorithm can ensure that each service port is used as evenly as possible.

[0100] In an optional embodiment, when the VPN client uses a static allocation strategy to determine the target port number in the VPN message, a service port number can be specified from the M service port numbers through a balancing strategy as the binding port number of the application on the VPN client, wherein the balancing strategy is used to ensure that the M service port numbers are evenly allocated to different applications for use; when the plaintext message generated by the application is encapsulated as the VPN message, the binding port number of the application is used as the target port number of the VPN message.

[0101] Optionally, the dynamic allocation scheme disrupts the ports of VPN messages, has a certain degree of concealment, and is more evenly dispersed, but its disadvantage is that it is not easy to track and locate network problems, and requires a certain amount of storage. The advantage of the static allocation scheme provided by the present application is that it can be relatively easy to track communication problems based on data flows, and it occupies less memory. Among them, the core content of the static allocation scheme is to set a VPN client to use a specific service port.

[0102] Optionally. The static allocation scheme tries to make the number of ports in the port pool evenly used by different VPN clients. For example, if there are M available service port numbers and there are J VPN clients at present, try to make each port used by J / M VPN clients. After the VPN tunnel negotiation is completed, the static allocation scheme determines the service port corresponding to each VPN client and records the source and destination ports of the VPN message corresponding to the client. The core of the static allocation scheme is to allocate a service port to each VPN client, and all plaintext messages generated by all applications on each VPN client are encapsulated according to the service port assigned to the VPN client.

[0103] In an optional embodiment, Figure 7 is an optional timing diagram of message transmission based on a static allocation strategy according to an embodiment of the present application, such as Figure 7 As shown, the following steps are included:

[0104] Step S701, the VPN client completes VPN negotiation with the VPN server;

[0105] Step S702, the VPN server allocates a target port number to the VPN client according to the VPN negotiation result, and records the source port number of the VPN client;

[0106] Step S703, the VPN client encapsulates the VPN message according to the assigned target port number, and sends the encapsulated VPN message to the VPN server;

[0107] Step S704, the VPN server decapsulates the received VPN message and forwards the decapsulated VPN message to the resource server;

[0108] Step S705, the resource server generates a reply message in plain text according to the received VPN message;

[0109] Step S706, the VPN server receives the reply message from the resource server, and encapsulates the reply message according to the recorded source port number of the VPN client;

[0110] Step S707: The VPN client decapsulates the reply message sent by the VPN server.

[0111] As can be seen from the above content, the present application provides a static allocation solution and sets a VPN client to use a specific service port, so that VPN messages can be diverted using fewer memory resources. At the same time, communication problems can be easily tracked based on data flows, thereby improving the efficiency of solving communication failures.

[0112] In an optional embodiment, after the fixed service port number in the VPN message is changed to the target port number by using the dynamic allocation strategy or the static allocation strategy, the VPN message may be sent to the VPN server by the VPN client, and then the VPN server performs an inspection operation on the VPN message, wherein the inspection operation includes at least one of the following operations:

[0113] Check whether the destination port number of the VPN message received by the VPN server is any service port number among the M service port numbers;

[0114] Check whether the header data of the VPN message received by the VPN server is the header data of a normal VPN message;

[0115] Check whether the information in the VPN message received by the VPN server meets the information restriction condition set in the VPN server.

[0116] Optionally, the inspection operation includes but is not limited to: checking whether the message received by the VPN server is a VPN message, wherein whether it is a VPN message can be determined by checking the SSL header of the VPN message; checking whether the target service port number in the message received by the VPN server is in the port pool, if so, proceed to the next step, otherwise discard the message; if the VPN server is configured with restrictions on the client IP, carried information, etc., perform corresponding checks; decrypt the message, and record the source and destination port information corresponding to the message based on session or other methods, and forward the message traffic.

[0117] It should be noted that, through the above-mentioned checking operation, it is possible to timely determine whether an abnormality occurs in the VPN message during the data transmission process, thereby improving the stability and security of the data transmission of the VPN message.

[0118] In an optional embodiment, when it is detected that the dynamic allocation strategy and the static allocation strategy are not enabled, the plaintext messages generated by T applications among the K applications are encapsulated as the VPN messages through a first transmission protocol and transmitted, and the plaintext messages generated by applications other than the T applications among the K applications are encapsulated as the VPN messages through a second transmission protocol and transmitted, wherein the first transmission protocol is a protocol that does not rely on a service port number for data transmission, the second transmission protocol is a protocol that relies on a service port number for data transmission, K is an integer greater than 1, and T is a positive integer less than K.

[0119] Optionally, in many networks, due to the existence of policies and rules on each node of the network environment, some ports may have usage restrictions or usage conflicts. In order to avoid conflicts with ports of other functions, the configurable range of the port pool is usually limited. In addition, opening a large number of ports also reduces the security of the VPN server. In order to solve the above problems, as a supplementary solution, based on the two port allocation schemes of dynamic allocation scheme and static allocation scheme, the embodiment of the present application also provides a protocol dispersion scheme, wherein the protocol dispersion scheme uses the ICMP message protocol (corresponding to the first transmission protocol mentioned above) instead of the UDP message protocol (corresponding to the second transmission protocol mentioned above) to encapsulate plaintext traffic. The protocol dispersion scheme is suitable for each node in the network to limit the UDP message rate of a single port lower than the limit on the ICMP message, which is usually more common in actual application scenarios.

[0120] Optionally, after the VPN client and the VPN server complete the VPN tunnel negotiation, it can be determined whether the VPN client adopts the protocol dispersion scheme. After the protocol dispersion scheme is enabled, ICMP messages are used to carry part of the encrypted plaintext traffic, and the port allocation scheme based on UDP messages is no longer used to carry all the encrypted plaintext traffic.

[0121] Optionally, after using the protocol dispersion solution, the overall structure of the VPN message is as shown in Table 3:

[0122] Table 3

[0123]

[0124]

[0125] Optionally, as a supplementary solution, the protocol dispersion solution should set certain restrictions, such as allowing a maximum of T applications to use the ICMP protocol as the protocol for encapsulating messages to avoid being identified as ICMP traffic anomalies by network nodes. The remaining other applications still use the UDP protocol as the protocol for encapsulating messages, and a dynamic allocation strategy or a static allocation strategy can be used to allocate service port numbers for VPN messages.

[0126] In an optional embodiment, Figure 8 is a timing diagram of VPN message transmission using an optional protocol dispersion solution according to an embodiment of the present application, such as Figure 8 As shown, the following steps are included:

[0127] Step S801, the VPN client and the VPN server complete VPN negotiation;

[0128] Step S802, the VPN server determines, according to the VPN negotiation result, that T applications on the VPN client use the ICMP protocol to encapsulate messages;

[0129] Step S803, the VPN client uses the ICMP protocol to encapsulate the VPN messages generated by the T applications, and sends the encapsulated VPN messages to the VPN server;

[0130] Step S804, the VPN server decapsulates the received VPN message and forwards the decapsulated VPN message to the resource server;

[0131] Step S805, the resource server generates a reply message in plain text according to the received VPN message;

[0132] Step S806, the VPN server uses the ICMP protocol to encapsulate the reply messages corresponding to the T applications;

[0133] Step S807: The VPN client decapsulates the reply message received from the VPN server.

[0134] From the above content, it can be seen that by using a protocol dispersion solution, when there is too much plaintext traffic, a part of the plaintext traffic can be encapsulated and transmitted using a protocol that does not rely on the server port number for data transmission, thereby avoiding the problem of easily triggering alarms or packet loss in intermediate network nodes due to a large amount of traffic concentrated on one port.

[0135] It can be seen that, through the technical solution of the present application, based on the dispersed ports in the port pool, the service ports are allocated to the VPN messages in combination with the dynamic allocation strategy or the static allocation strategy, thereby solving the problem of triggering the alarm or packet loss of the intermediate network node by using one port in the VPN message concentration. In addition, by using the protocol dispersion solution of ICMP message encapsulation, ICMP messages can be used to replace part of the UDP messages, thereby making up for the situation of insufficient service ports.

[0136] Based on the foregoing embodiment, the embodiment of the present application provides another VPN transmission method with a VPN server as an execution subject, wherein the VPN server receives a VPN message including a target port number sent by a VPN client through a target service port, wherein the target port number is a service port number corresponding to the target service port determined by the VPN client from M service port numbers according to a dynamic allocation strategy or a static allocation strategy, the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

[0137] Optionally, the VPN message transmission method further includes: the VPN server detecting whether each of the N VPN messages received includes a target identifier, wherein the N VPN messages are messages obtained by the VPN client encapsulating N plaintext messages of the same application; when it is detected that each VPN message includes a target identifier, the N VPN messages are forwarded in sequence according to a sequence number in each VPN message until each VPN message is forwarded to the resource server, wherein the sequential forwarding is used to ensure that the N VPN messages after decapsulation are sent from the VPN server in sequence of sequence numbers.

[0138] Optionally, in the process of forwarding the N VPN messages in sequence according to the sequence number in each VPN message, the VPN server stores the N VPN messages in N storage units according to the sequence number order in each VPN message; and forwards the VPN messages in the N storage units in sequence according to the sequence number order.

[0139] Optionally, the VPN message transmission method further includes: the VPN server performs an inspection operation on the VPN message, wherein the inspection operation includes at least one of the following operations:

[0140] Check whether the destination port number of the VPN message received by the VPN server is any one of the M service port numbers;

[0141] Checking whether the header data of the VPN message received by the VPN server is the header data of a normal VPN message;

[0142] Check whether the information in the VPN message received by the VPN server meets the information restriction condition set in the VPN server.

[0143] It should be noted that the present application changes the fixed service port number in the VPN message to the target port number by adopting a dynamic allocation strategy or a static allocation strategy, wherein the dynamic allocation strategy is used to randomly select a service port number from M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from M service port numbers as the target port number. It should be noted that, whether the dynamic allocation strategy or the static allocation strategy is adopted, the purpose of no longer centrally using a fixed service port for the transmission of multiple VPN messages can be achieved, thereby solving the technical problem that the VPN message will be transmitted to the same specific service port in the prior art, which easily triggers the security alarm of the intermediate network node and the packet loss, thereby achieving the technical effect of improving the transmission stability of a large number of VPN messages.

[0144] In an optional embodiment, in the process of determining the target port number in the VPN message by the VPN client using the dynamic allocation policy, when encapsulating the i-th plaintext message among N plaintext messages generated by the same application into the i-th VPN message, the VPN client may randomly select a service port number from the M service port numbers as the target port number in the i-th VPN message, wherein N is an integer greater than 1, and i is a positive integer less than or equal to N. For example, for 100 plaintext messages generated by the same application, for each plaintext message, a service port number is randomly selected from the M service port numbers for encapsulating the message into a VPN message, assuming that M is an integer greater than or equal to 100, then the corresponding service port number in each of the 100 VPN messages may be different.

[0145] However, the above-mentioned VPN message transmission method is to disperse the plaintext traffic of the same application into multiple data streams. However, if the VPN server cannot guarantee the order of message transmission, there will be a problem of message sequence preservation on the resource server side. In order to solve this problem, the VPN client can assign a sequence number to the plaintext traffic and add a special identifier (i.e., the target identifier) ​​when encapsulating the plaintext traffic.

[0146] Optionally, the VPN message is decapsulated after arriving at the VPN server, and then the VPN server performs the above-mentioned inspection operation on the received VPN message. After the VPN server recognizes the special identifier, it forwards the VPN message in sequence until it reaches the resource server. There are many ways to implement sequential forwarding, the purpose of which is to ensure that the decapsulated traffic is sent from the VPN server and other intermediate network devices in sequence. For example, the VPN server is pre-set with P storage units, where P is an integer greater than or equal to N. After the 1st to Nth VPN messages arrive at the VPN server (the arrival order is out of sequence), the VPN server stores the 1st to Nth VPN messages in the N storage units in sequence, and then forwards the VPN messages in the N storage units in sequence.

[0147] It should be noted that the in-order forwarding ensures that the VPN messages can be processed in the correct order, thereby achieving the technical effect of ensuring the accuracy of data transmission.

[0148] According to another aspect of the embodiment of the present application, a VPN message transmission device is also provided, wherein: Fig. 9 is a schematic diagram of an optional VPN message transmission device according to an embodiment of the present application, such as Fig. 9 As shown, the VPN message transmission device includes: a determination unit 901 and a transmission unit 902.

[0149] Optionally, the determination unit 901 is used to determine the target port number in the VPN message from M service port numbers using a dynamic allocation strategy or a static allocation strategy through a VPN client, wherein the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1; the transmission unit 902 is used for the VPN client to transmit the VPN message to the VPN server according to the target port number.

[0150] Optionally, the determination unit 901 includes: a first processing subunit, configured to control the VPN client to randomly select a service port number from the M service port numbers as the target port number in each VPN message when all plaintext messages generated by the same application are encapsulated into VPN messages, or to control the VPN client to randomly select a service port number from the M service port numbers as the target port number in the i-th VPN message when an i-th plaintext message among N plaintext messages generated by the same application is encapsulated into an i-th VPN message, wherein N is an integer greater than 1 and i is a positive integer less than or equal to N.

[0151] Optionally, the VPN message transmission device also includes: a processing unit, which is used to encapsulate the plaintext messages generated by T applications among the K applications into the VPN messages through a first transmission protocol and transmit them when it is detected that the dynamic allocation strategy and the static allocation strategy are not enabled; and encapsulate the plaintext messages generated by applications other than the T applications among the K applications into the VPN messages through a second transmission protocol and transmit them, wherein the first transmission protocol is a protocol that does not rely on a service port number for data transmission, the second transmission protocol is a protocol that relies on a service port number for data transmission, K is an integer greater than 1, and T is a positive integer less than K.

[0152] Optionally, the determination unit 901 includes: a second processing subunit and a third processing subunit, wherein the second processing subunit is used to specify a service port number from the M service port numbers as a binding port number of the application on the VPN client through a balancing strategy, wherein the balancing strategy is used to ensure that the M service port numbers are evenly allocated to different applications for use; and the third processing subunit is used to use the binding port number of the application as the target port number of the VPN message when encapsulating the plaintext message generated by the application into the VPN message.

[0153] According to another aspect of the present application, another VPN message transmission device is provided, wherein: Fig.10 is a schematic diagram of another optional VPN message transmission device according to an embodiment of the present application, such as Fig.10As shown, the VPN message transmission device includes: a message transmission unit 1001. The message transmission unit 1001 is used to control the VPN server to receive the VPN message containing the target port number sent by the VPN client through the target service port, wherein the target port number is a service port number corresponding to the target service port determined by the VPN client from M service port numbers according to a dynamic allocation strategy or a static allocation strategy, the service port number is a server port number used by the VPN message outer layer transmission protocol, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

[0154] Optionally, the VPN message transmission device further includes: a detection unit and a sequence forwarding unit. The detection unit is used to control the VPN server to detect whether each of the N VPN messages received includes a target identifier, wherein the N VPN messages are messages obtained by the VPN client encapsulating N plaintext messages of the same application; the sequence forwarding unit is used to, when detecting that each VPN message includes a target identifier, sequentially forward the N VPN messages according to the sequence number in each VPN message until each VPN message is forwarded to the resource server, wherein the sequence forwarding is used to ensure that the N VPN messages after decapsulation are sent from the VPN server in sequence of sequence numbers.

[0155] Optionally, the sequential forwarding unit includes: a storage subunit and a forwarding subunit. The storage subunit is used to store the N VPN messages in the N storage units according to the sequence number sequence in each VPN message; the forwarding subunit is used to sequentially forward the VPN messages in the N storage units according to the sequence number sequence.

[0156] Optionally, the VPN message transmission device further includes: a message inspection unit, used to control the VPN server to perform an inspection operation on the VPN message, wherein the inspection operation includes at least one of the following operations: checking whether the target port number of the VPN message received by the VPN server is any one of the M service port numbers; checking whether header data of the VPN message received by the VPN server is header data of a normal VPN message; and checking whether information in the VPN message received by the VPN server meets information restriction conditions set in the VPN server.

[0157] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any one of the above VPN message transmission methods when running.

[0158] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are implemented to run the programs, wherein the program is configured to execute any one of the above-mentioned VPN message transmission methods when running.

[0159] Fig.11 is a schematic diagram of an optional electronic device according to an embodiment of the present application, such as Fig.11 As shown, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, any one of the above VPN message transmission methods is implemented.

[0160] The above-mentioned embodiments or examples disclosed in the present application are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection disclosed in the present application. In the absence of contradiction, each step in a certain embodiment or example in the present application can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0161] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0162] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0163] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0167] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A VPN message transmission method, characterized in that: include: The VPN client uses a dynamic allocation strategy or a static allocation strategy to determine a target port number in a VPN message from M service port numbers, wherein the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1; The VPN client transmits the VPN message to the VPN server according to the target port number.

2. The VPN message transmission method according to claim 1, characterized in that: The VPN client uses a dynamic allocation strategy to determine the destination port number in the VPN message from the M service port numbers, including: When encapsulating all plaintext messages generated by the same application into VPN messages, the VPN client randomly selects a service port number from the M service port numbers as the target port number in each VPN message, or, When encapsulating an i-th plaintext message among N plaintext messages generated by the same application into an i-th VPN message, the VPN client randomly selects a service port number from the M service port numbers as a target port number in the i-th VPN message, where N is an integer greater than 1 and i is a positive integer less than or equal to N.

3. The VPN message transmission method according to claim 1, characterized in that: The VPN message transmission method further includes: In the case where it is detected that the dynamic allocation strategy and the static allocation strategy are not enabled, encapsulating the plaintext messages generated by T applications among the K applications into the VPN messages through the first transmission protocol and transmitting the messages; and The plaintext messages generated by the applications other than the T applications among the K applications are encapsulated as the VPN messages and transmitted through the second transmission protocol, wherein the first transmission protocol is a protocol that does not rely on a service port number for data transmission, the second transmission protocol is a protocol that relies on a service port number for data transmission, K is an integer greater than 1, and T is a positive integer less than K.

4. The VPN message transmission method according to claim 1, characterized in that: The VPN client uses a static allocation strategy to determine the destination port number in the VPN message from the M service port numbers, including: Specifying a service port number from the M service port numbers as a binding port number of the application on the VPN client through a balancing strategy, wherein the balancing strategy is used to ensure that the M service port numbers are evenly allocated to different application programs for use; When the plaintext message generated by the application is encapsulated into the VPN message, the binding port number of the application is used as the target port number of the VPN message.

5. A VPN message transmission method, characterized in that: include: The VPN server receives a VPN message including a target port number sent by a VPN client through a target service port, wherein the target port number is a service port number corresponding to the target service port determined by the VPN client from M service port numbers according to a dynamic allocation strategy or a static allocation strategy, the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

6. The VPN message transmission method according to claim 5, characterized in that: The VPN message transmission method further includes: The VPN server detects whether each of the N VPN messages received includes a target identifier, wherein the N VPN messages are messages obtained by the VPN client encapsulating N plaintext messages of the same application; In the case where it is detected that each VPN message includes a target identifier, the N VPN messages are forwarded in sequence according to the sequence number in each VPN message until each VPN message is forwarded to the resource server, wherein the sequential forwarding is used to ensure that the N VPN messages after decapsulation are sent from the VPN server in sequence of the sequence numbers.

7. The VPN message transmission method according to claim 6, characterized in that: Forwarding the N VPN messages in sequence according to the sequence number in each VPN message includes: Storing the N VPN messages in N storage units according to the sequence number in each VPN message; The VPN messages in the N storage units are forwarded in sequence according to the sequence number.

8. The VPN message transmission method according to claim 5, characterized in that: The VPN message transmission method further includes: The VPN server performs a check operation on the VPN message, wherein the check operation includes at least one of the following operations: Check whether the destination port number of the VPN message received by the VPN server is any one of the M service port numbers; Checking whether the header data of the VPN message received by the VPN server is the header data of a normal VPN message; Check whether the information in the VPN message received by the VPN server meets the information restriction condition set in the VPN server.

9. A VPN message transmission device, characterized in that: include: a determining unit, configured to determine a target port number in a VPN message from M service port numbers by using a dynamic allocation strategy or a static allocation strategy through a VPN client, wherein the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1; A transmission unit is used for the VPN client to transmit the VPN message to the VPN server according to the target port number.

10. A VPN message transmission device, characterized in that: include: A message transmission unit, used for a VPN server to receive a VPN message including a target port number sent by a VPN client through a target service port, wherein the target port number is a target port number corresponding to the target service port determined by the VPN client from M service port numbers according to a dynamic allocation strategy or a static allocation strategy, the service port number is a server port number used by an outer layer transmission protocol of the VPN message, the dynamic allocation strategy is used to randomly select a service port number from the M service port numbers as the target port number, and the static allocation strategy is used to specify a service port number from the M service port numbers as the target port number, and M is an integer greater than 1.

Citation Information

Cited By

  • Network link fault troubleshooting method, device, equipment and vehicle

    CN121567554A