Proxy routing method and system
By including routing information in the connection request between the proxy server cluster and the optical network client, the target source IP is obtained and a target GRE tunnel and accelerated link are established. This solves the data transmission problem caused by inappropriate link selection in traditional proxy access methods and achieves high-quality data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
- Filing Date
- 2024-01-12
- Publication Date
- 2026-05-05
AI Technical Summary
In traditional proxy access methods, the user end cannot select a suitable link according to its own business needs, resulting in poor link quality and packet loss and latency issues during data transmission.
By carrying routing information in the connection request between the proxy server cluster and the optical network client, the target source IP is obtained, and a target GRE tunnel and acceleration link are established based on the IP, so as to realize the policy routing of the data to be accelerated and ensure that the link selection meets the user's business needs.
This effectively avoids packet loss and latency issues during the transmission of data to be accelerated, ensuring that the data transmission quality meets user requirements.
Smart Images

Figure CN118803474B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a proxy routing method and system. Background Technology
[0002] SOCKS5 is a proxy protocol that acts as an intermediary between a client and a target server communicating using the TCP / IP protocol, enabling clients on an intranet to access servers on the internet. A SOCKS5 proxy server simulates client behavior by forwarding requests from the client to the target server. Specifically, the client and the proxy server communicate using the TCP / IP protocol; the client sends a request originally intended for the target server to the proxy server, and the proxy server then forwards the request to the target server, thus enabling communication between the client and the target server.
[0003] In emerging digital home services such as cloud gaming, high-definition video calling, and AR / VR, there are scenarios where users need to legitimately access specific websites. In these cases, a proxy server is needed as an intermediary to establish a connection between the user and the target server hosting these websites. However, there are numerous links between the user and the target server. Traditional proxy access methods prevent users from selecting the appropriate link based on their business needs, resulting in poor link quality and issues such as packet loss and latency during data transmission. Summary of the Invention
[0004] This application provides a proxy routing method and system to solve the technical problem in traditional proxy access methods where the user end cannot select a suitable link according to its own business needs, resulting in poor link quality and easy packet loss and delay during data transmission.
[0005] In a first aspect, embodiments of this application provide a proxy routing method applied to a proxy server cluster, comprising:
[0006] A connection is established with the optical network client based on a connection request sent by the optical network client; the connection request carries the routing information of the user client.
[0007] Obtain the target source IP based on the routing information;
[0008] A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP;
[0009] Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration entry point through the target GRE tunnel, and then is routed to the target acceleration link through the acceleration entry point. The target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0010] In one embodiment, obtaining the target source IP based on the routing information includes:
[0011] The target acceleration link is obtained from the routing information according to a preset priority rule;
[0012] The target source IP is obtained from the link information hash table based on the target acceleration link.
[0013] In one embodiment, routing the data to be accelerated to the target GRE tunnel based on the target source IP includes:
[0014] Select the target source IP from the multiple private network IPs configured in its own Loop interface;
[0015] The data to be accelerated is routed from the Loop interface policy to the target GRE tunnel based on the target source IP.
[0016] In one embodiment, the routing information is defined in TLV format, where the type in the TLV format is a link type, and the value in the TLV format is the link ID corresponding to the link type.
[0017] Secondly, embodiments of this application provide a proxy routing method applied to an optical network client, comprising:
[0018] A connection is established with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries the routing information of the user client.
[0019] The data to be accelerated is diverted to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and is then routed to the target acceleration link by the proxy server cluster according to the routing information policy; the proxy tunnel is the tunnel between itself and the proxy server cluster, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0020] In one embodiment, the step of diverting the data to be accelerated to the proxy tunnel includes:
[0021] The latency information of all acceleration links is periodically measured so that the user client can obtain the latency information.
[0022] In one embodiment, the step of establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster includes:
[0023] Receive routing information sent by the user client;
[0024] Receive the acceleration data sent by the user terminal to which the user client belongs.
[0025] Thirdly, embodiments of this application provide a proxy routing system, including: a proxy server cluster and an optical network client;
[0026] The proxy server cluster is used for:
[0027] A connection is established with the optical network client based on a connection request sent by the optical network client; the connection request carries the routing information of the user client.
[0028] Obtain the target source IP based on the routing information;
[0029] A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP;
[0030] Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration entry point through the target GRE tunnel, and then is routed to the target acceleration link through the acceleration entry point. The target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0031] The optical network client is used for:
[0032] A connection is established with the proxy server cluster based on the connection request sent to the proxy server cluster.
[0033] The data to be accelerated is diverted to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and is then routed to the target acceleration link by the proxy server cluster according to the routing information policy; the proxy tunnel is a tunnel between itself and the proxy server cluster.
[0034] Fourthly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the steps of the proxy routing method described in the first or second aspect.
[0035] Fifthly, embodiments of this application provide a non-transitory computer-readable storage medium, including a computer program, which, when executed by a processor, implements the steps of the proxy routing method described in the first or second aspect.
[0036] The proxy routing method and system provided in this application establish a connection between the proxy server cluster and the optical network client based on the connection request sent by the optical network client. The connection request carries the routing information of the user client. The target source IP is obtained according to the routing information. A connection is established with the target server based on the target source IP and the target source IP is bound. According to the target source IP, the data to be accelerated is routed to the target GRE tunnel so that the data to be accelerated enters the acceleration access point through the target GRE tunnel. Then, the data is routed to the target acceleration link through the acceleration access point. The target GRE tunnel is the tunnel between itself and the acceleration access point, and the target acceleration link is the acceleration link between the acceleration access point and the target server. Since the connection request carries the user client's routing information and the target source IP can be obtained through the routing information, the user side has selected a route between itself and the target server that meets its own business needs. Furthermore, there is a one-to-one mapping between the routing information and the target source IP. Therefore, the target GRE tunnel that meets the user's business needs can be selected from multiple GRE tunnels using the target source IP corresponding to the routing information. Then, the target acceleration link that best meets the user's business needs can be selected from multiple acceleration links using the same target source IP. This allows the data to be accelerated to travel from the proxy server cluster to the acceleration entry point, then from the acceleration entry point to the target acceleration link, and finally to the target server via the link that best meets the user's business needs. This link is most suitable for the user's business requirements, resulting in better quality and effectively avoiding packet loss and latency issues during data transmission. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is one of the flowcharts illustrating the proxy routing method provided in the embodiments of this application;
[0039] Figure 2 This is a second schematic flowchart of the proxy routing method provided in the embodiments of this application;
[0040] Figure 3 This is an architecture diagram of the proxy routing system provided in the embodiments of this application;
[0041] Figure 4 This is a technical flowchart of the proxy routing system provided in the embodiments of this application;
[0042] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] Figure 1 This is one of the flowcharts illustrating the proxy routing method provided in this application. (Refer to...) Figure 1 This application provides a proxy routing method applied to a proxy server cluster, which may include:
[0045] 101. Establish a connection with the optical network client based on the connection request sent by the optical network client;
[0046] The connection request carries the user client's routing information;
[0047] 102. Obtain the target source IP based on the routing information;
[0048] 103. Establish a connection with the target server based on the target source IP, and bind the target source IP;
[0049] 104. Based on the target source IP, route the data to be accelerated to the target GRE tunnel so that the data to be accelerated enters the acceleration entry point through the target GRE tunnel, and then is routed to the target acceleration link through the acceleration entry point policy.
[0050] The target GRE tunnel is the GRE tunnel between itself and the accelerated access point, and the target acceleration link is the acceleration link between the accelerated access point and the target server.
[0051] In step 101, the process of establishing a connection between the optical network client and the proxy server cluster includes a SOCKS5 handshake and authentication process. The routing information is carried in the authentication message sent by the optical network client to the proxy server cluster during the authentication process. Furthermore, the connection between the optical network client and the proxy server cluster includes TCP and UDP connections. For TCP connections, the routing information is carried in the TCP authentication message; for UDP connections, the routing information is carried in the UDP authentication message. TCP (Transmission Control Protocol) connections are connection-oriented, reliable, byte-stream-based transport layer communication protocols, while UDP (User Datagram Protocol) connections provide applications with a method to send encapsulated IP packets without establishing a connection.
[0052] In step 104, the GRE (Generic Routing Encapsulation) tunnel is a tunnel created based on the GRE tunneling protocol. It is used to encapsulate the data to be accelerated under the SOCKS5 protocol and transmit it to the acceleration entry point to achieve a direct connection between the proxy server cluster and the acceleration entry point.
[0053] The proxy routing method provided in this embodiment establishes a connection with the optical network client based on the connection request sent by the optical network client. The connection request carries the routing information of the user client. The target source IP is obtained according to the routing information. A connection is established with the target server based on the target source IP and the target source IP is bound. According to the target source IP, the data to be accelerated is routed to the target GRE tunnel so that the data to be accelerated enters the acceleration access point through the target GRE tunnel. Then, it is routed to the target acceleration link through the acceleration access point. The target GRE tunnel is the tunnel between itself and the acceleration access point, and the target acceleration link is the acceleration link between the acceleration access point and the target server. Since the connection request carries the user client's routing information and the target source IP can be obtained through the routing information, the user side has selected a route between itself and the target server that meets its own business needs. Furthermore, there is a one-to-one mapping between the routing information and the target source IP. Therefore, the target GRE tunnel that meets the user's business needs can be selected from multiple GRE tunnels using the target source IP corresponding to the routing information. Then, the target acceleration link that best meets the user's business needs can be selected from multiple acceleration links using the same target source IP. This allows the data to be accelerated to travel from the proxy server cluster to the acceleration entry point, then from the acceleration entry point to the target acceleration link, and finally to the target server via the link that best meets the user's business needs. This link is most suitable for the user's business requirements, resulting in better quality and effectively avoiding packet loss and latency issues during data transmission.
[0054] In one embodiment, obtaining the target source IP based on routing information may include:
[0055] The target acceleration link is obtained from the routing information according to the preset priority rules, and the corresponding target source IP is obtained from the link information hash table according to the target acceleration link.
[0056] The routing information can be represented in TLV (Type: type, Length: length, Value: value) format as follows:
[0057] Table 1 Route Selection Information Format
[0058] TYPE LENGTH VALUE 1 byte 1 byte 1 byte
[0059] Among them, TYPE represents the link type in the routing information, which can be represented by 1 byte; LENGTH represents the length of the routing information, which can be represented by 1 byte; VALUE represents the link ID corresponding to the link type in the routing information, which can be represented by 1 byte.
[0060] For gaming services, the optional TYPE can include:
[0061] 0x01: Terminal type;
[0062] 0x02: Game ID;
[0063] 0x03: Game server;
[0064] 0x04: Link label;
[0065] 0x05: Game App ID;
[0066] 0x06~0xFF: Reserved.
[0067] The difference between a link tag and a link ID is that a link tag is used to identify a link type to which multiple link IDs belong, while a link ID is used to identify a unique link under each link type. For example, a link tag can be used to identify a link in country K, that is, to identify all links connected to a server in country K, while a link ID can be used to identify one of the links.
[0068] If there are multiple links under a certain link type, a unique target acceleration link can be mapped using the form TYPE+VALUE. For example, if there are three links, line1, line2, and line3, under the K country region server, the target acceleration link can be mapped using the form K country region server + line1 / line2 / line3 to accelerate the game on the K country server. If there is only one link under a certain link type, a unique target acceleration link can be mapped directly using the link type TYPE. For example, if there is only a line4 link under a game ID, line4 can be mapped directly using the game ID as the target acceleration link to accelerate the game.
[0069] Furthermore, routing information can be described in the INFO field of the authentication message. Specifically, for a TCP authentication message, its format is as follows:
[0070] Table 2 TCP Authentication Message Format
[0071]
[0072] In this context, VERSION represents the SOCKS5 protocol version and can be represented by 1 byte; USERNAME_LENGTH represents the proxy server account length and can be represented by 1 byte; USERNAME represents the proxy server account and can be represented by 1 to 255 bytes; PW_LENGTH represents the proxy server password length and can be represented by 1 byte; PWD represents the proxy server password and can be represented by 1 to 255 bytes; INFO_LENGTH represents the length of the routing information and can be represented by 1 byte; INFO represents the routing information and can be represented by 0 to 255 bytes.
[0073] For UDP authentication messages, the format can be as follows:
[0074] Table 3 UDP Authentication Message Format
[0075] RSV FRAG ATYP DST.ADDR DST.PORT INFO_LENGTH INFO DATA 2 bytes 1 byte 1 byte Variable 2 bytes 1 byte 0 to 255 bytes Variable
[0076] Among them, RSV represents a reserved field, which can be used to indicate whether routing information is carried, and can be represented by 2 bytes; FRAG represents the packet fragment number, which can be represented by 1 byte; ATYP represents the destination address type, which can be represented by 1 byte; DST.ADDR represents the destination address, with no limit on the number of bytes; DST.PORT represents the destination port, which can be represented by 2 bytes; INFO_LENGTH represents the length of the routing information, which can be represented by 1 byte; INFO represents the routing information, which can be represented by 0 to 255 bytes; DATA represents the data, with no limit on the number of bytes.
[0077] The preset priority rules can be set according to actual needs, and are not limited here. In this embodiment, the preset priority rules can be set from first to last as follows:
[0078] First priority: Obtain the target acceleration link based on the link label and its corresponding link ID in the routing information;
[0079] Second priority: Obtain the target acceleration link based on the game server and its corresponding link ID in the routing information;
[0080] Third priority: Obtain the target acceleration link based on the game APP ID and its corresponding link ID in the routing information;
[0081] If no relevant link is planned under the link tag, it will be moved to the second priority; if no relevant link is planned under the game server, it will be moved to the third priority; if no relevant link is planned under the game APP ID, the default link will be determined as the target acceleration link.
[0082] In the link information hash table, each target acceleration link corresponds one-to-one with a target source IP. Therefore, the corresponding target source IP can be obtained based on the determined target acceleration link.
[0083] This embodiment achieves accurate positioning of the user-selected target acceleration link and its corresponding target source by carrying routing information in the authentication message, using preset priority rules to map a unique target acceleration link from the routing information, and then using the target acceleration link to map the target source IP, which helps to ensure high-quality transmission of subsequent data to be accelerated.
[0084] In one embodiment, routing the data policy to be accelerated to the target GRE tunnel based on the target source IP may include:
[0085] Select the target source IP from the multiple private network IPs configured in its own Loop interface, and route the data to be accelerated from the Loop interface policy to the target GRE tunnel according to the target source IP.
[0086] The Loop interface is a unified interface for the proxy server cluster. This unified interface has multiple GRE tunnels with the acceleration entry point. Multiple source IPs can be configured for this unified interface. After selecting the target source IP, the target GRE tunnel that meets the user's business needs can be selected from the multiple GRE tunnels based on the target source IP. Then, the data to be accelerated is routed from the unified interface to the target GRE tunnel so that the data to be accelerated enters the acceleration entry point.
[0087] In this embodiment, by setting up the Loop interface of the proxy server cluster and obtaining the target source IP from multiple source IPs configured in the interface, the target GRE tunnel that meets the user's business needs can be strategically selected based on the target source IP, and the data to be accelerated can be transmitted to the acceleration access point through the target GRE tunnel.
[0088] Figure 2 This is the second flowchart illustrating the proxy routing method provided in this application. (Refer to...) Figure 2 This application provides a proxy routing method applied to an optical network client, which may include:
[0089] 201. Establish a connection with the proxy server cluster based on the connection request sent to the proxy server cluster;
[0090] The connection request carries the user client's routing information;
[0091] 202. The data to be accelerated is diverted to the proxy tunnel so that it enters the proxy server cluster through the proxy tunnel and is then routed to the target acceleration link according to the routing information policy of the proxy server cluster.
[0092] A proxy tunnel is a tunnel between itself and the proxy server cluster, while a target acceleration link is an acceleration link between the acceleration entry point and the target server.
[0093] In step 202, the optical network client is configured with a list of IP addresses of multiple proxy servers in the proxy server cluster. This IP list is updated periodically. Based on the proxy server IP address in the list, the data to be accelerated is diverted to the proxy tunnel corresponding to the proxy server IP address. The data to be accelerated passes through the proxy tunnel to the corresponding proxy server. The proxy server then routes the data to be accelerated to the target GER tunnel according to the routing information. The data to be accelerated enters the acceleration access point from the target GER tunnel. Finally, the policy is routed to the target acceleration link, thereby entering the target server.
[0094] It should be noted that before step 101, it is also necessary to receive the user's routing information from the user client and the acceleration data sent by the user terminal to which the user client belongs.
[0095] The proxy routing method provided in this embodiment carries the user client's routing information in the connection request. That is, the user side has selected a route between itself and the target server that meets its own business needs. Therefore, the routing information can be used to select a target GRE tunnel that meets the user's business needs from multiple GRE tunnels, and then the routing information can be used to select the target acceleration link that best meets the user's business needs from multiple acceleration links. This enables the data to be accelerated to travel from the proxy server cluster to the acceleration entry point, then from the acceleration entry point to the target acceleration link, and finally to the target server via the link that best meets the user's business needs. This link is most suitable for the user's business needs, so it has better quality and can effectively avoid packet loss and delay problems in the transmission of the data to be accelerated.
[0096] In one embodiment, before diverting the data to be accelerated to the proxy tunnel, the following may be included:
[0097] Periodically test the latency information of all acceleration links so that user clients can obtain latency information.
[0098] In this embodiment, by probing the accelerated link through the optical network client, the latency information of the link between the accelerated access point and the target server can be periodically detected. This avoids the drawback of traditional methods that can only detect the link quality between the proxy server cluster and the accelerated access point, and can provide users with a more accurate reference for route selection.
[0099] Figure 3 This is an architecture diagram of the proxy routing system provided in the embodiments of this application;
[0100] Figure 4 This is a technical flowchart of the proxy routing system provided in the embodiments of this application.
[0101] Reference Figures 3 to 4 This application provides a proxy routing system, which may include: a proxy server cluster and an optical network client;
[0102] Proxy server clusters are used for:
[0103] A connection is established with the optical network client based on the connection request sent by the optical network client; the connection request carries the routing information of the user client;
[0104] Obtain the target source IP based on the routing information;
[0105] Establish a connection with the target server based on the target source IP, and bind the target source IP;
[0106] Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration entry point through the target GRE tunnel, and then is routed to the target acceleration link through the acceleration entry point. The target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0107] Optical network clients are used for:
[0108] A connection is established with the proxy server cluster based on the connection request sent to the proxy server cluster.
[0109] The data to be accelerated is diverted to the proxy tunnel so that it enters the proxy server cluster through the proxy tunnel and is then routed to the target acceleration link according to the routing information policy of the proxy server cluster. The proxy tunnel is a tunnel between itself and the proxy server cluster.
[0110] Specifically, refer to Figure 3 The proxy routing system can also include user terminals, user clients, control platforms, accelerated access points, accelerated links, etc. In addition, a load balancer can be set up between the optical network client and the proxy server cluster to perform load balancing on the proxy server cluster in a specific segmented network.
[0111] Reference Figure 4 The agent route selection process is in Figure 3 Under the shown architecture, the following steps can be taken:
[0112] 1. The control platform distributes configurations to the SOCKS5 proxy server cluster, including the IP configuration of each proxy server in the cluster, the rule configuration for routing the cluster to the GRE tunnel, the establishment of the GRE tunnel, and the distribution of the link information hash table.
[0113] 2. The control platform distributes configurations to the accelerated access points, including IP configurations for the accelerated access points, rule configurations for routing from the accelerated access points to the accelerated links, GRE tunnel establishment, network address translation configurations, etc., to ensure that the SOCKS5 proxy server cluster can be accelerated through the accelerated access points.
[0114] 3. The control platform distributes plugins to the optical network unit. The plugins include the optical network client and the list of proxy server IPs in the proxy server cluster. This IP list is updated regularly.
[0115] 4. The optical network client periodically probes the latency information of all accelerated links and reports the latency information to the control platform so that the user client can obtain the latency information from the control platform;
[0116] 5. The user client selects a route based on the link type, such as the game server, link tag, game APP ID, and corresponding link ID, combined with the latency information of each acceleration link, and sends the route selection information to the optical network client.
[0117] 6. The user terminal sends the data to be accelerated to the optical network client;
[0118] 7. The optical network client establishes a connection with the proxy server cluster and carries routing information to the proxy server cluster during the authentication process;
[0119] 8. If it is a TCP connection, the proxy server cluster records the routing information in the TCP authentication message;
[0120] 9. The proxy server obtains the target acceleration link from the routing information according to the preset priority rules, and uses the mapping information of the target acceleration link as the key to obtain the corresponding target source IP from the link information hash table;
[0121] 10. The proxy server cluster establishes a connection with the target server based on the target source IP and binds it to the target source IP;
[0122] 11. The optical network client redirects the data to be accelerated to the proxy tunnel;
[0123] 12. The data to be accelerated enters the proxy server cluster through the proxy tunnel. If the connection between the optical network client and the proxy server cluster is UDP, the proxy server cluster also needs to obtain routing information in this step, and establish a connection with the target server and bind the target source IP according to the routing information.
[0124] 13. The proxy server cluster routes the data to be accelerated from the LOOP interface policy to the target GRE tunnel based on the target source IP, and the data to be accelerated enters the acceleration access point;
[0125] 14. The acceleration entry point routes the data to be accelerated to the target acceleration link based on the target source IP, and performs address translation on the internal network address to which the data to be accelerated belongs, so as to convert the private address of the internal network to a public address.
[0126] 15. Data interaction occurs between the target acceleration link and the proxy server cluster;
[0127] 16. The proxy server cluster interacts with the user terminal to achieve high-quality communication between the user terminal and the target server.
[0128] The proxy routing system provided in this embodiment carries the user client's routing information in the connection request and can obtain the target source IP through the routing information. That is, the user side has selected a route between itself and the target server that meets its own business needs, and there is a one-to-one mapping relationship between the routing information and the target source IP. Therefore, it can select a target GRE tunnel that meets the user's business needs from multiple GRE tunnels through the target source IP corresponding to the routing information, and then select the target acceleration link that best meets the user's business needs from multiple acceleration links through the target source IP. Thus, the data to be accelerated is transmitted from the proxy server cluster to the acceleration entry point through the link that best meets the user's business needs, and then from the acceleration entry point to the target acceleration link, and finally arrives at the target server. This link is most suitable for the user's business needs, so the quality is better and it can effectively avoid packet loss and delay problems in the transmission of the data to be accelerated.
[0129] Figure 5 An example is a schematic diagram of the structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call a computer program in the memory 530 to execute steps of the proxy routing method, such as:
[0130] A connection is established with the optical network client based on a connection request sent by the optical network client; the connection request carries the routing information of the user client.
[0131] Obtain the target source IP based on the routing information;
[0132] A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP;
[0133] Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, so that the data enters the acceleration entry point through the target GRE tunnel, and is then routed to the target acceleration link through the acceleration entry point's policy; the target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server; or
[0134] A connection is established with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries the routing information of the user client.
[0135] The data to be accelerated is diverted to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and is then routed to the target acceleration link by the proxy server cluster according to the routing information policy; the proxy tunnel is the tunnel between itself and the proxy server cluster, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0136] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0137] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the proxy routing method provided in the above embodiments, such as including:
[0138] A connection is established with the optical network client based on a connection request sent by the optical network client; the connection request carries the routing information of the user client.
[0139] Obtain the target source IP based on the routing information;
[0140] A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP;
[0141] Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, so that the data enters the acceleration entry point through the target GRE tunnel, and is then routed to the target acceleration link through the acceleration entry point's policy; the target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server; or
[0142] A connection is established with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries the routing information of the user client.
[0143] The data to be accelerated is diverted to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and is then routed to the target acceleration link by the proxy server cluster according to the routing information policy; the proxy tunnel is the tunnel between itself and the proxy server cluster, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0144] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to perform the steps of the methods provided in the above embodiments, such as including:
[0145] A connection is established with the optical network client based on a connection request sent by the optical network client; the connection request carries the routing information of the user client.
[0146] Obtain the target source IP based on the routing information;
[0147] A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP;
[0148] Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, so that the data enters the acceleration entry point through the target GRE tunnel, and is then routed to the target acceleration link through the acceleration entry point's policy; the target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server; or
[0149] A connection is established with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries the routing information of the user client.
[0150] The data to be accelerated is diverted to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and is then routed to the target acceleration link by the proxy server cluster according to the routing information policy; the proxy tunnel is the tunnel between itself and the proxy server cluster, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
[0151] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0152] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A proxy routing method, characterized in that, Applied to proxy server clusters, including: A connection is established with the optical network client based on a connection request sent by the optical network client; the connection request carries the routing information of the user client. Obtaining the target source IP based on the routing information includes: The target acceleration link is obtained from the routing information according to a preset priority rule; The target source IP is obtained from the link information hash table based on the target acceleration link. A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP; Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, including: Select the target source IP from the multiple private network IPs configured in its own Loop interface; Based on the target source IP, the data to be accelerated is routed from the Loop interface policy to the target GRE tunnel, so that the data to be accelerated enters the acceleration entry point through the target GRE tunnel, and is then routed to the target acceleration link through the acceleration entry point policy; the target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
2. The proxy routing method according to claim 1, characterized in that, The routing information is defined in TLV format, where the type in the TLV format is a link type, and the value in the TLV format is the link ID corresponding to the link type.
3. A proxy routing method, characterized in that, Applied to optical network clients, including: A connection is established with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries the routing information of the user client. The data to be accelerated is diverted to the proxy tunnel so that it enters the proxy server cluster through the tunnel. The proxy server cluster obtains the target source IP based on the routing information, including: The target acceleration link is obtained from the routing information according to a preset priority rule; The target source IP is obtained from the link information hash table based on the target acceleration link. Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, including: Select the target source IP from the multiple private network IPs configured in its own Loop interface; Based on the target source IP, the data to be accelerated is routed from the Loop interface policy to the target GRE tunnel; The data to be accelerated enters the acceleration entry point through the target GRE tunnel, and then is routed to the target acceleration link through the acceleration entry point's policy; the proxy tunnel is the tunnel between itself and the proxy server cluster, and the target acceleration link is the acceleration link between the acceleration entry point and the target server.
4. The proxy routing method according to claim 3, characterized in that, Before diverting the data to be accelerated to the proxy tunnel, the process includes: The latency information of all acceleration links is periodically measured so that the user client can obtain the latency information.
5. The proxy routing method according to claim 3, characterized in that, Before establishing a connection with the proxy server cluster based on the connection request sent to the proxy server cluster, the process includes: Receive routing information sent by the user client; Receive the acceleration data sent by the user terminal to which the user client belongs.
6. A proxy routing system, characterized in that, include: Proxy server clusters and optical network clients; The proxy server cluster is used for: A connection is established with the optical network client based on the connection request sent by the optical network client. The connection request carries the user client's routing information; Obtaining the target source IP based on the routing information includes: The target acceleration link is obtained from the routing information according to a preset priority rule; The target source IP is obtained from the link information hash table based on the target acceleration link. A connection is established with the target server based on the target source IP, and the connection is bound to the target source IP; Based on the target source IP, the data to be accelerated is routed to the target GRE tunnel, including: Select the target source IP from the multiple private network IPs configured in its own Loop interface; Based on the target source IP, the data to be accelerated is routed from the Loop interface policy to the target GRE tunnel, so that the data to be accelerated enters the acceleration entry point through the target GRE tunnel, and is then routed to the target acceleration link through the acceleration entry point policy; the target GRE tunnel is the GRE tunnel between itself and the acceleration entry point, and the target acceleration link is the acceleration link between the acceleration entry point and the target server. The optical network client is used for: A connection is established with the proxy server cluster based on the connection request sent to the proxy server cluster. The data to be accelerated is diverted to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and is then routed to the target acceleration link by the proxy server cluster according to the routing information policy; the proxy tunnel is a tunnel between itself and the proxy server cluster.
7. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the proxy routing method according to any one of claims 1 to 2, or the steps of the proxy routing method according to any one of claims 3 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the proxy routing method according to any one of claims 1 to 2, or implements the steps of the proxy routing method according to any one of claims 3 to 5.
Citation Information
Patent Citations
Transmission link management method and device, electronic equipment and storage medium
CN111211980A
Data transmission method and device, equipment and storage medium
CN116546105A