Network communication method and apparatus, electronic device, and storage medium
By establishing SSL tunnels and virtual network cards in network communication devices, the problems of intranet data security and access restrictions limiting the use scenarios of devices are solved, realizing secure data transmission and expanding the scope of device applicability.
Patent Information
- Application Number
- CN202211507719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-11-25
AI Technical Summary
Existing technologies present a contradiction between the security of intranet data and the limited use cases of access-restricted devices, resulting in users being unable to access internal corporate data on dedicated terminal devices that are not authorized to access the intranet.
By obtaining the target Internet Protocol address that is allowed to be accessed, an SSL tunnel is established to connect with the target device, and a virtual network card and character device are built in the network communication device to achieve secure transmission and forwarding of traffic data, reducing hardware requirements and configuration costs.
While ensuring data security, the scope of use of access restriction devices has been expanded, and the applicability of endpoint devices and the security of data transmission have been improved.
Smart Images

Figure CN115865471B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication, and in particular to a network communication method, apparatus, electronic device, and storage medium. Background Technology
[0002] An intranet is a private network established within an enterprise using Internet technology. Based on the TCP / IP protocol and with the Web as its core application, it forms a unified and convenient information exchange platform. Intranets can provide various services such as web publishing, interactive media, directories, email, wide area network (WAN) interconnection, file management, printing, and network management. Due to their powerful sharing capabilities, many enterprises set up intranets and store internal documents on intranet servers for employee access. Because intranets store a large amount of internal data, data security is of paramount importance.
[0003] To ensure data security within an intranet, access is typically restricted to designated, dedicated devices. However, due to the diverse application scenarios, employees often need intranet access but lack the necessary dedicated devices, leading to limited access. This presents a contradiction in existing technologies: ensuring data security for restricted devices within the intranet while limiting their usability in various scenarios. Summary of the Invention
[0004] The purpose of this invention is to provide a network communication method, apparatus, electronic device, and storage medium that can improve the scope of use of devices with access restrictions while ensuring data security during communication with such devices.
[0005] In a first aspect, the present invention provides a network communication method applied to a network communication device, the method comprising: obtaining a target Internet Protocol (IP) address, wherein the target IP address is an IP address that is allowed to access an endpoint device; obtaining a target device corresponding to the target IP address; establishing an SSL tunnel with the target device for communication connection; receiving traffic data sent by a source device and sending the traffic data to the target device via the SSL tunnel; and controlling the target device to send the traffic data to the endpoint device.
[0006] In some embodiments, the method further includes: establishing a VPN tunnel with the source device to establish a communication connection; receiving traffic data sent by the source device includes: receiving the traffic data sent by the source device via the VPN tunnel.
[0007] By establishing a VPN tunnel with the source device for data communication, VPN tunneling technology can effectively improve the security of data transmission between the source device and the network communication device, thereby further ensuring the data security in the destination device.
[0008] In some embodiments, establishing a VPN tunnel with the source device for communication includes: constructing a first virtual network interface card (NIC); and establishing a VPN tunnel with the source device via the first virtual NIC for communication.
[0009] By constructing a first virtual network card in the network communication device and establishing a VPN tunnel with the source device for network communication, the hardware requirements of the network communication device can be reduced, and the configuration cost of the network communication device can be reduced.
[0010] In some embodiments, receiving the traffic data sent by the source device via the VPN tunnel includes: constructing a virtual character device; receiving the traffic data from the first virtual network interface card via a protocol stack; and storing the traffic data in the virtual character device.
[0011] By constructing virtual character devices to store traffic data, the hardware requirements for network communication devices can be effectively reduced, thus lowering the purchase cost of such devices.
[0012] In some embodiments, storing the traffic data into the virtual character device includes: storing the traffic data into the virtual character device via a character driver.
[0013] In some embodiments, establishing an SSL tunnel with the target device for communication includes: controlling the target device to construct a second virtual network interface card (NIC); and establishing the SSL tunnel with the second virtual NIC via the first virtual NIC.
[0014] By constructing a second virtual network interface card (NIC) in the target device and using the second virtual NIC to build an SSL tunnel with the first virtual NIC in the network communication device, the hardware requirements of the target device can be reduced during the construction of the SSL tunnel without the need for a physical NIC, thereby further expanding the applicability of the network communication method.
[0015] In some embodiments, establishing a VPN tunnel for communication with the source device includes: establishing multiple independent VPN tunnels with multiple source devices, each VPN tunnel being connected to a separate source device.
[0016] By equipping each source device with a separate corresponding source device, data interference that may occur when multiple source devices communicate with network communication devices simultaneously can be effectively avoided, further improving the data security between source devices and network communication devices.
[0017] Secondly, embodiments of the present invention provide a network communication device, comprising: an address acquisition module, the address acquisition module being configured to acquire a target Internet Protocol (IP) address, the target IP address being an IP address that allows access to a destination device; a device acquisition module, the device acquisition module being configured to acquire a target device corresponding to the target IP address; and a communication module, the communication module being configured to establish an SSL tunnel with the target device for communication connection, the communication module being further configured to receive traffic data sent by a source device, and send the traffic data to the target device via the SSL tunnel, and control the target device to send the traffic data to the destination device.
[0018] Thirdly, embodiments of the present invention provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the network communication method as described above.
[0019] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, characterized in that the computer program is executed by a processor to implement the aforementioned network communication method.
[0020] Compared with the prior art, the network communication method, apparatus, electronic device, and storage medium provided in this invention determine the target device that is allowed to access the endpoint device by obtaining the target Internet Protocol address that is allowed to access the endpoint device, send the traffic data received from the source device to the target device, and control the target device to forward the traffic data to the endpoint device. Since the target device is a device that is allowed to access the endpoint device, the traffic data can complete the access process to the endpoint device with access restrictions after being forwarded by the endpoint device, thereby expanding the applicability of endpoint devices with access restrictions. At the same time, since the network communication device and the target device establish a communication connection through an SSL tunnel, the SSL tunnel can ensure the data security of the communication process between the network communication device and the target device, thereby achieving the effect of ensuring data security during communication with devices with access restrictions while expanding the applicability of devices with access restrictions. Attached Figure Description
[0021] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the network communication method provided in Embodiment 1 of the present invention;
[0023] Figure 2 This is a schematic diagram of the network communication device used in the network communication method provided in Embodiment 1 of the present invention;
[0024] Figure 3 This is a flowchart illustrating the network communication method provided in Embodiment 2 of the present invention;
[0025] Figure 4 This is a schematic diagram of the network communication device provided in Embodiment 3 of the present invention;
[0026] Figure 5 This is a schematic diagram of the electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0029] It should be noted that similar labels 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.
[0030] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0031] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0032] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0033] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0034] Embodiment 1 of this invention provides a network communication method applied to a network communication device. The network communication device connects a source device and a destination device to complete network communication between the source device and the destination device. The source device is the terminal device initiating the network communication, and the destination device is the terminal device from which the source device needs to perform network communication. The network communication method is as follows: Figure 1 As shown, it includes the following steps:
[0035] Step S101: Obtain the target Internet Protocol address.
[0036] In some embodiments of the present invention, after establishing a network communication connection with a source device, the network communication device can obtain the destination device and the Internet Protocol address that the source device needs to perform network communication for this network communication process as the target Internet Protocol address.
[0037] Specifically, in some embodiments of the present invention, the network communication device can obtain the Internet Protocol address (IPA) allowed to access the endpoint device as the target IPA address by querying the endpoint device. That is, the network communication device sends a query message to the endpoint device and obtains the IPA address allowed to access the endpoint device as the target IPA address by obtaining the response message returned by the endpoint device based on the query message. Alternatively, it can obtain the IPA address allowed to access the endpoint device as the target IPA address by querying the source device. That is, the source device knows the IPA address allowed to access the endpoint device, and the network communication device directly obtains the IPA address allowed to access the endpoint device as the target IPA address from the source device. Or, it can obtain the IPA address allowed to access the endpoint device as the target IPA address by obtaining publicly available information from a public network, etc. The specific choice can be flexible.
[0038] Step S102: Obtain the target device corresponding to the target Internet Protocol address.
[0039] During network communication, each networked electronic device possesses a unique Internet Protocol (IP) address, commonly referred to as an IP address. In some embodiments of this invention, the electronic device corresponding to a known target IP address can be obtained as the target device.
[0040] Step S103: Establish an SSL tunnel with the target device to establish a communication connection.
[0041] SSH, short for Secure Shell, is a security protocol built on the application layer. SSH is a reliable protocol specifically designed to provide security for remote login sessions and other network services. Using SSH can effectively prevent information leaks during remote management. Originally a program for UNIX systems, SSH has rapidly expanded to other operating systems. When used correctly, SSH can mitigate network vulnerabilities. Almost all UNIX-based operating systems, such as HP-UX, Linux, and Digital UNIX, can run SSH.
[0042] OpenSSH is a free and open-source implementation of the SSH protocol, widely used on mainstream Linux systems. OpenSSH can use TUN / TAP devices to establish and encrypt peer-to-peer tunnels. It is very similar to TLS-based Virtual Private Network (VPN) solutions, but with the advantage of SSH that it requires no additional software installation or configuration, and the tunnel uses SSH authentication.
[0043] TUN / TAP are virtual network devices within the operating system kernel. Unlike ordinary hardware network cards, these virtual network devices are entirely implemented in software and provide the software running on the operating system with the same functionality as hardware network devices. TUN emulates a network layer device, capable of handling Layer 3 data packets, such as IP data packets. TAP emulates an Ethernet device, capable of handling Layer 2 data packets, such as Ethernet frames. The operating system can send data to user-space applications bound to the TUN / TAP device. Conversely, user-space applications can also send data through the TUN / TAP device as if it were a hardware network device.
[0044] The TUN / TAP driver provides applications with two interaction methods: the virtual network interface and the character device / dev / net / tun. Data written to the character device / dev / net / tun is sent to the virtual network interface; data sent to the virtual network interface also appears on the character device.
[0045] Applications can send IP packets to the TUN / TAP interface via the standard Socket API, just as if operating a physical network interface card (NIC). In addition to applications, the operating system also sends IP or Ethernet packets, such as ARP or ICMP packets, to the TUN / TAP interface based on the TCP / IP protocol stack. The TUN / TAP driver writes the packets received by the TUN / TAP interface verbatim to the / dev / net / tun character device, from which applications processing TUN / TAP data can read the packets and perform appropriate processing.
[0046] Applications can also write data packets through the / dev / net / tun character device. In this case, the data packets written to the character device will be sent to the TUN / TAP virtual interface and then enter the operating system's TCP / IP protocol stack for processing, just like data entering the operating system from the physical network card.
[0047] In some embodiments of the present invention, by combining TUN / TAP with the SSL security protocol, a point-to-point (i.e., network communication device to target device) SSL tunnel can be created.
[0048] In some embodiments of the present invention, such as Figure 2As shown, the network communication device 100 constructs a first virtual network interface card (NIC) 101 within itself and controls the target device 200 to construct a second virtual NIC 201. Finally, an SSL tunnel is established between the network communication device 100 and the target device 200 via the first virtual NIC 101 and the second virtual NIC 201. By constructing the second virtual NIC 201 in the target device 200 and using the second virtual NIC 201 to construct an SSL tunnel with the first virtual NIC 101 in the network communication device 100, there is no need to use a physical NIC to construct the SSL tunnel. This reduces the hardware requirements of the target device 200 during the SSL tunnel construction process, thereby further expanding the applicability of the network communication method. Furthermore, constructing the first virtual NIC 101 in the network communication device 100 for network communication with the target device 200 also reduces the hardware requirements of the network communication device 100 and lowers its configuration cost.
[0049] Step S104: Receive traffic data sent by the source device and send the traffic data to the target device via an SSL tunnel.
[0050] In some embodiments of the present invention, such as Figure 2 As shown, the network communication device 100 constructs a virtual character device 102 within itself. After receiving traffic data sent by the source device via the first virtual network card 101, the network communication device 100 stores the received traffic data in the virtual character device 102 via the protocol stack 500. By constructing a virtual character device 102 to store traffic data, the hardware requirements of the network communication device can be effectively reduced, thus reducing the purchase cost of the network communication device.
[0051] In some embodiments of the present invention, before storing the received traffic data in the virtual character device 102, the traffic data is further processed by the character driver 600, and the processed traffic data is then stored in the virtual character device 102.
[0052] In some embodiments of the present invention, when it is necessary to forward traffic data stored in the virtual character device 102, that is, to obtain the traffic data to be forwarded from the virtual character device 102, and to forward the data traffic to be forwarded to the target device through the SSL tunnel established with the target device.
[0053] Step S105: Control the target device to send traffic data to the destination device.
[0054] In some embodiments of the present invention, such as Figure 2As shown, control commands can be sent to the target device 200 simultaneously with forwarding traffic data to the target device via an SSL tunnel, thereby controlling the target device 200 to send the traffic data to the destination device 400. It is understood that the foregoing is merely illustrative of some embodiments of the present invention and does not constitute a limitation. In other embodiments of the present invention, the network communication device 100 can also construct a forwarding control program in the target device 200 while establishing an SSL tunnel with the target device 200. The forwarding control program can then control the target device 200 to forward the traffic data to the destination device 400 when it receives the traffic data sent by the network communication device 100, or other methods can be used flexibly according to actual needs.
[0055] In some embodiments of the present invention, such as Figure 2 As shown, the network communication device 100 can also control the target device 200 to construct a virtual character device 202. After receiving traffic data via the second virtual network card 201, the target device 200 stores the traffic data into the virtual character device 202 via the protocol stack and character driver. Constructing a virtual character device 202 in the target device 200 can also reduce the hardware requirements of the target device 200 and further expand the applicability of the network communication method.
[0056] Compared with the prior art, the network communication method provided in Embodiment 1 of the present invention determines the target device that is allowed to access the endpoint device by obtaining the target Internet Protocol address that is allowed to access the endpoint device, sends the traffic data received from the source device to the target device, and controls the target device to forward the traffic data to the endpoint device. Since the target device is a device that is allowed to access the endpoint device, the traffic data can complete the access process to the endpoint device with access restrictions after being forwarded by the endpoint device, thereby improving the applicability of endpoint devices with access restrictions. At the same time, since the network communication device and the target device establish a communication connection through an SSL tunnel, the SSL tunnel can ensure the data security of the communication process between the network communication device and the target device, thereby achieving the effect of improving the applicability of endpoint devices with access restrictions while ensuring data security during communication with such devices.
[0057] Embodiment 2 of the present invention provides a network communication method, applied to, for example... Figure 2 The network communication device shown is specifically as follows: Figure 3 As shown, it includes the following steps:
[0058] Step S201: Establish a VPN tunnel with the source device to establish a communication connection.
[0059] In some embodiments of the present invention, such as Figure 2As shown, the network communication device 100 can establish a VPN tunnel with the source device 300 through the first virtual network card 101, and then establish a communication connection through the VPN tunnel.
[0060] VPN stands for Virtual Private Network. The main function of a VPN is to establish a temporary, secure connection over a public network; it's a secure, encrypted communication tunnel that traverses an untrusted public network. VPN tunneling is a technology that securely connects two geographically different networks using Internet tunneling technology. When two networks are private local area networks using private IP addresses, they cannot communicate with each other. Tunneling technology allows hosts within the two subnets to communicate.
[0061] Common VPNs, such as SSL VPN, refer to VPN technology that establishes secure remote access channels based on the Security Socket Layer (SSL) protocol. A typical SSL VPN application is OpenVPN, a well-developed open-source software. OpenVPN provides two virtual network interfaces: the general-purpose first virtual network adapter 101 driver, through which Layer 3 IP tunnels can be established, or virtual Layer 2 Ethernet, the latter capable of transmitting any type of Layer 2 Ethernet network data.
[0062] In some embodiments of the present invention, after the network communication device 100 establishes a VPN tunnel with the source device 300 for communication, the security mode of the VPN tunnel separation technology center is activated, controlling all traffic data sent by the source device 300 to be transmitted to the network communication device 100 through the VPN tunnel and forwarded by the network communication device 100, thereby improving the data security between the source device 300 and the network communication device 100.
[0063] Tunnel separation is a VPN application scenario where users can access both the remote corporate intranet and the local area network (LAN) while using a VPN tunnel. Tunnel separation can be divided into three modes: First, security mode, where all traffic must go through the tunnel for security reasons (access to the local network and direct internet access are not allowed); second, branch mode, where users access the corporate intranet as a branch unit, and traffic to both the corporate intranet and the internet goes through the tunnel (access to the local network is allowed, but direct internet access is not allowed); and third, access mode, where users access the corporate intranet as an independent user, and traffic accessing designated open resources within the corporate intranet goes through the tunnel (access to the local network and direct internet access are allowed).
[0064] In some embodiments of the present invention, when multiple source devices exist, the network communication device constructs multiple VPN tunnels, each VPN tunnel connecting to a separate source device. By equipping each source device with a separate corresponding source device, data interference that may occur when multiple source devices communicate with the network communication device simultaneously can be effectively avoided, further enhancing the data security between the source devices and the network communication device.
[0065] Step S202: Obtain the target Internet Protocol address.
[0066] Step S203: Obtain the target device corresponding to the target Internet Protocol address.
[0067] Step S204: Establish an SSL tunnel with the target device to establish a communication connection.
[0068] Step S205: Receive traffic data sent by the source device via the VPN tunnel, and send the traffic data to the target device via the SSL tunnel.
[0069] Step S206: Control the target device to send traffic data to the destination device.
[0070] It is understood that steps S202 to S206 in Embodiment 2 of the present invention are largely the same as steps S101 to S105 in Embodiment 1. For details, please refer to the specific description in Embodiment 1, which will not be repeated here.
[0071] Compared with the prior art, the network communication method provided in Embodiment 2 of the present invention retains all the technical features of Embodiment 1 and has all the technical effects of Embodiment 1. For details, please refer to the specific description in Embodiment 1, which will not be repeated here. Furthermore, in Embodiment 2 of the present invention, data communication is performed by establishing a VPN tunnel with the source device. VPN tunnel technology can effectively improve the security of data transmission between the source device and the network communication device, thereby further ensuring the data security in the destination device.
[0072] Embodiment 3 of the present invention relates to a network communication device, specifically as follows: Figure 4 As shown, it includes: an address acquisition module 401, which is used to acquire the target Internet Protocol address, which is the Internet Protocol address that is allowed to access the destination device; a device acquisition module 402, which is used to acquire the target device corresponding to the target Internet Protocol address; and a communication module 403, which is used to establish an SSL tunnel with the target device for communication connection. The communication module 403 is also used to receive traffic data sent by the source device and send the traffic data to the target device through the SSL tunnel, and control the target device to send the traffic data to the destination device.
[0073] Compared with the prior art, in the network communication device provided in Embodiment 3 of the present invention, the address acquisition module 401 obtains the target Internet Protocol address that is allowed to access the endpoint device, and the device acquisition module 402 determines the target device that is allowed to access the endpoint device based on the target Internet Protocol address. Finally, the communication module 403 sends the traffic data received from the source device to the target device and controls the target device to forward the traffic data to the endpoint device. Since the target device is a device that is allowed to access the endpoint device, the traffic data can complete the access process to the endpoint device with access restrictions after being forwarded by the endpoint device, thereby improving the applicability of endpoint devices with access restrictions. At the same time, since the network communication device and the target device establish a communication connection through an SSL tunnel, the SSL tunnel can ensure the data security of the communication process between the network communication device and the target device, thereby achieving the effect of ensuring data security during the communication process with the endpoint device with access restrictions while improving the applicability of the endpoint device with access restrictions.
[0074] Embodiment 4 of the present invention relates to an electronic device, such as... Figure 5 As shown, it includes: at least one processor 501; and a memory 502 communicatively connected to at least one processor 501; wherein the memory 502 stores instructions executable by at least one processor 501, the instructions being executed by at least one processor 501 to enable at least one processor 501 to perform the methods in the above embodiments.
[0075] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0076] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.
[0077] Embodiment 5 of the present invention relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method embodiments.
[0078] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network communication method, characterized in that, Applied to a network communication device, the method includes: Obtain the target Internet Protocol address, which is the Internet Protocol address that is allowed to access the endpoint device; Obtain the target device corresponding to the target Internet Protocol address; Establish an SSL tunnel with the target device to establish a communication connection; Receive traffic data sent by the source device and send the traffic data to the target device via the SSL tunnel; The target device is controlled to send the traffic data to the destination device; The method further includes: Establish a VPN tunnel with the source device to establish a communication connection; The traffic data received from the source device includes: The traffic data sent by the source device is received via the VPN tunnel.
2. The method according to claim 1, characterized in that, The establishment of a VPN tunnel with the source device for communication includes: Construct the first virtual network interface card; A VPN tunnel is established between the first virtual network card and the source device for communication.
3. The method according to claim 2, characterized in that, Receiving the traffic data sent by the source device via the VPN tunnel includes: Construct virtual character devices; The traffic data is received from the first virtual network card via the protocol stack and stored in the virtual character device.
4. The method according to claim 3, characterized in that, The step of storing the traffic data into the virtual character device includes: The traffic data is stored in the virtual character device via a character driver.
5. The method according to claim 2, characterized in that, The step of establishing an SSL tunnel with the target device for communication includes: Control the target device to construct a second virtual network interface card; The SSL tunnel is established via the first virtual network card and the second virtual network card.
6. The method according to claim 1, characterized in that, The establishment of a VPN tunnel with the source device for communication includes: Multiple independent VPN tunnels are established with each of the multiple source devices, and each VPN tunnel is connected to a single source device.
7. A network communication device, characterized in that, include: The address acquisition module is used to acquire the target Internet Protocol address, which is the Internet Protocol address that is allowed to access the endpoint device. A device acquisition module, wherein the device acquisition module is used to acquire the target device corresponding to the target Internet Protocol address; The communication module is used to establish an SSL tunnel with the target device for communication connection. The communication module is also used to receive traffic data sent by the source device, send the traffic data to the target device via the SSL tunnel, and control the target device to send the traffic data to the destination device. The network communication device is also used for: Establish a VPN tunnel with the source device to establish a communication connection; The traffic data received from the source device includes: The traffic data sent by the source device is received via the VPN tunnel.
8. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the network communication method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by a processor to implement the network communication method according to any one of claims 1 to 6.
Citation Information
Patent Citations
System and method for communicating in an SSL VPN
US20160226815A1