IP transparent transmission method and system based on UDP and QUIC protocols
Through the transparent IP transmission method based on UDP and QUIC protocols, non-invasive integration is achieved using proxy modules and firewall rules, solving the complexity and cost problems when adding reliable transmission protocols in the prior art, and realizing reliability and encryption Transmission, suitable for application systems such as video conferencing.
Patent Information
- Application Number
- CN202211240569.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-10-11
AI Technical Summary
When adding reliable and encrypted transmission protocols to existing application systems, new protocol stack software is needed to be developed and system upgraded, resulting in increased complexity, high cost and great impact on signaling scheduling, and it is impossible to effectively distinguish between service flows. , increasing the system complexity and operation and maintenance difficulty.
Using the IP transparent transmission method based on UDP and QUIC protocols, custom rules are set on the firewall through the proxy sending and transmission module and the receiving and transmission module, non-invasive integration is realized, multi-service multiplexing, and transmission is reliable and encrypted.
It realizes transparent proxy transmission, reduces system complexity and upgrade costs, supports multi-service reuse, and has reliability and encryption, avoiding direct modification and upgrading of the original system.
Smart Images

Figure CN115604339B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network communication technology, and in particular to an IP transparent transmission method and system based on UDP and QUIC protocols. Background Art
[0002] Applications on computer networks are increasingly demanding reliable and encrypted transmission. For existing application systems (such as video conferencing, video surveillance, and video command systems, including related hardware and business software), to add reliable and encrypted transmission capabilities, it is generally necessary to develop new reliable transmission protocol stack software, integrate it with the original system in a certain form, and carry out related upgrade and transformation projects. Traditional integration methods generally include gateway proxy and dedicated software program forwarding.
[0003] For gateway proxy integration, a reliable transmission protocol device is required as the gateway, and a series of related configurations are made to the subnet where the original application is located. After the transformation is completed, all messages from the host where the original application is located are forwarded to the reliable protocol gateway, and then routed and forwarded to the remote destination address by the gateway device or program. This method is essentially unable to distinguish the protocol level of the original business system, and it is even more impossible to distinguish multiple business flows at the business level. This brings many restrictions to network management and greatly increases the complexity of the system, resulting in a large upgrade creation cost.
[0004] For the integration method of forwarding by dedicated software programs, the original application needs to be redeveloped to be compatible with the new reliable protocol interface, and the business message is explicitly sent to the forwarding program (rather than directly to the receiver), which requires batch changes to the original user parameters. In business systems such as video conferencing and video command, this integration method will also have a great impact on the signaling scheduling mechanism. The essence of this integration method is to couple the application and transmission subsystems of a business system, or to make the two "invade" each other, which not only increases the cost of hardware upgrades and software reconstruction, but also increases the complexity of the system and brings greater difficulties to operation and maintenance. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide an IP transparent transmission method and system based on UDP and QUIC protocols, which realizes transparent proxy transmission. By setting custom rules for the firewall, it has a non-intrusive integration method, supports multi-service multiplexing features, and the transmission is reliable and encrypted.
[0006] In a first aspect, an embodiment of the present invention provides an IP transparent transmission method based on UDP and QUIC protocols, which is applied to a first user terminal, wherein the first user terminal includes a terminal service sending end, a proxy sending transmission module, and a first firewall; the method includes:
[0007] The proxy transmission module obtains the destination IP address and destination port of the service data flow from the user parameter interface of the terminal service sending end;
[0008] The proxy sending transmission module establishes a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and sends the message encapsulated by the encapsulation unit;
[0009] The first firewall automatically identifies the service data flow according to the first forwarding rule set by the proxy transmission module, and forwards the service data flow to the proxy transmission module;
[0010] The proxy transmission module parses the message of the service data flow to obtain the service data and the source port;
[0011] The proxy sending transmission module encapsulates the service data, the source port and the destination port to obtain encapsulated data, and sends the encapsulated data to the proxy receiving transmission module through the QUIC protocol.
[0012] Furthermore, the first forwarding rule is set by the proxy transmission module according to the destination IP address and the destination port.
[0013] In a second aspect, an embodiment of the present invention provides an IP transparent transmission method based on UDP and QUIC protocols, which is applied to a second user terminal, wherein the second user terminal includes a proxy receiving transmission module, a terminal service receiving end, and a second firewall; the method includes:
[0014] The proxy receiving transmission module listens to the connection request sent by the QUIC protocol through the listening port, and establishes a QUIC connection with the proxy sending transmission module of the first user terminal;
[0015] After the connection is established, the proxy receiving transmission module receives the encapsulated data sent by the proxy sending transmission module;
[0016] The proxy receiving and transmitting module parses the encapsulated data to obtain the source port, destination port and business data of the business data flow;
[0017] Reassemble the destination port and the service data of the service data stream to obtain a UDP message and send it to a local address;
[0018] The second firewall replaces the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forwards it to the terminal service receiving end.
[0019] Furthermore, the listening port is acquired by the proxy transmission receiving module from the user parameter interface of the terminal service receiving end.
[0020] Furthermore, the second forwarding rule is set by the proxy receiving transmission module according to the IP address of the proxy sending transmission module and the source port of the service data flow.
[0021] In a third aspect, an embodiment of the present invention provides an IP transparent transmission system based on UDP and QUIC protocols, which is applied to a first user terminal, wherein the first user terminal includes a terminal service sending end, a proxy sending transmission module and a first firewall; the system includes:
[0022] A parameter acquisition unit, used for the proxy transmission module to acquire the destination IP address and destination port of the service data flow from the user parameter interface of the terminal service sending end;
[0023] A link establishment and sending unit, configured for the proxy sending transmission module to establish a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and to send the message encapsulated by the encapsulation unit;
[0024] An identification and forwarding unit, configured for the first firewall to automatically identify the service data flow according to a first forwarding rule set by the proxy transmission module, and forward the service data flow to the proxy transmission module;
[0025] A message parsing unit, used for the proxy transmission module to parse the message of the service data flow to obtain the service data and the source port;
[0026] The encapsulation unit is used for the proxy sending transmission module to encapsulate the service data, the source port and the destination port to obtain encapsulated data, and send the encapsulated data to the proxy receiving transmission module through the link building and sending unit using the QUIC protocol.
[0027] Furthermore, the first forwarding rule is set by the proxy transmission module according to the destination IP address and the destination port.
[0028] In a fourth aspect, an embodiment of the present invention provides an IP transparent transmission system based on UDP and QUIC protocols, which is applied to a second user terminal, wherein the second user terminal includes a proxy receiving transmission module, a terminal service receiving end, and a second firewall; the system includes:
[0029] A listening and receiving unit, configured for the proxy receiving transmission module to listen to a connection request sent by the QUIC protocol through a listening port, and to establish a QUIC connection with the proxy sending transmission module of the first user terminal; after the connection is established, receiving encapsulated data sent by the proxy sending transmission module;
[0030] An encapsulation and parsing unit, used for the proxy receiving and transmitting module to parse the encapsulated data to obtain the source port, destination port and business data of the business data flow;
[0031] A message assembly unit, used for reassembling the destination port of the service data stream and the service data to obtain a UDP message and sending it to a local address;
[0032] The sending and replacing unit is used for the second firewall to replace the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forward it to the terminal service receiving end.
[0033] In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method described above when executing the computer program.
[0034] In a sixth aspect, an embodiment of the present invention provides a computer-readable medium having a non-volatile program code executable by a processor, wherein the program code enables the processor to execute the method as described above.
[0035] The embodiment of the present invention provides an IP transparent transmission method and system based on UDP and QUIC protocols, which is applied to a first user terminal, wherein the first user terminal includes a terminal service sending end, a proxy sending transmission module and a first firewall; the method and system include: the proxy sending transmission module obtains the destination IP address and destination port of the service data stream from the user parameter interface of the terminal service sending end; the proxy sending transmission module establishes a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and sends the message encapsulated by the encapsulation unit; the first firewall automatically identifies the service data stream according to the first forwarding rule set by the proxy sending transmission module, and forwards the service data stream to the proxy sending transmission module; the proxy sending transmission module parses the message of the service data stream to obtain the service data and the source port; the proxy sending transmission module encapsulates the service data, the source port and the destination port to obtain the encapsulated data, and sends the encapsulated data to the proxy receiving transmission module through the QUIC protocol; the method and system are applied to a second user terminal, wherein the second user terminal It includes a proxy receiving transmission module, a terminal service receiving end and a second firewall; it includes: the proxy receiving transmission module listens to the connection request sent by the QUIC protocol through the listening port, and establishes a QUIC connection with the proxy sending transmission module of the first user terminal; after the connection is established, the proxy receiving transmission module receives the encapsulated data sent by the proxy sending transmission module; the proxy receiving transmission module parses the encapsulated data to obtain the source port, destination port and service data of the service data stream; reassembles the destination port and service data of the service data stream to obtain a UDP message and sends it to the local address; the second firewall replaces the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forwards it to the terminal service receiving end; transparent proxy transmission is realized, and by setting custom rules for the firewall, it has a non-invasive integration method, supports multi-service multiplexing characteristics, and the transmission has reliability and encryption.
[0036] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0037] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flow chart of an IP transparent transmission method based on UDP and QUIC protocols provided in Embodiment 1 of the present invention;
[0040] Figure 2 A flow chart of another IP transparent transmission method based on UDP and QUIC protocols provided in Embodiment 2 of the present invention;
[0041] Figure 3 A schematic diagram of an IP transparent transmission system based on UDP and QUIC protocols provided in Embodiment 3 of the present invention;
[0042] Figure 4 A schematic diagram of another IP transparent transmission system based on UDP and QUIC protocols provided in Embodiment 4 of the present invention;
[0043] Figure 5 A schematic diagram of a transmission system composed of a first user terminal and a second user terminal provided in Embodiment 5 of the present invention;
[0044] Figure 6 A schematic diagram of a unidirectional transmission system for multi-channel user data provided in Embodiment 5 of the present invention;
[0045] Figure 7 A schematic diagram of a bidirectional transmission system for multi-channel user data provided by Embodiment 5 of the present invention;
[0046] Figure 8 A schematic diagram of bidirectional transmission of multiple services of a terminal system provided in Embodiment 5 of the present invention;
[0047] Fig. 9 A schematic diagram of a transmission system composed of another first user terminal and a second user terminal provided in Embodiment 5 of the present invention;
[0048] Fig.10 A schematic diagram of a service data format encapsulation format provided in Embodiment 5 of the present invention;
[0049] Fig.11 This is a schematic diagram of the application process of the proxy sending transmission module and the proxy receiving transmission module provided in the fifth embodiment of the present invention.
[0050] icon:
[0051] 1- parameter acquisition unit; 2- link building and sending unit; 3- identification and forwarding unit; 4- message parsing unit; 5- encapsulation unit; 6- listening and receiving unit; 7- encapsulation and parsing unit; 8- message assembly unit; 9- sending and replacement unit. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] The IP transparent transmission method based on UDP and QUIC protocols provided by this application has the main function of providing a transparent, "non-intrusive" integrated and reliable transmission method for business programs transmitted on the network. This method uses an independent proxy transmission layer to parse and transmit multiple different upper-layer business flows, and performs proxy forwarding of business flows through local routing tables and NAT address conversion. Therefore, the original business program software or hardware equipment does not need to upgrade the version or modify the operating parameters, and can be directly connected to the transmission system of the present invention and work together, realizing transparent transmission and "non-intrusive" style integration, avoiding the upgrade cost of the existing service system.
[0054] Furthermore, the QUIC protocol is used as the bearer protocol working on the proxy transport layer, providing the data transmission system with the functional characteristics of multiplexing, reliable transmission and encrypted transmission. The system can be implemented by computer software or hardware devices, and can run independently of the original computer network hardware devices or software programs.
[0055] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.
[0056] Embodiment 1:
[0057] Figure 1 This is a flow chart of the IP transparent transmission method based on UDP and QUIC protocols provided in Example 1 of the present invention.
[0058] Reference Figure 1 , the execution subject is a first user terminal, the first user terminal includes a terminal service sending end, a proxy sending transmission module and a first firewall; the method includes the following steps:
[0059] Step S101, the proxy transmission module obtains the destination IP address and destination port of the service data flow from the user parameter interface of the terminal service sending end;
[0060] Step S102, the proxy sending transmission module establishes a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and sends the message encapsulated by the encapsulation unit;
[0061] Here, the destination IP address is the IP address of the proxy receiving transmission module. After the proxy sending transmission module obtains the IP address of the proxy receiving transmission module, it establishes a QUIC connection with the proxy receiving transmission module.
[0062] Step S103, the first firewall automatically identifies the service data flow according to the first forwarding rule set by the proxy transmission module, and forwards the service data flow to the proxy transmission module;
[0063] Here, the first forwarding rule is set by the proxy transmission module according to the destination IP address and the destination port, that is, the first forwarding rule is added to the firewall of the operating system (the NAT rule of the netfilter of the operating system); then the firewall of the operating system will automatically identify the message sent to this destination IP address and destination port (that is, the business data flow sent from the terminal business sending end to the terminal business receiving end) according to the first forwarding rule, and forward it to the proxy transmission module.
[0064] Step S104, the proxy transmission module parses the message of the service data flow to obtain the service data and source port;
[0065] Step S105, the proxy sending transmission module encapsulates the service data, source port and destination port to obtain encapsulated data, and sends the encapsulated data to the proxy receiving transmission module through the QUIC protocol.
[0066] Here, the proxy transmission module encapsulates the service data, source port and destination port to obtain encapsulated data. The encapsulation format is as follows: Fig.10 And send the encapsulated data to the proxy receiving transmission module through the QUIC protocol.
[0067] Embodiment 2:
[0068] Figure 2 A flowchart of another IP transparent transmission method based on UDP and QUIC protocols provided in Embodiment 2 of the present invention.
[0069] Reference Figure 2 The execution subject is a second user terminal, and the second user terminal includes a proxy receiving transmission module, a terminal service receiving terminal, and a second firewall; the method includes the following steps:
[0070] Step S201, the proxy receiving transmission module listens to the connection request sent by the QUIC protocol through the listening port, and establishes a QUIC connection with the proxy sending transmission module of the first user terminal;
[0071] Here, the listening port is obtained by the proxy receiving transmission module from the user parameter interface of the terminal service receiving end. The proxy receiving transmission module listens to the incoming connection request of the remote transmission protocol and establishes a connection; that is, the proxy receiving transmission module, as the QUIC protocol server, listens to the QUIC connection request sent by the proxy sending transmission module and establishes a QUIC connection.
[0072] Step S202, after the connection is established, the proxy receiving transmission module receives the encapsulated data sent by the proxy sending transmission module;
[0073] Step S203, the proxy receiving transmission module parses the encapsulated data to obtain the source port, destination port and service data of the service data flow;
[0074] Step S204, reassemble the destination port and service data of the service data stream to obtain a UDP message and send it to the local address;
[0075] Step S205, the second firewall replaces the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forwards it to the terminal service receiving end.
[0076] Here, the second forwarding rule is set by the proxy receiving transmission module according to the IP address of the proxy sending transmission module and the source port of the business data flow, and the second forwarding rule is added to the second firewall of the operating system, that is, the NAT rule of the netfilter of the operating system; the second firewall sends the UDP message to the proxy receiving transmission module according to the second forwarding rule set by the proxy receiving transmission module.
[0077] It can be seen that during the entire transmission process, the programs of the terminal service sending end and the terminal service receiving end run as usual, and there is no need to modify their parameter settings; and the programs of the terminal service sending end and the terminal service receiving end do not need to care about the processing done by the proxy sending transmission module and the proxy receiving transmission module, which has the characteristics of transparent transmission and "non-intrusive" integration. Among them, transparent transmission is a data protocol used at the remote network port (WAN) end, which encapsulates and transmits the messages of various different network protocols of the local network port (LAN) by remote protocol, and then the remote protocol is parsed by the other end and the local network protocol message is restored, and finally transmitted to the receiver. During the whole process, the sender and the receiver can use a variety of local network protocols to communicate without being affected by the encapsulation and decapsulation of the intermediate remote protocol, and cannot feel its existence.
[0078] In the present application, as the proxy transmission layer entity, the proxy sending transmission module and the proxy receiving transmission module can select a variety of transmission protocols to achieve different functional characteristics. The present application selects the QUIC protocol, and utilizes its hierarchical transmission characteristics to use different QUIC streams to carry different service data streams, and transmits their respective source ports and destination ports along the way, and uniformly extracts and forwards them at the terminal service receiving end, so it has the characteristics of multiplexed transmission, reliable transmission and encrypted transmission. Among them, the QUIC (Quick UDP Internet Connections) protocol is a transport layer protocol implemented using UDP, which provides low-latency connection establishment process, streaming data encapsulation and concurrent transmission of multiple services on the basis of reliable transmission. UDP (User Datagram Protocol) is a connectionless transport layer protocol with the characteristics of flexible use and strong hardware compatibility.
[0079] In addition, the method adopted by the present application is different from the processing mode in which the gateway forwards the user message as a whole. Instead, it uses the system firewall rules for proxy forwarding, parses the business message and reassembles it into a custom format, which is carried on the QUIC protocol for transmission, extracts the corresponding information at the terminal service receiving end, reassembles it and forwards it to the business program. The entire transmission process is equivalent to the in-band transmission of the proxy and user address of the application layer, but the address and port of the lower layer protocol (i.e., QUIC) come from the application layer, which is essentially equivalent to virtual transparent transmission using the QUIC protocol. The entire processing process is like this: Fig. 9 As shown, the encapsulation format of the service port and data transmitted along the channel is as follows Fig.10 shown.
[0080] Embodiment three:
[0081] Figure 3 Schematic diagram of an IP transparent transmission system based on UDP and QUIC protocols provided in Embodiment 3 of the present invention.
[0082] Reference Figure 3 , applied to a first user terminal, the first user terminal includes a terminal service sending terminal, a proxy sending transmission module and a first firewall; the system includes:
[0083] Parameter acquisition unit 1, used for the proxy transmission module to acquire the destination IP address and destination port of the service data flow from the user parameter interface of the terminal service sending end;
[0084] The link establishment and sending unit 2 is used for the proxy sending transmission module to establish a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and to send the message encapsulated by the encapsulation unit;
[0085] Identification and forwarding unit 3, used for the first firewall to automatically identify the business data flow according to the first forwarding rule set by the proxy transmission module, and forward the business data flow to the proxy transmission module;
[0086] The message parsing unit 4 is used to parse the message of the service data flow on behalf of the transmission module to obtain the service data and the source port;
[0087] The encapsulation unit 5 is used for the proxy sending transmission module to encapsulate the service data, the source port and the destination port to obtain encapsulated data, and send the encapsulated data to the proxy receiving transmission module through the link building and sending unit using the QUIC protocol.
[0088] Furthermore, the first forwarding rule is set by the proxy transmission module according to the destination IP address and the destination port.
[0089] Embodiment 4:
[0090] Figure 4 A schematic diagram of another IP transparent transmission system based on UDP and QUIC protocols provided in Embodiment 4 of the present invention.
[0091] Reference Figure 4 , applied to a second user terminal, the second user terminal includes a proxy receiving transmission module, a terminal service receiving terminal and a second firewall; the system includes:
[0092] The listening and receiving unit 6 is used for the proxy receiving transmission module to listen to the connection request sent by the QUIC protocol through the listening port, and establish a QUIC connection with the proxy sending transmission module of the first user terminal; after the connection is established, receive the encapsulated data sent by the proxy sending transmission module;
[0093] The encapsulation and parsing unit 7 is used to act as an agent for the receiving and transmission module to parse the encapsulated data and obtain the source port, destination port and business data of the business data flow;
[0094] The message assembly unit 8 is used to reassemble the destination port and the service data of the service data stream to obtain a UDP message and send it to a local address;
[0095] The sending and replacing unit 9 is used for the second firewall to replace the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forward it to the terminal service receiving end.
[0096] The embodiment of the present invention provides an IP transparent transmission method and system based on UDP and QUIC protocols, which is applied to a first user terminal, wherein the first user terminal includes a terminal service sending end, a proxy sending transmission module and a first firewall; the method and system include: the proxy sending transmission module obtains the destination IP address and destination port of the service data stream from the user parameter interface of the terminal service sending end; the proxy sending transmission module establishes a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and sends the message encapsulated by the encapsulation unit; the first firewall automatically identifies the service data stream according to the first forwarding rule set by the proxy sending transmission module, and forwards the service data stream to the proxy sending transmission module; the proxy sending transmission module parses the message of the service data stream to obtain the service data and the source port; the proxy sending transmission module encapsulates the service data, the source port and the destination port to obtain the encapsulated data, and sends the encapsulated data to the proxy receiving transmission module through the QUIC protocol; the method and system are applied to a second user terminal, wherein the second user terminal It includes a proxy receiving transmission module, a terminal service receiving end and a second firewall; it includes: the proxy receiving transmission module listens to the connection request sent by the QUIC protocol through the listening port, and establishes a QUIC connection with the proxy sending transmission module of the first user terminal; after the connection is established, the proxy receiving transmission module receives the encapsulated data sent by the proxy sending transmission module; the proxy receiving transmission module parses the encapsulated data to obtain the source port, destination port and service data of the service data stream; reassembles the destination port and service data of the service data stream to obtain a UDP message and sends it to the local address; the second firewall replaces the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forwards it to the terminal service receiving end; transparent proxy transmission is realized, and by setting custom rules for the firewall, it has a non-invasive integration method, supports multi-service multiplexing characteristics, and the transmission has reliability and encryption.
[0097] Embodiment five:
[0098] Figure 5 A schematic diagram of a transmission system composed of a first user terminal and a second user terminal provided in Embodiment 5 of the present invention.
[0099] Reference Figure 5 The first user terminal includes a terminal service sending terminal and a proxy sending transmission module, and the second user terminal includes a proxy receiving transmission module and a terminal service receiving terminal. The present application can be directly installed on a platform software product in the form of a software module, or integrated into an embedded device to form an independent proxy transmission device.
[0100] Multi-channel service point-to-point transmission process reference Figure 6 and Figure 7The terminal service sending end can send multiple service data to the remote terminal service receiving end through a proxy sending transmission module (which can be in the form of a software program or an independent device); the terminal service receiving end device can listen to the sender's connection request through a proxy receiving transmission module (which can be in the form of a software program or an independent device) to realize point-to-point transmission of multiple service data.
[0101] Application scenarios where multiple terminal devices register with the server and perform media access and scheduling are as follows: Figure 8 As shown. The proxy receiving transmission module of the second user terminal monitors the connection requests from the proxy sending transmission modules of multiple terminal devices, which has a many-to-one form at the device level. At the same time, multiple service data can be transmitted separately on each connection established between the proxy sending transmission module and the proxy receiving transmission module.
[0102] The present application has the following advantages: First, transparent proxy transmission is realized; for the transmitted business data, the protocol layer above the transport layer and the port information of the transport layer itself are encapsulated in an independent transport layer in a special format, extracted and reassembled after reaching the terminal business receiving end, and finally handed over to the business program of the terminal business receiving end. Therefore, from the perspective of network business transmission, the business data is transmitted as a whole from the transport layer, and there is no need to re-parse, encapsulate and re-route in the middle; from the perspective of the business program, there is no need to perceive the actual situation on the transmission link and perform any additional processing, so the processing method and system of the application make the entire transmission process "transparent" relative to the original business program. Among them, link aggregation refers to the aggregation of multiple physical ports to form a logical port to achieve load sharing of inbound / outbound traffic throughput on each member port. It is a very important technology in terms of increasing link bandwidth, achieving link transmission elasticity and engineering redundancy.
[0103] Second, it has a non-intrusive integration method; this application uses the iptables tool to implement local proxy forwarding of business data streams by adding custom linked lists and NAT rules to the operating system netfilter. Therefore, when integrating this transmission system into an existing network system, there is no need to upgrade the original business service program, nor to modify user parameters and configuration files, which has no impact on the original business system and saves integration and deployment costs.
[0104] Third, it supports multiple business multiplexing features; this application chooses to use the QUIC protocol to carry the transparent transmission of business data, and the QUIC protocol natively supports multiple user streams (QUIC stream) at its session level. This feature can be used to encapsulate multiple independent business logic streams. In this application, the multi-stream technology of the QUIC protocol is utilized, so that each QUIC stream carries a logical business stream (taking video conferencing applications as an example, logical business streams may include SIP signaling streams, video main / auxiliary streams, audio streams, etc.), and carries multiple logical services on a QUIC link. In particular, for networks with a limited number of open ports on the firewall, it can save the number of ports, improve security, and reduce configuration complexity.
[0105] Fourth, the transmission is reliable and encrypted; this application uses the QUIC protocol as the underlying transmission protocol. The QUIC protocol itself has native reliable transmission and encrypted transmission characteristics; and it is based on the UDP protocol at the bottom layer, with the characteristics of low latency and low overhead, and its RTT transmission delay and key negotiation delay are significantly better than the TCP protocol, which also has reliable transmission characteristics. Therefore, it is particularly suitable for wired and wireless link transmission in various systems.
[0106] Fig.11 This is a schematic diagram of the application process of the proxy sending transmission module and the proxy receiving transmission module provided in the fifth embodiment of the present invention.
[0107] Reference Fig.11 , the client hosts 192.168.1.100 and 192.168.1.101 respectively send multiple data streams to the server 192.168.1.200 through the proxy transmission module using the QUIC protocol. The sending parameters are shown in Table 1:
[0108] Source Address Destination Address Load Type 192.168.1.100:5060 192.168.1.200:5060 SIP REGISTER Request 192.168.1.100:6000 192.168.1.200:7000 Video Streaming 192.168.1.100:6002 192.168.1.200:7002 Audio Stream 192.168.1.101:5060 192.168.1.200:5060 SIP REGISTER Request 192.168.1.101:6000 192.168.1.200:7010 Video Streaming 192.168.1.101:6002 192.168.1.200:7012 Audio Stream
[0109] On the sending device, set the destination address and destination port through the UI, and set it to the proxy sending transmission module with json-rpc.
[0110] Take the video service as an example to illustrate the processing flow of the sender:
[0111] First, after the proxy sending transmission module is started, the following operating system commands are first executed internally (these four commands mean that a custom chain named "SUMA" is established in the operating system routing table, and the default PREROUTING chain and OUTPUT chain of the operating system firewall are associated with and executed respectively, and then the NAT connection tracking is updated to make the above commands effective):
[0112] iptables -t nat –N SUMA
[0113] iptables -t nat –A PREROUTING -p udp -j SUMA
[0114] iptables -t nat –A OUTPUT -p udp -j SUMA
[0115] Conntrack -D -p udp -d 192.168.1.200
[0116] Second, the terminal service sending end sends the video service stream to the remote terminal service receiving end according to the destination IP address and destination port set by the user; Fig.11 , src:192.168.1.100:6000, dst:192.168.1.200:7000;
[0117] Third, the proxy transmission module obtains the following parameter information: the QUIC connection source port and destination port set by the user for the proxy transmission module (2424 and 4242 in the example); the video transmission destination IP and destination port set by the user for the terminal service sender (192.168.1.200:7000 in the example);
[0118] Fourth, the proxy sending transmission module initiates a QUIC connection to the proxy receiving transmission module based on the QUIC link source port and destination port parameters obtained in the third step, as well as the video sending destination IP; the established QUIC link is 192.168.1.100:2424←→192.168.1.200:4242;
[0119] Fifth, the proxy transmission module selects a random local port (8010 in the example) to receive video service data;
[0120] Sixth, the proxy transmission module executes the following operating system command based on the video transmission destination IP and destination port parameters obtained in the third step:
[0121] iptables -t nat –A SUMA -p udp -d 192.168.1.200--dport 7000 -j DNAT --to 127.0.0.1:8010
[0122] This command means to set a rule in the "SUMA" chain of the operating system routing table: identify all UDP packets sent to 192.168.1.200:7000 on this device and forward them to port 8010 of the device itself; after this step is completed, the video service flow sent by the terminal service sender described in the second step (its destination IP and port are exactly 192.168.1.200:7000) will be automatically identified by the operating system firewall and automatically forwarded to port 8010 of the local device, so as to be received by the proxy sending transmission module;
[0123] Seventh, the proxy transmission module parses the received video service flow UDP message, extracts its UDP source port (6000 in the example) and payload data (that is, video service data, generally video encoding frames, and this system does not need to care about its specific content), and compares it with the service flow destination port obtained in the third step (7000 in the example), according to Fig.10 The format shown is encapsulated and loaded into a "stream" payload specified by the QUIC protocol, and finally sent to the proxy receiving transmission module via the QUIC protocol.
[0124] The processing of signaling and audio services is similar to that of the above video, except that different ports are used in the second, third, fifth and sixth steps, and a different "stream" is used in the seventh step.
[0125] Take the video service as an example to illustrate the processing flow of the receiving end:
[0126] First, after the proxy receiving transmission module is started, the following operating system commands are executed internally. These three commands are to establish a custom chain named "SUMA" in the operating system routing table, so that the default POSTROUTING chain and INPUT chain of the operating system firewall are associated with and executed respectively:
[0127] iptables -t nat –N SUMA
[0128] iptables -t nat –A POSTROUTING -p udp -j SUMA
[0129] iptables -t nat –A INPUT -p udp -j SUMA
[0130] Second, the terminal service receiving end listens on the receiving port parameter set by the user (7000 in this example) and attempts to receive the video service stream sent by the remote terminal service sending end;
[0131] Third, the proxy receiving and transmitting module obtains the following parameter information: the QUIC connection listening port set by the user for the proxy receiving and transmitting module (4242 in the example); the video receiving port set by the user for the terminal service receiving end (7000 in the example);
[0132] Fourth, the proxy receiving transmission module creates a QUIC server based on the QUIC connection listening port obtained in the third step and listens on this port. After hearing the QUIC connection request sent by the proxy sending transmission module (corresponding to the fourth step of the sending end processing flow), a QUIC connection is established with it, which is 192.168.1.100:2424←→192.168.1.200:4242;
[0133] Fifth, the proxy receiving transport module receives the QUIC stream sent from the proxy sending transport module, parses the QUIC stream payload, and Fig.10 The format shown is decapsulated to obtain the video service data, the UDP source port (6000 in the example) and the UDP destination port (7000 in the example) of the video service flow;
[0134] The proxy receiving and transmitting module combines the video service data and the UDP destination port, and uses the local loopback address as the source IP and a random port (50110 in this example) as the source port to form a UDP message and send it out. The UDP header information (including the IP address) is as follows: src:127.0.0.1:50110, dst:192.168.1.200:7000;
[0135] Sixth, the proxy receiving transmission module executes the following two operating system commands based on the source IP address of the QUIC connection obtained in the fourth step (192.168.1.100 in the example) and the video service UDP source port obtained in the fifth step (6000 in the example):
[0136] iptables -t nat –A SUMA -p udp --sport 50110 -j SNAT --to192.168.1.100:6000
[0137] conntrack -D -p udp -d 192.168.1.200:7000
[0138] These two commands mean to set a rule in the "SUMA" chain of the operating system routing table: identify all UDP packets sent from source port 50110 on this device, modify their source IP address and source port to 192.168.1.100:6000 (the original destination IP address and port remain unchanged), and take effect immediately; after this step is completed, the reassembled video service UDP packet sent in the fifth step (its source port is exactly 50110) will be automatically identified by the operating system firewall and replaced with 192.168.1.100:6000;
[0139] Seventh, the terminal service receiving end will receive the UDP message sent by the proxy transmission module on port 7000, and the source IP and source port will be modified by the system firewall and then forwarded.
[0140] The processing of signaling and audio services is similar to that of the video, except that different ports are used in the second, third, fifth and sixth steps, and different "streams" are read in the fifth step.
[0141] In this application, from the perspective of the terminal service sending end, the destination IP and destination port of the video service UDP message it sends are the terminal service receiving end, and there is no parameter change; on the other hand, from the perspective of the terminal service receiving end, the source IP address and port of the video service UDP message it receives are exactly the original IP and source port of the terminal service sending end. In other words, the proxy sending transmission module and the proxy receiving transmission module in the middle do not need to care about or perceive the terminal service sending end and the terminal service receiving end, which means that transparent and "non-intrusive" transmission is achieved.
[0142] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the IP transparent transmission method based on UDP and QUIC protocols provided in the above embodiment are implemented.
[0143] An embodiment of the present invention also provides a computer-readable medium having a non-volatile program code executable by a processor, wherein a computer program is stored on the computer-readable medium, and when the computer program is executed by the processor, the steps of the IP transparent transmission method based on UDP and QUIC protocols of the above embodiment are executed.
[0144] The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0146] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0147] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for 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 methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0148] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0149] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An IP transparent transmission method based on UDP and QUIC protocols, characterized in that: Applied to a first user terminal, the first user terminal includes a terminal service sending terminal, a proxy sending transmission module and a first firewall; the method includes: The proxy transmission module obtains the destination IP address and destination port of the service data flow from the user parameter interface of the terminal service sending end; The proxy sending transmission module establishes a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and sends the message encapsulated by the encapsulation unit; The first firewall automatically identifies the service data flow according to the first forwarding rule set by the proxy transmission module, and forwards the service data flow to the proxy transmission module; The proxy transmission module parses the message of the service data flow to obtain the service data and the source port; The proxy sending transmission module encapsulates the service data, the source port and the destination port to obtain encapsulated data, and sends the encapsulated data to the proxy receiving transmission module through the QUIC protocol.
2. The IP transparent transmission method based on UDP and QUIC protocol according to claim 1, characterized in that: The first forwarding rule is set by the proxy transmission module according to the destination IP address and the destination port.
3. An IP transparent transmission method based on UDP and QUIC protocols, characterized in that: Applied to a second user terminal, the second user terminal includes a proxy receiving transmission module, a terminal service receiving terminal and a second firewall; the method includes: The proxy receiving transmission module listens to the connection request sent by the QUIC protocol through the listening port, and establishes a QUIC connection with the proxy sending transmission module of the first user terminal; After the connection is established, the proxy receiving transmission module receives the encapsulated data sent by the proxy sending transmission module; The proxy receiving and transmitting module parses the encapsulated data to obtain the source port, destination port and business data of the business data flow; Reassemble the destination port and the service data of the service data stream to obtain a UDP message and send it to a local address; The second firewall replaces the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forwards it to the terminal service receiving end.
4. The IP transparent transmission method based on UDP and QUIC protocol according to claim 3 is characterized in that: The listening port is acquired by the proxy receiving transmission module from the user parameter interface of the terminal service receiving end.
5. The IP transparent transmission method based on UDP and QUIC protocol according to claim 3, characterized in that: The second forwarding rule is set by the proxy receiving transmission module according to the IP address of the proxy sending transmission module and the source port of the service data flow.
6. An IP transparent transmission system based on UDP and QUIC protocols, characterized in that: Applied to a first user terminal, the first user terminal includes a terminal service sending terminal, a proxy sending transmission module and a first firewall; the system includes: A parameter acquisition unit, used for the proxy transmission module to acquire the destination IP address and destination port of the service data flow from the user parameter interface of the terminal service sending end; A link establishment and sending unit, configured for the proxy sending transmission module to establish a QUIC connection with the proxy receiving transmission module of the second user terminal according to the destination IP address, and to send the message encapsulated by the encapsulation unit; An identification and forwarding unit, configured for the first firewall to automatically identify the service data flow according to a first forwarding rule set by the proxy transmission module, and forward the service data flow to the proxy transmission module; A message parsing unit, used for the proxy transmission module to parse the message of the service data flow to obtain the service data and the source port; The encapsulation unit is used for the proxy sending transmission module to encapsulate the service data, the source port and the destination port to obtain encapsulated data, and send the encapsulated data to the proxy receiving transmission module through the link building and sending unit using the QUIC protocol.
7. The IP transparent transmission system based on UDP and QUIC protocol according to claim 6, characterized in that: The first forwarding rule is set by the proxy transmission module according to the destination IP address and the destination port.
8. An IP transparent transmission system based on UDP and QUIC protocols, characterized in that: Applied to a second user terminal, the second user terminal includes a proxy receiving transmission module, a terminal service receiving terminal and a second firewall; the system includes: A listening and receiving unit, configured for the proxy receiving transmission module to listen to a connection request sent by the QUIC protocol through a listening port, and to establish a QUIC connection with the proxy sending transmission module of the first user terminal; after the connection is established, receiving encapsulated data sent by the proxy sending transmission module; An encapsulation and parsing unit, used for the proxy receiving and transmitting module to parse the encapsulated data to obtain the source port, destination port and business data of the business data flow; A message assembly unit, used for reassembling the destination port of the service data stream and the service data to obtain a UDP message and sending it to a local address; The sending and replacing unit is used for the second firewall to replace the source IP address and source port of the UDP message with the IP address and service flow source port of the terminal service sending end of the first user terminal according to the second forwarding rule set by the proxy receiving transmission module, and forward it to the terminal service receiving end.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 5.
