A method, apparatus, device and medium for data forwarding

By using a bridge in the SSLVPN gateway to learn the client's target address and forward data, the problem of low data transmission efficiency and packet loss caused by the performance limitations of Tun devices is solved, and efficient and reliable data forwarding is achieved.

CN117640495BActive Publication Date: 2026-07-24BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING TOPSEC NETWORK SECURITY TECH
Filing Date
2023-11-29
Publication Date
2026-07-24

Smart Images

  • Figure CN117640495B_ABST
    Figure CN117640495B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data forwarding method, device, equipment and medium. The method is applied to a data forwarding device, the data forwarding device comprises a working process, a TAP device and a bridge. The method comprises the following steps: the bridge broadcasts a request address message in the case that a target address corresponding to a reply message is not queried, wherein the request address message is used to learn the target address of a client, and the reply message is a message returned by a server to the client; if the working process receives the request address message through the TAP device, all clients are queried based on the request address message; in the case that the target address of the client is determined to be queried, a reply address message is sent to the bridge, and the bridge performs data forwarding based on the reply address message. Through some embodiments of the present application, the learning of the target address of the client can be realized, thereby improving the efficiency of data forwarding and preventing the occurrence of packet loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission, specifically to a method, apparatus, device, and medium for data forwarding. Background Technology

[0002] An SSL VPN gateway is a VPN device that establishes a secure remote access channel based on the Secure Sockets Layer (SSL) protocol. It utilizes the SSL protocol to establish a secure and trusted data transmission channel within a shared network. In related technologies, the working process within the SSL VPN gateway decrypts client traffic and sends the decrypted traffic to the protocol stack via a bound Tun device. The traffic is then sent to the server through a physical interface. However, when a large number of clients are online, exceeding the performance limits of the Tun device itself, server response packets may be processed by other CPUs, leading to other working processes handling the packets. This not only affects data transmission efficiency but also increases the risk of packet loss.

[0003] Therefore, improving data transmission efficiency and preventing packet loss have become problems that need to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for data forwarding. Through some embodiments of this application, at least the target address of the client can be learned, thereby improving the efficiency of data forwarding and preventing packet loss.

[0005] In a first aspect, this application provides a data forwarding method applied to a data forwarding device, the data forwarding device including a worker process, a TAP device, and a bridge, the method comprising: if the bridge does not find a target address corresponding to a reply message, it broadcasts a request address message, wherein the request address message is used to learn the target address of the client, and the reply message is a message sent by the server to the client; if the worker process receives the request address message through the TAP device, it queries all clients based on the request address message; if it determines that the target address of the client has been found, it sends a reply address message to the bridge, and the bridge forwards data based on the reply address message.

[0006] Therefore, unlike the related technologies where the working process within the SSLVPN gateway decrypts client traffic and sends the decrypted traffic to the protocol stack via the bound tun device, and then sends it to the server via the physical interface, the embodiments of this application implement the learning of the client's target address and forward data based on the reply address packet through the bridge, which can improve the efficiency of data forwarding and prevent packet loss.

[0007] In conjunction with the first aspect, in one embodiment of this application, the bridge forwards data based on the reply address message, including: sending the reply address message to the worker process; the worker process forwarding the reply message to the corresponding client through a VPN tunnel.

[0008] Therefore, in this embodiment of the application, the reply address message is sent to the working process, and the working process forwards the reply message to the client, which can ensure that all messages can accurately correspond to a client, thereby preventing packet loss.

[0009] In conjunction with the first aspect, in one embodiment of this application, the target address is a MAC address. Before the bridge broadcasts a request address message when it does not find a target address corresponding to the reply message, the method further includes: the worker process receiving a request message sent by the client to the server, and constructing the MAC address based on the client's virtual IP address; sending the MAC address to the bridge through the TAP device; and the bridge sending the request message to the server.

[0010] Therefore, by constructing a MAC address, the embodiments of this application enable the bridge to send request packets to the server according to the MAC address, thereby preventing data packet loss while ensuring data security.

[0011] In conjunction with the first aspect, in one embodiment of this application, before the worker process receives the request message sent by the client to the server, the method further includes: the worker process storing the virtual IP address of the client, and then encapsulating a test message; broadcasting the test message to the network through a TAP device; and the bridge automatically learning the MAC address of the client based on the test message.

[0012] Therefore, this application embodiment learns the client's MAC address by broadcasting test messages to the network, which can improve the data forwarding efficiency when a large number of clients come online concurrently.

[0013] Secondly, this application provides a data forwarding apparatus applied to a data forwarding device. The data forwarding device includes a worker process, a TAP device, and a bridge. The apparatus includes: a message broadcasting module configured to broadcast a request address message when the bridge does not find a target address corresponding to a reply message, wherein the request address message is used to learn the target address of the client, and the reply message is a message sent by the server to the client; an address querying module configured to query all clients based on the request address message if the worker process receives the request address message through the TAP device; and a data forwarding module configured to send a reply address message to the bridge when the target address of the client is found, and the bridge forwards data based on the reply address message.

[0014] In conjunction with the second aspect, in one embodiment of this application, the data forwarding module is further configured to: send the reply address message to the working process; the working process forwards the reply message to the corresponding client through a VPN tunnel.

[0015] In conjunction with the second aspect, in one embodiment of this application, the message broadcast module is further configured to: the worker process receives a request message sent by the client to the server, and constructs the MAC address based on the client's virtual IP address; sends the MAC address to the bridge through the TAP device; and the bridge sends the request message to the server.

[0016] In conjunction with the second aspect, in one embodiment of this application, the message broadcasting module is further configured as follows: the working process stores the virtual IP address of the client, and then encapsulates a test message; broadcasts the test message to the network through a TAP device; and the bridge automatically learns the MAC address of the client based on the test message.

[0017] Thirdly, this application provides an electronic device, including: a processor, a memory, and a bus; the processor is connected to the memory via the bus, the memory stores a computer program, and the computer program, when executed by the processor, can implement the method as described in any embodiment of the first aspect.

[0018] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed, can perform the methods described in any embodiment of the first aspect. Attached Figure Description

[0019] Figure 1 This is a schematic diagram illustrating the device composition for data forwarding in an embodiment of this application;

[0020] Figure 2 This is one of the flowcharts illustrating a data forwarding method according to an embodiment of this application;

[0021] Figure 3 This is a second flowchart illustrating a data forwarding method according to an embodiment of this application;

[0022] Figure 4 This is a schematic diagram illustrating the composition of a data forwarding apparatus according to an embodiment of this application;

[0023] Figure 5 This is a schematic diagram illustrating the composition of an electronic device according to an embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the protection scope of this application.

[0025] The embodiments of this application can be applied to scenarios of data forwarding between clients and servers. In order to improve the problems in the background art, in some embodiments of this application, when the bridge does not find the target address corresponding to the reply message, it broadcasts a request address message to the network, thereby learning the target address of the client, and then performs data forwarding operation when it is determined that the target address of the client has been found.

[0026] The method steps in the embodiments of this application are described in detail below with reference to the accompanying drawings.

[0027] Figure 1 This application provides devices for implementing data forwarding in some embodiments, including a client 110, a data forwarding device 160, and a server 150. The data forwarding device 160 includes a worker process 120, a TAP device 130, and a bridge 140. The client 110 is connected to the worker process 120, the worker process 120 is connected to the TAP device 130, the TAP device 130 is connected to the bridge 140, and the bridge 140 is connected to the server 150.

[0028] The following example, using a data forwarding device, illustrates a data forwarding method performed by the data forwarding device in this application.

[0029] In related technologies, bridges, TAP devices, and Tun devices are all virtual network devices. Tun / TAP devices operate on the basis of kernel virtualization technology. When a user-space program opens a Tun / TAP device file, the kernel creates a corresponding virtual device and associates it with the user-space program. The user-space program can interact with the virtual device by reading and writing the device file. Tun and TAP devices differ in principle: Tun devices are designed to process IP packets, while TAP devices are designed to process Ethernet frames. In other words, Tun devices operate at the network layer, while TAP devices operate at the data link layer. A bridge is a logical interface that can bridge multiple physical interfaces and TAP devices, integrating different network interfaces to form a virtual network.

[0030] In related technologies, the client authenticates with the SSLVPN gateway. The client initiates resource access to the server, and the encrypted traffic reaches the SSLVPN gateway through the VPN tunnel. Subsequently, the worker process within the SSLVPN gateway decrypts the client traffic and sends the decrypted traffic to the protocol stack via the bound tun device. The protocol stack performs routing decisions and source NAT, replacing the virtual client IP address with the IP address of the physical interface from which the packet will be sent, and then forwarding it to the server through that physical interface.

[0031] This application relates to the field of data security technology and discloses a method for bridging SSL VPN traffic forwarding. To address the issues of client traffic crossing cores and packet dropping due to the absence of session data between the current client and the SSL VPN during the workflow, this application utilizes a bridge to bridge multiple TAP devices, enabling client traffic forwarding across multi-core devices. Therefore, this application aims to solve the client traffic crossing cores problem by using a bridge to forward SSL VPN traffic.

[0032] The above technical solution has a problem with client traffic crossing cores. When a large number of clients are online, the performance parameters of the Tun device itself are exceeded. Occasionally, the server's reply message will be processed by other CPUs, which will cause the message to be processed by other worker processes. However, the other worker processes do not have the session data established between the client and SSLVPN, so the message is dropped.

[0033] At least in order to solve the problems in the background technology, such as Figure 2 As shown, some embodiments of this application provide a data forwarding method, the method comprising:

[0034] S210, if the bridge cannot find the target address corresponding to the reply message, it broadcasts a request address message.

[0035] It should be noted that the request address message is used to learn the client's target address, while the reply message is the message sent by the server to the client. Specifically, during data interaction between the client and server, the client sends a request message to the server through the data forwarding device. After processing the request message, the server generates a reply message, which is then sent to the client through the data forwarding device between the client and the server.

[0036] It is understood that the data forwarding device in this application can be an SSL VPN gateway. SSL VPN traffic forwarding based on a bridge can be accomplished by the client, the SSL VPN gateway, and the server. Specifically, the client initiates authentication to the SSL VPN gateway and establishes a secure and trusted data transmission channel, then accesses the server through this channel. The SSL VPN gateway processes authentication requests from clients, and for clients that have completed authentication, forwards their traffic within the tunnel to the server. The server processes the access traffic from clients.

[0037] In one embodiment of this application, before the worker process receives the request message sent by the client to the server, the worker process stores the client's virtual IP address, then encapsulates a test message, and broadcasts the test message to the network through the TAP device. The bridge automatically learns the client's MAC address based on the test message.

[0038] Therefore, this application embodiment learns the client's MAC address by broadcasting test messages to the network, which can improve the data forwarding efficiency when a large number of clients come online concurrently.

[0039] In other words, to improve data forwarding efficiency when clients connect to the network simultaneously with a large number of concurrent connections, the bridge needs to learn the client's MAC address before data transmission can occur. This process involves two parts: the client and the SSLVPN worker process. Specifically, the client initiates authentication with the SSLVPN gateway and establishes a secure and trusted data transmission channel, then accesses the server through this channel. Afterward, the SSLVPN worker process processes the authentication request from the client. For clients that have successfully completed authentication, it encapsulates the corresponding test packet (i.e., a gratuitous ARP packet) and sends it out through the TAP device. That is, after the client and the corresponding worker process successfully authenticate each other, the worker process sends the gratuitous ARP packet to the bridge through the TAP device.

[0040] In one specific embodiment of this application, the client first authenticates with the SSLVPN gateway. Then, after the worker process in the SSLVPN gateway stores the client's virtual IP address, it proactively encapsulates a gratuitous ARP packet and broadcasts it to the network via the TAP device. Finally, upon receiving the gratuitous ARP packet, the bridge proactively learns the current client's MAC address to determine it before data transmission, thereby improving data forwarding efficiency.

[0041] In one embodiment of this application, the target address is a MAC address. Since the client needs to send the request message to the server first, before S210, the process further includes: first, the working process receives the request message sent by the client to the server, constructs a MAC address based on the client's virtual IP address, then sends the MAC address to the bridge through the TAP device, and finally, the bridge sends the request message to the server.

[0042] Therefore, by constructing a MAC address, the embodiments of this application enable the bridge to send request packets to the server according to the MAC address, thereby preventing data packet loss while ensuring data security.

[0043] In other words, when a client sends a request message to a server, the worker process corresponding to the current client receives the request message sent by the client to the server. After decrypting the request message, it constructs a MAC address for the decrypted file based on the client's virtual IP address, and then sends the MAC address to the TAP device, which then sends it to the bridge, and the bridge sends the request message to the server.

[0044] It should be noted that one client corresponds to one working process and one TAP device, while multiple clients correspond to one bridge. In other words, when the TAP devices corresponding to multiple clients transmit messages to the server, the messages from multiple clients are all concentrated in one bridge. This bridge sends the request message to the server. Similarly, when the server sends a reply message to the client, it forwards it through this bridge to the TAP device and working process corresponding to each client.

[0045] As a specific embodiment of this application, such as Figure 3As shown, client A and worker process 1 authenticate each other and communicate in encrypted form. Worker process 1 communicates in plaintext with the TAP device. The TAP device forwards the message to the bridge, and then the bridge sends the message to the server. Client B and worker process 2 authenticate each other and communicate in encrypted form. Worker process 2 communicates in plaintext with the TAP device. The TAP device forwards the message to the bridge, and then the bridge sends the message to the server. Client C and worker process 3 authenticate each other and communicate in encrypted form. Worker process 3 communicates in plaintext with the TAP device. The TAP device forwards the message to the bridge, and then the bridge sends the message to the server.

[0046] The specific steps are as follows:

[0047] When S1, the SSLVPN gateway starts, it bridges all TAP devices created by the worker processes.

[0048] S2, configure the client virtual IP address pool and specify the gateway address of the address pool. The gateway address will be configured as the IP address of the bridge.

[0049] After the S3 SSLVPN gateway is started, the client completes authentication on the SSLVPN gateway.

[0050] S4: The client initiates access to the server's resources, and the traffic is encrypted and then passes through the VPN tunnel to the SSLVPN gateway.

[0051] S5, the working process within the SSLVPN gateway decrypts the client traffic and encapsulates the decrypted message with an Ethernet header. The source MAC is a MAC address constructed based on the client's virtual IP, and the destination MAC is the bridge's MAC address. Then, it is sent to the bridge through the TAP device created by the current working process.

[0052] S6: After receiving the packet, the bridge performs routing decisions and source NAT processing based on the destination IP in the packet. That is, it replaces the virtual client IP address with the IP address of the physical interface ethX that will send the packet, and then sends it to the server through the physical interface ethX.

[0053] S7, the service sends resource data back to the physical interface ethX. In the protocol stack, the destination IP (i.e., the IP address of the physical interface ethX) in the reply message is replaced with the client's virtual IP. Then, after routing decision, the message is sent to the bridge.

[0054] Upon receiving the reply message, the bridge (S8) queries the MAC address forwarding table based on the client's virtual IP. If the client's MAC address is not found, it broadcasts an ARP request message (or an NS message for IPv6 networks) to learn the client's MAC address. If the client's MAC address is found, the bridge forwards the message to the client's worker process for processing.

[0055] It is understandable that ARP stands for Address Resolution Protocol, NS stands for Neighbor Solicitation, and NA stands for Neighbor Advertisement.

[0056] S220: If the working process receives a request address message through the TAP device, it queries all clients based on the request address message.

[0057] S230: If the target address of the client is found, a reply address message is sent to the bridge, and the bridge forwards the data based on the reply address message.

[0058] In one embodiment of this application, the specific steps of the bridge forwarding data based on the reply address message include: sending the reply address message to the working process, and then the working process forwarding the reply message to the corresponding client through the VPN tunnel.

[0059] In other words, when the worker process receives a request address message, it means that the current message can be mapped to the corresponding client, and the worker process forwards the reply message to the corresponding client through the VPN tunnel. If the worker process does not receive a request address message, it means that the current message cannot be mapped to a client, and it discards it.

[0060] Therefore, in this embodiment of the application, the reply address message is sent to the working process, and the working process forwards the reply message to the client, which can ensure that all messages can accurately correspond to a client, thereby preventing packet loss.

[0061] Specifically, if a worker process receives an ARP request or NS message from the bridge via the TAP device, it queries the client data that has been authenticated in this process based on the IP address. If the client is found, it constructs an ARP reply message (or an NA message for IPv6 networks) informing the client of its MAC address. If the client is not found, the ARP request or NS message is discarded. Afterwards, upon receiving the ARP reply or NA message, the bridge completes MAC address learning for the client and then forwards the message to the worker process to which the client belongs. This worker process encrypts the received data packet and sends it to the client through the VPN tunnel.

[0062] Therefore, unlike the related technologies where the working process within the SSLVPN gateway decrypts client traffic and sends the decrypted traffic to the protocol stack via the bound tun device, and then sends it to the server via the physical interface, the embodiments of this application implement the learning of the client's target address and forward data based on the reply address packet through the bridge, which can improve the efficiency of data forwarding and prevent packet loss.

[0063] Therefore, in this application, after receiving a message from the client, the working process of the SSLVPN gateway needs to add an Ethernet header before sending the message to the bridge via the TAP device. ARP or NS messages do not enter the VPN tunnel. When the bridge sends an ARP request or NS message, the working process needs to respond to the ARP request or NS message on behalf of the client. To ensure that the server's response message can be correctly sent to the SSLVPN gateway, the message from the client to the server needs to undergo source NAT, replacing the client's IP address with the outgoing interface IP address of the SSLVPN gateway.

[0064] Therefore, the data forwarding method provided in this application completes SSLVPN traffic forwarding through a bridge, which solves the cross-core traffic problem that occurs in the scheme of implementing SSLVPN traffic forwarding based on Tun devices. That is, when a large number of clients are online, there will be no packet loss or traffic interruption problem.

[0065] The above describes a specific embodiment of a data forwarding method; the following describes a data forwarding apparatus.

[0066] like Figure 4 As shown, some embodiments of this application provide a data forwarding apparatus 400, which includes a message broadcasting module 410, an address lookup module 420, and a data forwarding module 430.

[0067] The message broadcast module 410 is configured to broadcast a request address message when the bridge does not find a target address corresponding to the reply message, wherein the request address message is used to learn the target address of the client, and the reply message is a message sent by the server to the client; the address query module 420 is configured to query all clients based on the request address message if the worker process receives the request address message through the TAP device; the data forwarding module 430 is configured to send a reply address message to the bridge when it is determined that the target address of the client has been found, and the bridge forwards data based on the reply address message.

[0068] In one embodiment of this application, the data forwarding module 430 is further configured to: send the reply address message to the working process; and the working process forwards the reply message to the corresponding client through a VPN tunnel.

[0069] In one embodiment of this application, the message broadcast module 410 is further configured to: receive a request message sent by the client to the server, and construct the MAC address based on the client's virtual IP address; send the MAC address to the bridge through the TAP device; and send the request message to the server through the bridge.

[0070] In one embodiment of this application, the message broadcast module 410 is further configured to: store the virtual IP address of the client in the working process, and then encapsulate a test message; broadcast the test message to the network through a TAP device; and automatically learn the MAC address of the client based on the test message.

[0071] In the embodiments of this application, Figure 4 The module shown can achieve Figure 1 , Figure 2 and Figure 3 Each process in the method embodiment. Figure 4 The operations and / or functions of each module in the document are respectively designed to achieve... Figure 1 , Figure 2 and Figure 3 The corresponding processes in the method embodiments are described above. For details, please refer to the descriptions in the above method embodiments; to avoid repetition, detailed descriptions are omitted here.

[0072] like Figure 5As shown, this application provides an electronic device 500, including: a processor 510, a memory 520 and a bus 530. The processor is connected to the memory via the bus. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the method as described in any one of the above embodiments. For details, please refer to the description in the above method embodiments. To avoid repetition, detailed descriptions are appropriately omitted here.

[0073] The bus is used to enable direct communication between these components. In this embodiment, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), an On-Premises Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in this embodiment. The general-purpose processor can be a microprocessor or any conventional processor.

[0074] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory stores computer-readable instructions, which, when executed by the processor, can perform the methods described in the above embodiments.

[0075] Understandable. Figure 5 The structure shown is for illustrative purposes only and may include structures larger than those shown. Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown. Figure 5 The components shown can be implemented using hardware, software, or a combination thereof.

[0076] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a server, it implements any of the methods described in all the above embodiments. For details, please refer to the descriptions in the above method embodiments. To avoid repetition, detailed descriptions are appropriately omitted here.

[0077] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0078] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for data forwarding, characterized in that, The method is applied to a data forwarding device, which includes a worker process, a TAP device, and a bridge, wherein one client corresponds to one worker process and one TAP device, and multiple clients correspond to one bridge. If the bridge does not find a target address corresponding to the reply message, it broadcasts a request address message. The request address message is used to learn the target address of the client. The reply message is a message sent by the server to the client. If the working process receives the request address message through the TAP device, it queries all clients based on the request address message; Once the target address of the client is determined, a reply address message is sent to the bridge, and the bridge forwards data based on the reply address message.

2. The method according to claim 1, characterized in that, The bridge forwards data based on the reply address message, including: Send the reply message to the worker process; The process forwards the reply message to the corresponding client via a VPN tunnel.

3. The method according to claim 1 or 2, characterized in that, The target address is a MAC address. Before the bridge broadcasts a request address message if it does not find a target address corresponding to the reply message, the method further includes: The worker process receives the request message sent by the client to the server, and constructs the MAC address based on the client's virtual IP address; The MAC address is sent to the bridge via the TAP device; The bridge sends the request message to the server.

4. The method according to claim 3, characterized in that, Before the worker process receives the request message sent by the client to the server, the method further includes: The worker process stores the client's virtual IP address and then encapsulates a test message; The test message is broadcast to the network via the TAP device; The bridge automatically learns the client's MAC address based on the test message.

5. A data forwarding apparatus, characterized in that, An application is made in a data forwarding device, the data forwarding device comprising a worker process, a TAP device, and a bridge, wherein one client corresponds to one worker process and one TAP device, and multiple clients correspond to one bridge, the device comprising: The message broadcast module is configured to broadcast a request address message when the bridge does not find a target address corresponding to the reply message. The request address message is used to learn the target address of the client, and the reply message is a message sent by the server to the client. The address query module is configured to query all clients based on the request address message if the working process receives the request address message through the TAP device; The data forwarding module is configured to send a reply address message to the bridge when the target address of the client is found, and the bridge forwards data based on the reply address message.

6. The apparatus according to claim 5, characterized in that, The data forwarding module is also configured to: Send the reply message to the worker process; The process forwards the reply message to the corresponding client via a VPN tunnel.

7. The apparatus according to claim 5 or 6, characterized in that, The message broadcast module is also configured to: The worker process receives the request message sent by the client to the server, and constructs a MAC address based on the client's virtual IP address; The MAC address is sent to the bridge via the TAP device; The bridge sends the request message to the server.

8. The apparatus according to claim 7, characterized in that, The message broadcast module is also configured to: The worker process stores the client's virtual IP address and then encapsulates a test message; The test message is broadcast to the network via the TAP device; The bridge automatically learns the client's MAC address based on the test message.

9. An electronic device, characterized in that, include: Processor, memory, and bus; The processor is connected to the memory via the bus, and the memory stores a computer program that, when executed by the processor, can implement the method as described in any one of claims 1-4.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • US20140195666A1

  • WO2016003885A1