[go: up one dir, main page]

CN118803474A - Proxy routing method and system - Google Patents

Proxy routing method and system Download PDF

Info

Publication number
CN118803474A
CN118803474A CN202410046411.8A CN202410046411A CN118803474A CN 118803474 A CN118803474 A CN 118803474A CN 202410046411 A CN202410046411 A CN 202410046411A CN 118803474 A CN118803474 A CN 118803474A
Authority
CN
China
Prior art keywords
target
proxy
acceleration
link
accelerated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410046411.8A
Other languages
Chinese (zh)
Inventor
吴焕政
张亮
童烨彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202410046411.8A priority Critical patent/CN118803474A/en
Publication of CN118803474A publication Critical patent/CN118803474A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0073Provisions for forwarding or routing, e.g. lookup tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请涉及通信技术领域,提供一种代理选路方法及系统。所述方法包括:基于光网络客户端发送的连接请求,与光网络客户端建立连接;连接请求携带用户客户端的选路信息;根据选路信息获取目标源IP;基于目标源IP与目标服务器建立连接;根据目标源IP,将待加速数据策略路由至目标GRE隧道,以使待加速数据经过目标GRE隧道进入加速入网点,再经过加速入网点策略路由至目标加速链路。本申请提供的代理选路方法中,待加速数据以最符合业务需求的链路从代理服务器集群至加速入网点,再从加速入网点至目标加速链路,最后抵达目标服务器,该链路与用户业务需求最为适配,因而质量较好,有效避免待加速数据在传输过程中的丢包和延迟问题。

The present application relates to the field of communication technology, and provides a proxy routing method and system. The method includes: establishing a connection with an optical network client based on a connection request sent by an optical network client; the connection request carries the routing information of the user client; obtaining the target source IP according to the routing information; establishing a connection with the target server based on the target source IP; according to the target source IP, strategically routing the data to be accelerated to the target GRE tunnel, so that the data to be accelerated enters the acceleration point through the target GRE tunnel, and then strategically routes to the target acceleration link through the acceleration point. In the proxy routing method provided by the present application, the data to be accelerated is transmitted from the proxy server cluster to the acceleration point through the link that best meets the business needs, and then from the acceleration point to the target acceleration link, and finally arrives at the target server. The link is most adapted to the user's business needs, so the quality is better, and the packet loss and delay problems of the data to be accelerated during transmission are effectively avoided.

Description

代理选路方法及系统Proxy routing method and system

技术领域Technical Field

本申请涉及通信技术领域,具体涉及一种代理选路方法及系统。The present application relates to the field of communication technology, and in particular to a proxy routing method and system.

背景技术Background Art

SOCKS5是一个代理协议,它在使用TCP/IP协议通信的用户端和目标服务器之间扮演一个中介角色,使得内部网中的用户端变得能够访问互联网中的服务器。SOCKS5代理服务器通过将用户端发来的请求转发给目标服务器,模拟了一个用户端的行为。具体来说,用户端和代理服务器之间也是通过TCP/IP协议进行通信,用户端将原本要发送给目标服务器的请求发送给代理服务器,然后代理服务器将该请求转发给目标服务器,实现用户端与目标服务器之间的通信。SOCKS5 is a proxy protocol that plays an intermediary role between the client and the target server that communicate using the TCP/IP protocol, allowing the client in the intranet to access the server on the Internet. The SOCKS5 proxy server simulates the behavior of a client by forwarding the request sent by the client to the target server. Specifically, the client and the proxy server also communicate through the TCP/IP protocol. The client sends the request originally intended for the target server to the proxy server, and then the proxy server forwards the request to the target server to achieve communication between the client and the target server.

在云游戏、高清视频通话、AR/VR等新兴数字家庭业务中,存在用户端对特定网站进行合法访问的场景,此时就需要通过代理服务器作为中介,实现用户端与这些特定网站所属的目标服务器之间的连接通信。但用户端与目标服务器之间的链路众多,传统的代理访问方法中,用户端无法根据自身业务需求选择合适的链路,导致链路质量较差,在数据传输过程中容易出现丢包和延迟问题。In emerging digital home services such as cloud gaming, high-definition video calls, AR/VR, etc., there are scenarios where the user end legally accesses specific websites. In this case, a proxy server is needed as an intermediary to achieve connection and communication between the user end and the target server to which these specific websites belong. However, there are many links between the user end and the target server. In the traditional proxy access method, the user end cannot select the appropriate link according to its own business needs, resulting in poor link quality, and packet loss and delay problems are prone to occur during data transmission.

发明内容Summary of the invention

本申请实施例提供一种代理选路方法及系统,用以解决传统的代理访问方法中,用户端无法根据自身业务需求选择合适的链路,导致链路质量较差,在数据传输过程中容易出现丢包和延迟问题的技术问题。The embodiments of the present application provide a proxy routing method and system to solve the technical problem that in the traditional proxy access method, the user end cannot select a suitable link according to its own business needs, resulting in poor link quality and prone to packet loss and delay problems during data transmission.

第一方面,本申请实施例提供一种代理选路方法,应用于代理服务器集群,包括:In a first aspect, an embodiment of the present application provides a proxy routing method, which is applied to a proxy server cluster, including:

基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client;

根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information;

基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP;

根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路。According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server.

在一个实施例中,所述根据所述选路信息获取目标源IP,包括:In one embodiment, obtaining the target source IP address according to the routing information includes:

根据预设优先级规则在所述选路信息中获取目标加速链路;Acquire a target acceleration link from the routing information according to a preset priority rule;

根据所述目标加速链路从链路信息哈希表中获取对应的目标源IP。According to the target acceleration link, the corresponding target source IP is obtained from the link information hash table.

在一个实施例中,所述根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,包括:In one embodiment, the policy routing the data to be accelerated to the target GRE tunnel according to the target source IP includes:

在自身Loop接口配置的多个私网IP中选择所述目标源IP;Select the target source IP from multiple private IPs configured on its own Loop interface;

根据所述目标源IP将待加速数据从所述Loop接口策略路由至目标GRE隧道。The data to be accelerated is routed from the Loop interface policy to the target GRE tunnel according to the target source IP.

在一个实施例中,所述选路信息以TLV格式定义,所述TLV格式中的类型为链路类型,所述TLV格式中的值为所述链路类型对应的链路ID。In one embodiment, the routing information is defined in a TLV format, the type in the TLV format is a link type, and the value in the TLV format is a link ID corresponding to the link type.

第二方面,本申请实施例提供一种代理选路方法,应用于光网络客户端,包括:In a second aspect, an embodiment of the present application provides a proxy routing method, which is applied to an optical network client, comprising:

基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries routing information of the user client;

将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道,所述目标加速链路是加速入网点与目标服务器之间的加速链路。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster, and the target acceleration link is an acceleration link between the acceleration entry point and the target server.

在一个实施例中,所述将待加速数据引流至代理隧道之前,包括:In one embodiment, before directing the data to be accelerated to the proxy tunnel, the process includes:

周期性拨测所有加速链路的时延信息,以供所述用户客户端获取所述时延信息。The delay information of all acceleration links is periodically dialed to allow the user client to obtain the delay information.

在一个实施例中,所述基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接之前,包括:In one embodiment, before establishing a connection with the proxy server cluster based on the connection request sent to the proxy server cluster, the method includes:

接收所述用户客户端发送的选路信息;Receiving routing information sent by the user client;

接收所述用户客户端所属的用户终端发送的待加速数据。Receive data to be accelerated sent by a user terminal to which the user client belongs.

第三方面,本申请实施例提供一种代理选路系统,包括:代理服务器集群和光网络客户端;In a third aspect, an embodiment of the present application provides a proxy routing system, including: a proxy server cluster and an optical network client;

所述代理服务器集群用于:The proxy server cluster is used for:

基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client;

根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information;

基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP;

根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路;According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server;

所述光网络客户端用于:The optical network client is used for:

基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster;

将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster.

第四方面,本申请实施例提供一种电子设备,包括处理器和存储有计算机程序的存储器,所述处理器执行所述程序时实现第一方面或第二方面所述的代理选路方法的步骤。In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the program, the steps of the proxy routing method described in the first aspect or the second aspect are implemented.

第五方面,本申请实施例提供一种非暂态计算机可读存储介质,包括计算机程序,所述计算机程序被处理器执行时实现第一方面或第二方面所述的代理选路方法的步骤。In a fifth aspect, an embodiment of the present application provides 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 aspect or the second aspect.

本申请提供的代理选路方法及系统,代理服务器集群基于光网络客户端发送的连接请求,与光网络客户端建立连接,连接请求携带用户客户端的选路信息,根据选路信息获取目标源IP,基于目标源IP与目标服务器建立连接,并绑定目标源IP,根据目标源IP,将待加速数据策略路由至目标GRE隧道,以使待加速数据经过目标GRE隧道进入加速入网点,再经过加速入网点策略路由至目标加速链路,目标GRE隧道是自身与加速入网点之间的隧道,目标加速链路是加速入网点与目标服务器之间的加速链路。由于连接请求携带了用户客户端的选路信息,且能够通过选路信息获取目标源IP,即用户侧对自身与目标服务器之间的链路进行了符合自身业务需求的选路,且选路信息与目标源IP存在一一对应的映射关系,因此,可以通过与选路信息对应的目标源IP从多个GRE隧道中选择符合用户业务需求的目标GRE隧道,再通过该目标源IP从多个加速链路中选择最符合用户业务需求的目标加速链路,从而实现待加速数据以最符合用户业务需求的链路从代理服务器集群至加速入网点,再从加速入网点至目标加速链路,最后抵达目标服务器,该链路与用户业务需求最为适配,因而质量较好,能够有效避免待加速数据在传输过程中的丢包和延迟问题。The proxy routing method and system provided by the present application, the proxy server cluster 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, obtains the target source IP according to the routing information, establishes a connection with the target server based on the target source IP, and binds the target source IP, and according to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration network entry point through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration network entry point, the target GRE tunnel is the tunnel between itself and the acceleration network entry point, and the target acceleration link is the acceleration link between the acceleration network entry point and the target server. Since the connection request carries the routing information of the user client and the target source IP can be obtained through the routing information, that is, the user side has performed routing on the link between itself and the target server in accordance with its own business needs, and there is a one-to-one mapping relationship 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 through the target source IP corresponding to the routing information, and then the target acceleration link that best meets the user's business needs can be selected from multiple acceleration links through the target source IP, so that the data to be accelerated can be transmitted from the proxy server cluster to the acceleration access point through the link that best meets the user's business needs, and then from the acceleration access point to the target acceleration link, and finally arrives at the target server. This link is most adapted to the user's business needs, and therefore has better quality, which can effectively avoid packet loss and delay problems during the transmission of the data to be accelerated.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

图1是本申请实施例提供的代理选路方法的流程示意图之一;FIG1 is a flow chart of a proxy routing method according to an embodiment of the present application;

图2是本申请实施例提供的代理选路方法的流程示意图之二;FIG2 is a second flow chart of the proxy routing method provided in an embodiment of the present application;

图3是本申请实施例提供的代理选路系统的架构图;FIG3 is an architecture diagram of a proxy routing system provided in an embodiment of the present application;

图4是本申请实施例提供的代理选路系统的技术流程图;FIG4 is a technical flow chart of a proxy routing system provided in an embodiment of the present application;

图5是本申请实施例提供的电子设备的结构示意图。FIG. 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

图1是本申请实施例提供的代理选路方法的流程示意图之一。参照图1,本申请实施例提供一种代理选路方法,应用于代理服务器集群,可以包括:FIG1 is a flow chart of a proxy routing method provided in an embodiment of the present application. Referring to FIG1 , an embodiment of the present application provides a proxy routing method, which is applied to a proxy server cluster and may include:

101、基于光网络客户端发送的连接请求,与光网络客户端建立连接;101. Establishing a connection 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;

102、根据选路信息获取目标源IP;102. Obtain the target source IP address based on the routing information;

103、基于目标源IP与目标服务器建立连接,并绑定目标源IP;103. Establish a connection with the target server based on the target source IP and bind the target source IP;

104、根据目标源IP,将待加速数据策略路由至目标GRE隧道,以使待加速数据经过目标GRE隧道进入加速入网点,再经过加速入网点策略路由至目标加速链路。104. According to the target source IP, the data to be accelerated is strategically 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 strategically routed to the target acceleration link through the acceleration entry point.

目标GRE隧道是自身与加速入网点之间的GRE隧道,目标加速链路是加速入网点与目标服务器之间的加速链路。The target GRE tunnel is the GRE tunnel between itself and the acceleration point of presence, and the target acceleration link is the acceleration link between the acceleration point of presence and the target server.

步骤101中,光网络客户端与代理服务器集群建立连接的过程包括SOCKS5的握手与认证过程,该选路信息是在认证过程中,光网络客户端向代理服务器集群发送的认证报文中携带的。另外,光网络客户端与代理服务器集群之间的连接包括TCP连接和UDP连接,若是TCP连接,则选路信息由TCP认证报文携带,若是UDP连接,则选路信息由UDP认证报文携带。其中,TCP(Transmission Control Protocol,传输控制协议)连接是一种面向连接的、可靠的、基于字节流的传输层通信协议的连接,UDP(User Datagram Protocol,用户数据报协议)连接则为应用程序提供了一种无需建立连接就可以发送封装的IP数据包的方法。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. In addition, the connection between the optical network client and the proxy server cluster includes a TCP connection and a UDP connection. If it is a TCP connection, the routing information is carried by the TCP authentication message, and if it is a UDP connection, the routing information is carried by the UDP authentication message. Among them, the TCP (Transmission Control Protocol) connection is a connection-oriented, reliable, byte stream-based transport layer communication protocol connection, and the UDP (User Datagram Protocol) connection provides a method for applications to send encapsulated IP data packets without establishing a connection.

步骤104中,GRE(Generic Routing Encapsulation,通用路由封装)隧道,是基于GRE隧道协议创建的隧道,用于将SOCKS5协议下的待加速数据进行封装并传输至加速入网点,以达到代理服务器集群与加速入网点之间的直连效果。In step 104, the GRE (Generic Routing Encapsulation) tunnel is a tunnel created based on the GRE tunnel protocol, which is used to encapsulate the data to be accelerated under the SOCKS5 protocol and transmit it to the acceleration access point to achieve a direct connection effect between the proxy server cluster and the acceleration access point.

本实施例提供的代理选路方法,代理服务器集群基于光网络客户端发送的连接请求,与光网络客户端建立连接,连接请求携带用户客户端的选路信息,根据选路信息获取目标源IP,基于目标源IP与目标服务器建立连接,并绑定目标源IP,根据目标源IP,将待加速数据策略路由至目标GRE隧道,以使待加速数据经过目标GRE隧道进入加速入网点,再经过加速入网点策略路由至目标加速链路,目标GRE隧道是自身与加速入网点之间的隧道,目标加速链路是加速入网点与目标服务器之间的加速链路。由于连接请求携带了用户客户端的选路信息,且能够通过选路信息获取目标源IP,即用户侧对自身与目标服务器之间的链路进行了符合自身业务需求的选路,且选路信息与目标源IP存在一一对应的映射关系,因此,可以通过与选路信息对应的目标源IP从多个GRE隧道中选择符合用户业务需求的目标GRE隧道,再通过该目标源IP从多个加速链路中选择最符合用户业务需求的目标加速链路,从而实现待加速数据以最符合用户业务需求的链路从代理服务器集群至加速入网点,再从加速入网点至目标加速链路,最后抵达目标服务器,该链路与用户业务需求最为适配,因而质量较好,能够有效避免待加速数据在传输过程中的丢包和延迟问题。The proxy routing method provided in this embodiment is that the proxy server cluster 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, obtains the target source IP according to the routing information, establishes a connection with the target server based on the target source IP, and binds the target source IP. According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration network entry point through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration network entry point. The target GRE tunnel is a tunnel between itself and the acceleration network entry point, and the target acceleration link is an acceleration link between the acceleration network entry point and the target server. Since the connection request carries the routing information of the user client and the target source IP can be obtained through the routing information, that is, the user side has performed routing on the link between itself and the target server in accordance with its own business needs, and there is a one-to-one mapping relationship 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 through the target source IP corresponding to the routing information, and then the target acceleration link that best meets the user's business needs can be selected from multiple acceleration links through the target source IP, so that the data to be accelerated can be transmitted from the proxy server cluster to the acceleration access point through the link that best meets the user's business needs, and then from the acceleration access point to the target acceleration link, and finally arrives at the target server. This link is most adapted to the user's business needs, and therefore has better quality, which can effectively avoid packet loss and delay problems during the transmission of the data to be accelerated.

在一个实施例中,根据选路信息获取目标源IP,可以包括:In one embodiment, obtaining the target source IP address according to the routing information may include:

根据预设优先级规则在选路信息中获取目标加速链路,根据目标加速链路从链路信息哈希表中获取对应的目标源IP。The target acceleration link is obtained from the routing information according to the preset priority rule, and the corresponding target source IP is obtained from the link information hash table according to the target acceleration link.

其中,选路信息可以TLV(Type:类型,Length:长度,Value:值)格式表示如下:The routing information can be expressed in TLV (Type: type, Length: length, Value: value) format as follows:

表1选路信息格式Table 1 Routing information format

TYPETYPE LENGTHLENGTH VALUEVALUE 1字节1 byte 1字节1 byte 1字节1 byte

其中,TYPE代表选路信息中的链路类型,可用1个字节表示;LENGTH代表选路信息的长度,可用1个字节表示;VALUE代表选路信息中链路类型对应的链路ID,可用1字节表示。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.

其中,针对游戏业务,可选的TYPE可以包括:Among them, for the game business, the optional TYPE may include:

0x01:终端类型;0x01: terminal type;

0x02:游戏ID;0x02: game ID;

0x03:游戏区服;0x03: Game server;

0x04:链路标签;0x04: link label;

0x05:游戏APP ID;0x05: game APP ID;

0x06~0xFF:预留。0x06~0xFF: Reserved.

其中,链路标签与链路ID的区别在于,链路标签用于标识多个链路ID同属的一个链路类型,而链路ID则用于标识每个链路类型下的唯一链路,例如链路标签可以用于标识K国链路,即标识连接至K国服务器的所有链路,链路ID则可以用于标识其中一条链路。The difference between the link label and the link ID is that the link label is used to identify a link type to which multiple link IDs belong, while the link ID is used to identify a unique link under each link type. For example, the link label can be used to identify the country K link, that is, to identify all links connected to the country K server, and the link ID can be used to identify one of the links.

如果某一链路类型下有多条链路,则可以用TYPE+VALUE的形式映射唯一的目标加速链路,例如K国区服下有line1、line2和line3三条链路,则可以根据K国区服+line1/line2/line3的形式映射目标加速链路,以加速服务器在K国的游戏;如果某一链路类型下的链路只有一条,则可以直接根据该链路类型TYPE映射唯一的目标加速链路,例如游戏ID下只有line4链路,则可以直接根据该游戏ID映射line4为目标加速链路,以加速该游戏。If there are multiple links under a certain link type, a unique target acceleration link can be mapped in the form of TYPE+VALUE. For example, if there are three links, line1, line2 and line3, under the K country server, the target acceleration link can be mapped in the form of K country server+line1/line2/line3 to accelerate the game of the server in K country; if there is only one link under a certain link type, a unique target acceleration link can be directly mapped according to the link type TYPE. For example, if there is only line4 link under the game ID, line4 can be directly mapped as the target acceleration link according to the game ID to accelerate the game.

进一步地,选路信息可以在认证报文的INFO字段中进行描述,具体来说,对于TCP认证报文,其格式可如下所示:Furthermore, the routing information may be described in the INFO field of the authentication message. Specifically, for a TCP authentication message, the format may be as follows:

表2TCP认证报文格式Table 2 TCP authentication message format

其中,VERSION代表SOCKS5协议版本,可用1个字节表示;USERNAME_LENGTH代表代理服务器的账号长度,可用1个字节表示;USERNAME代表代理服务器的账号,该账号可用1到255个字节表示;PW_LENGTH代表代理服务器的密码长度,可用1个字节表示;PWD代表代理服务器的密码,该密码可用1到255个字节表示;INFO_LENGTH代表选路信息的长度,可用1个字节表示;INFO代表选路信息,该选路信息可用0到255个字节表示。Among them, VERSION represents the SOCKS5 protocol version, which can be represented by 1 byte; USERNAME_LENGTH represents the length of the proxy server account, which can be represented by 1 byte; USERNAME represents the account of the proxy server, which can be represented by 1 to 255 bytes; PW_LENGTH represents the length of the proxy server password, which can be represented by 1 byte; PWD represents the password of the proxy server, which can be represented by 1 to 255 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.

对于UDP认证报文,其格式可如下所示:For UDP authentication message, its format can be as follows:

表3UDP认证报文格式Table 3 UDP authentication message format

RSVRSV FRAGFRAG ATYPATYP DST.ADDRDST.ADDR DST.PORTDST.PORT INFO_LENGTHINFO_LENGTH INFOINFO DATADATA 2字节2 bytes 1字节1 byte 1字节1 byte VariableVariable 2字节2 bytes 1字节1 byte 0到255字节0 to 255 bytes VariableVariable

其中,RSV代表预留字段,可用于表示是否携带选路信息,可用2个字节表示;FRAG代表数据包分片号,可用1个字节表示;ATYP代表目标地址类型,可用1个字节表示;DST.ADDR代表目标地址,不限制字节数;DST.PORT代表目标端口,可用2个字节表示;INFO_LENGTH代表选路信息的长度,可用1个字节表示;INFO代表选路信息,该选路信息可用0到255个字节表示;DATA代表数据,不限制字节数。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 data packet fragment number and can be represented by 1 byte; ATYP represents the target address type and can be represented by 1 byte; DST.ADDR represents the target address, with no limit on the number of bytes; DST.PORT represents the target port and can be represented by 2 bytes; INFO_LENGTH represents the length of the routing information and can be represented by 1 byte; INFO represents the routing information, which can be represented by 0 to 255 bytes; DATA represents data, with no limit on the number of bytes.

预设优先级规则可以根据实际需求进行设定,此处不作限定,本实施例中,可将预设优先级规则由先至后设定如下: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:

第一优先级:根据选路信息中的链路标签及其对应的链路ID,获取目标加速链路;First priority: Obtain the target acceleration link based on the link label and its corresponding link ID in the routing information;

第二优先级:根据选路信息中的游戏区服及其对应的链路ID,获取目标加速链路;Second priority: Obtain the target acceleration link based on the game zone and its corresponding link ID in the routing information;

第三优先级:根据选路信息中的游戏APP ID及其对应的链路ID,获取目标加速链路;Priority 3: Obtain the target acceleration link based on the game APP ID and its corresponding link ID in the routing information;

其中,若链路标签下未规划相关链路,则转至第二优先级,若游戏区服下未规划相关链路,则转至第三优先级,若游戏APP ID下未规划相关链路,则将默认链路确定为目标加速链路。Among them, if no relevant link is planned under the link label, it will be transferred to the second priority. If no relevant link is planned under the game area, it will be transferred 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.

在链路信息哈希表中,任一目标加速链路均与一目标源IP一一对应,因此,可以根据确定的目标加速链路获取对应的目标源IP。In the link information hash table, any target acceleration link corresponds to a target source IP one by one, so the corresponding target source IP can be obtained according to the determined target acceleration link.

本实施例通过在认证报文中携带选路信息,并利用预设优先级规则从选路信息中映射唯一目标加速链路,再利用目标加速链路映射目标源IP,从而实现对用户选择的目标加速链路及其对应的目标源的精准定位,有助于后续待加速数据的高质量传输。This embodiment carries routing information in the authentication message, maps a unique target acceleration link from the routing information using a preset priority rule, and then uses the target acceleration link to map the target source IP, thereby achieving accurate positioning of the target acceleration link selected by the user and its corresponding target source, which facilitates high-quality transmission of subsequent data to be accelerated.

在一个实施例中,根据目标源IP,将待加速数据策略路由至目标GRE隧道,可以包括:In one embodiment, according to the target source IP, policy routing of the data to be accelerated to the target GRE tunnel may include:

在自身Loop接口配置的多个私网IP中选择目标源IP,根据目标源IP将待加速数据从Loop接口策略路由至目标GRE隧道。Select a target source IP from multiple private IPs configured on its own Loop interface, and route the data to be accelerated from the Loop interface policy to the target GRE tunnel based on the target source IP.

Loop接口为代理服务器集群的统一接口,该统一接口与加速入网点之间具有多个GRE隧道,可以为该统一接口配置多个源IP,从中选定目标源IP后,可以根据目标源IP,从多个GRE隧道中选择符合用户业务需求的目标GRE隧道,再将待加速数据从该统一接口路由至目标GRE隧道,以使待加速数据进入加速入网点。The Loop interface is a unified interface of the proxy server cluster. There are multiple GRE tunnels between the unified interface and the acceleration entry point. Multiple source IPs can be configured for the unified interface. After selecting the target source IP, the target GRE tunnel that meets the user's business needs can be selected from multiple GRE tunnels based on the target source IP, and then the data to be accelerated can be routed from the unified interface to the target GRE tunnel so that the data to be accelerated can enter the acceleration entry point.

本实施例中,通过设置代理服务器集群的Loop接口,并从该接口配置的多个源IP中获取目标源IP,能够根据目标源IP策略性地选择符合用户业务需求的目标GRE隧道,并将待加速数据通过目标GRE隧道传输至加速入网点。In this embodiment, by setting the Loop interface of the proxy server cluster and obtaining the target source IP from the multiple source IPs configured on the interface, the target GRE tunnel that meets the user's business needs can be strategically selected according to the target source IP, and the data to be accelerated can be transmitted to the acceleration access point through the target GRE tunnel.

图2是本申请实施例提供的代理选路方法的流程示意图之二。参照图2,本申请实施例提供一种代理选路方法,应用于光网络客户端,可以包括:FIG2 is a second flow chart of the proxy routing method provided by an embodiment of the present application. Referring to FIG2 , an embodiment of the present application provides a proxy routing method, which is applied to an optical network client and may include:

201、基于向代理服务器集群发送的连接请求,与代理服务器集群建立连接;201. Establishing a connection 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;

202、将待加速数据引流至代理隧道,以使待加速数据经过代理隧道进入代理服务器集群,再经过代理服务器集群根据选路信息策略路由至目标加速链路。202. The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link according to the routing information policy through the proxy server cluster.

代理隧道是自身与代理服务器集群之间的隧道,目标加速链路是加速入网点与目标服务器之间的加速链路。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 point of entry and the target server.

步骤202中,光网络客户端中配置有代理服务器集群中的多个代理服务器的IP列表,该IP列表定期更新,根据该列表中的代理服务器IP,将待加速数据引流至与代理服务器IP对应的代理隧道,使得待加速数据经过代理隧道进行对应的代理服务器,代理服务器再根据选路信息将待加速数据策略路由至目标GER隧道,待加速数据从目标GER隧道进入加速入网点,最后策略路由至目标加速链路,从而进入目标服务器。In step 202, the optical network client is configured with an IP list of multiple proxy servers in the proxy server cluster, and the IP list is updated regularly. According to the proxy server IP in the list, the data to be accelerated is directed to the proxy tunnel corresponding to the proxy server IP, so that the data to be accelerated passes through the proxy tunnel to the corresponding proxy server. The proxy server then strategically routes the data to be accelerated to the target GER tunnel according to the routing information. The data to be accelerated enters the acceleration entry point from the target GER tunnel, and is finally strategically routed to the target acceleration link, thereby entering the target server.

需要说明的是,在步骤101之前,还需要从用户客户端接收用户的选路信息,且接收用户客户端所属的用户终端发送的待加速数据。It should be noted that, before step 101, it is also necessary to receive the user's routing information from the user client, and receive the data to be accelerated sent by the user terminal to which the user client belongs.

本实施例提供的代理选路方法,由于连接请求携带了用户客户端的选路信息,即用户侧对自身与目标服务器之间的链路进行了符合自身业务需求的选路,因此,可以通过选路信息从多个GRE隧道中选择符合用户业务需求的目标GRE隧道,再通过选路信息从多个加速链路中选择最符合用户业务需求的目标加速链路,从而实现待加速数据以最符合用户业务需求的链路从代理服务器集群至加速入网点,再从加速入网点至目标加速链路,最后抵达目标服务器,该链路与用户业务需求最为适配,因而质量较好,能够有效避免待加速数据在传输过程中的丢包和延迟问题。The proxy routing method provided in this embodiment, since the connection request carries the routing information of the user client, that is, the user side performs routing on the link between itself and the target server in accordance with its own business needs, therefore, the target GRE tunnel that meets the user's business needs can be selected from multiple GRE tunnels through the routing information, and then the target acceleration link that best meets the user's business needs can be selected from multiple acceleration links through the routing information, so that the data to be accelerated can be transmitted from the proxy server cluster to the acceleration access point through the link that best meets the user's business needs, and then from the acceleration access point to the target acceleration link, and finally arrives at the target server. This link is most adapted to the user's business needs, and thus has better quality, and can effectively avoid packet loss and delay problems of the data to be accelerated during transmission.

在一个实施例中,将待加速数据引流至代理隧道之前,可以包括:In one embodiment, before directing the data to be accelerated to the proxy tunnel, the following steps may be included:

周期性拨测所有加速链路的时延信息,以供用户客户端获取时延信息。Periodically measure the latency information of all acceleration links so that the user client can obtain the latency information.

本实施例中,通过光网络客户端对加速链路的拨测,可以实现对加速入网点到目标服务器之间链路的时延信息的周期性探测,避免了传统方法只能探测代理服务器集群与加速入网点之间链路质量的弊端,能够为用户选路提供更加精准的参考。In this embodiment, by dialing the acceleration link through the optical network client, periodic detection of the delay information of the link between the acceleration access point and the target server can be achieved, avoiding the disadvantage that the traditional method can only detect the link quality between the proxy server cluster and the acceleration access point, and can provide a more accurate reference for user route selection.

图3是本申请实施例提供的代理选路系统的架构图;FIG3 is an architecture diagram of a proxy routing system provided in an embodiment of the present application;

图4是本申请实施例提供的代理选路系统的技术流程图。FIG4 is a technical flow chart of the proxy routing system provided in an embodiment of the present application.

参照图3至图4,本申请实施例提供一种代理选路系统,可以包括:代理服务器集群和光网络客户端;3 to 4 , an embodiment of the present application provides a proxy routing system, which may include: a proxy server cluster and an optical network client;

代理服务器集群用于:Proxy server clusters are used to:

基于光网络客户端发送的连接请求,与光网络客户端建立连接;连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client;

根据选路信息获取目标源IP;Get the target source IP based on the routing information;

基于目标源IP与目标服务器建立连接,并绑定目标源IP;Establish a connection with the target server based on the target source IP and bind the target source IP;

根据目标源IP,将待加速数据策略路由至目标GRE隧道,以使待加速数据经过目标GRE隧道进入加速入网点,再经过加速入网点策略路由至目标加速链路;目标GRE隧道是自身与加速入网点之间的GRE隧道,目标加速链路是加速入网点与目标服务器之间的加速链路;According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point; the target GRE tunnel is the GRE tunnel between itself and the acceleration point, and the target acceleration link is the acceleration link between the acceleration point and the target server;

光网络客户端用于:Optical Network Client is used for:

基于向代理服务器集群发送的连接请求,与代理服务器集群建立连接;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster;

将待加速数据引流至代理隧道,以使待加速数据经过代理隧道进入代理服务器集群,再经过代理服务器集群根据选路信息策略路由至目标加速链路;代理隧道是自身与代理服务器集群之间的隧道。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link according to the routing information strategy through the proxy server cluster; the proxy tunnel is a tunnel between itself and the proxy server cluster.

具体来说,参照图3,代理选路系统还可以包括用户终端、用户客户端、控制平台、加速入网点、加速链路等,另外,还可以在光网络客户端和代理服务器集群之间设置负载均衡器,用于对特定分片网络中代理服务器集群进行负载均衡。Specifically, referring to Figure 3, the proxy routing system may also include a user terminal, a user client, a control platform, an acceleration point of entry, an acceleration link, etc. In addition, a load balancer may be set between the optical network client and the proxy server cluster to load balance the proxy server cluster in a specific shard network.

参照图4,代理选路流程在图3所示的架构下可以按照如下步骤进行:Referring to FIG. 4 , the proxy routing process can be performed in the following steps under the architecture shown in FIG. 3 :

1、控制平台向SOCKS5代理服务器集群下发配置,包括集群中每个代理服务器的IP配置、集群路由至GER隧道的规则配置、GRE隧道建立,并下发链路信息哈希表;1. The control platform sends configurations to the SOCKS5 proxy server cluster, including the IP configuration of each proxy server in the cluster, the rule configuration of cluster routing to the GRE tunnel, the establishment of the GRE tunnel, and sends the link information hash table;

2、控制平台向加速入网点下发配置,包括加速入网点的IP配置、加速入网点路由至加速链路的规则配置、GRE隧道建立、网络地址转换配置等,以保证SOCKS5代理服务器集群可以通过加速入网点进行加速;2. The control platform sends configurations to the acceleration point of entry, including the IP configuration of the acceleration point of entry, the rule configuration of the acceleration point of entry to the acceleration link, the establishment of the GRE tunnel, the network address translation configuration, etc., to ensure that the SOCKS5 proxy server cluster can be accelerated through the acceleration point of entry;

3、控制平台向光网络单元下发插件,插件包括光网络客户端和代理服务器集群中的代理服务器IP列表,该IP列表会定期更新;3. The control platform sends a plug-in to the optical network unit. The plug-in includes the optical network client and the proxy server IP list in the proxy server cluster. The IP list will be updated regularly.

4、光网络客户端周期性拨测所有加速链路的时延信息,并将该时延信息上报至控制平台,以供用户客户端从控制平台获取到该时延信息;4. The optical network client periodically measures the delay information of all acceleration links and reports the delay information to the control platform so that the user client can obtain the delay information from the control platform;

5、用户客户端根据链路类型,例如游戏区服、链路标签、游戏APP ID等以及对应的链路ID,结合各加速链路的时延信息,进行选路,并将选路信息发送至光网络客户端;5. The user client selects a route based on the link type, such as the game zone, link label, game APP ID, etc. and the corresponding link ID, combined with the latency information of each acceleration link, and sends the route selection information to the optical network client;

6、用户终端将待加速数据发送至光网络客户端;6. The user terminal sends the data to be accelerated to the optical network client;

7、光网络客户端与代理服务器集群建立连接,并在认证过程中携带选路信息至代理服务器集群;7. The optical network client establishes a connection with the proxy server cluster and carries the routing information to the proxy server cluster during the authentication process;

8、若是TCP连接,则代理服务器集群记录TCP认证报文中的选路信息;8. If it is a TCP connection, the proxy server cluster records the routing information in the TCP authentication message;

9、代理服务器根据预设优先级规则在选路信息中获取目标加速链路,以该目标加速链路的映射信息作为密钥,从链路信息哈希表中获取对应的目标源IP;9. The proxy server obtains the target acceleration link from the routing information according to the preset priority rule, uses the mapping information of the target acceleration link as the key, and obtains the corresponding target source IP from the link information hash table;

10、代理服务器集群根据目标源IP与目标服务器建立连接,并绑定目标源IP;10. The proxy server cluster establishes a connection with the target server according to the target source IP and binds the target source IP;

11、光网络客户端将待加速数据引流至代理隧道;11. The optical network client directs the data to be accelerated to the proxy tunnel;

12、待加速数据经过代理隧道进入代理服务器集群,若光网络客户端与代理服务器集群之间是UDP连接,则代理服务器集群还需在该步骤中获取选路信息,并根据选路信息与目标服务器建立连接并绑定目标源IP;12. The data to be accelerated enters the proxy server cluster through the proxy tunnel. If the optical network client and the proxy server cluster are connected via UDP, the proxy server cluster needs to obtain routing information in this step, establish a connection with the target server based on the routing information, and bind the target source IP.

13、代理服务器集群根据目标源IP将待加速数据从LOOP接口策略路由至目标GRE隧道,待加速数据进入到加速入网点;13. The proxy server cluster routes the data to be accelerated from the LOOP interface policy to the target GRE tunnel according to the target source IP, and the data to be accelerated enters the acceleration entry point;

14、加速入网点根据目标源IP将待加速数据策略路由至目标加速链路,并对待加速数据所属内部网络地址进行地址转换,以将内部网络的私有地址转为公有地址;14. The acceleration entry point routes the data to be accelerated to the target acceleration link according to 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 into a public address;

15、目标加速链路与代理服务器集群之间进行数据交互;15. Data interaction between the target acceleration link and the proxy server cluster;

16、代理服务器集群与用户终端之间进行数据交互,最终实现用户端与目标服务器之间的高质量通信。16. The proxy server cluster interacts with the user terminal to achieve high-quality communication between the user terminal and the target server.

本实施例提供的代理选路系统,由于连接请求携带了用户客户端的选路信息,且能够通过选路信息获取目标源IP,即用户侧对自身与目标服务器之间的链路进行了符合自身业务需求的选路,且选路信息与目标源IP存在一一对应的映射关系,因此,可以通过与选路信息对应的目标源IP从多个GRE隧道中选择符合用户业务需求的目标GRE隧道,再通过该目标源IP从多个加速链路中选择最符合用户业务需求的目标加速链路,从而实现待加速数据以最符合用户业务需求的链路从代理服务器集群至加速入网点,再从加速入网点至目标加速链路,最后抵达目标服务器,该链路与用户业务需求最为适配,因而质量较好,能够有效避免待加速数据在传输过程中的丢包和延迟问题。The proxy routing system provided in this embodiment carries the routing information of the user client in the connection request, and the target source IP can be obtained through the routing information, that is, the user side performs routing on the link between itself and the target server in accordance with its own business needs, and there is a one-to-one mapping relationship 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 through the target source IP corresponding to the routing information, and then the target acceleration link that best meets the user's business needs can be selected from multiple acceleration links through the target source IP, so that the data to be accelerated can be transmitted from the proxy server cluster to the acceleration access point through the link that best meets the user's business needs, and then from the acceleration access point to the target acceleration link, and finally arrives at the target server. The link is most adapted to the user's business needs, and thus has better quality, and can effectively avoid packet loss and delay problems of the data to be accelerated during transmission.

图5示例了一种电子设备的结构示意图,如图5所示,该电子设备可以包括:处理器(processor)510、通信接口(Communication Interface)520、存储器(memory)530和通信总线540,其中,处理器510,通信接口520,存储器530通过通信总线540完成相互间的通信。处理器510可以调用存储器530中的计算机程序,以执行代理选路方法的步骤,例如包括:FIG5 illustrates a schematic diagram of the structure of an electronic device. As shown in FIG5 , 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 through the communication bus 540. The processor 510 may call a computer program in the memory 530 to execute the steps of the proxy routing method, for example, including:

基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client;

根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information;

基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP;

根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路;或者According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server; or

基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries routing information of the user client;

将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道,所述目标加速链路是加速入网点与目标服务器之间的加速链路。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster, and the target acceleration link is an acceleration link between the acceleration entry point and the target server.

此外,上述的存储器530中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

另一方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各实施例所提供的代理选路方法的步骤,例如包括:On the other hand, an embodiment of the present application further provides a computer program product, the computer program product including a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and 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, for example, including:

基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client;

根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information;

基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP;

根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路;或者According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server; or

基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries routing information of the user client;

将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道,所述目标加速链路是加速入网点与目标服务器之间的加速链路。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster, and the target acceleration link is an acceleration link between the acceleration entry point and the target server.

另一方面,本申请实施例还提供一种处理器可读存储介质,所述处理器可读存储介质存储有计算机程序,所述计算机程序用于使处理器执行上述各实施例提供的方法的步骤,例如包括:On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the steps of the methods provided in the above embodiments, for example, including:

基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client;

根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information;

基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP;

根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路;或者According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server; or

基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries routing information of the user client;

将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道,所述目标加速链路是加速入网点与目标服务器之间的加速链路。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster, and the target acceleration link is an acceleration link between the acceleration entry point and the target server.

所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NANDFLASH)、固态硬盘(SSD))等。The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1.一种代理选路方法,其特征在于,应用于代理服务器集群,包括:1. A proxy routing method, characterized in that it is applied to a proxy server cluster, comprising: 基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client; 根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information; 基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP; 根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路。According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server. 2.根据权利要求1所述的代理选路方法,其特征在于,所述根据所述选路信息获取目标源IP,包括:2. The proxy routing method according to claim 1, wherein obtaining the target source IP according to the routing information comprises: 根据预设优先级规则在所述选路信息中获取目标加速链路;Acquire a target acceleration link from the routing information according to a preset priority rule; 根据所述目标加速链路从链路信息哈希表中获取对应的目标源IP。According to the target acceleration link, the corresponding target source IP is obtained from the link information hash table. 3.根据权利要求1所述的代理选路方法,其特征在于,所述根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,包括:3. The proxy routing method according to claim 1, wherein the policy routing of the data to be accelerated to the target GRE tunnel according to the target source IP comprises: 在自身Loop接口配置的多个私网IP中选择所述目标源IP;Select the target source IP from multiple private IPs configured on its own Loop interface; 根据所述目标源IP将待加速数据从所述Loop接口策略路由至目标GRE隧道。The data to be accelerated is routed from the Loop interface policy to the target GRE tunnel according to the target source IP. 4.根据权利要求1所述的代理选路方法,其特征在于,4. The proxy routing method according to claim 1, characterized in that: 所述选路信息以TLV格式定义,所述TLV格式中的类型为链路类型,所述TLV格式中的值为所述链路类型对应的链路ID。The routing information is defined in a TLV format, the type in the TLV format is a link type, and the value in the TLV format is a link ID corresponding to the link type. 5.一种代理选路方法,其特征在于,应用于光网络客户端,包括:5. A proxy routing method, characterized in that it is applied to an optical network client, comprising: 基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster; the connection request carries routing information of the user client; 将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道,所述目标加速链路是加速入网点与目标服务器之间的加速链路。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster, and the target acceleration link is an acceleration link between the acceleration entry point and the target server. 6.根据权利要求5所述的代理选路方法,其特征在于,所述将待加速数据引流至代理隧道之前,包括:6. The proxy routing method according to claim 5, characterized in that before directing the data to be accelerated to the proxy tunnel, the method comprises: 周期性拨测所有加速链路的时延信息,以供所述用户客户端获取所述时延信息。The delay information of all acceleration links is periodically dialed to allow the user client to obtain the delay information. 7.根据权利要求5所述的代理选路方法,其特征在于,所述基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接之前,包括:7. The proxy routing method according to claim 5, characterized in that before establishing a connection with the proxy server cluster based on the connection request sent to the proxy server cluster, it comprises: 接收所述用户客户端发送的选路信息;Receiving routing information sent by the user client; 接收所述用户客户端所属的用户终端发送的待加速数据。Receive data to be accelerated sent by a user terminal to which the user client belongs. 8.一种代理选路系统,其特征在于,包括:代理服务器集群和光网络客户端;8. A proxy routing system, characterized by comprising: a proxy server cluster and an optical network client; 所述代理服务器集群用于:The proxy server cluster is used for: 基于光网络客户端发送的连接请求,与所述光网络客户端建立连接;所述连接请求携带用户客户端的选路信息;Establishing a connection with the optical network client based on a connection request sent by the optical network client; the connection request carries routing information of the user client; 根据所述选路信息获取目标源IP;Obtaining the target source IP address according to the routing information; 基于所述目标源IP与目标服务器建立连接,并绑定所述目标源IP;Establishing a connection with a target server based on the target source IP, and binding the target source IP; 根据所述目标源IP,将待加速数据策略路由至目标GRE隧道,以使所述待加速数据经过所述目标GRE隧道进入加速入网点,再经过所述加速入网点策略路由至目标加速链路;所述目标GRE隧道是自身与加速入网点之间的GRE隧道,所述目标加速链路是所述加速入网点与所述目标服务器之间的加速链路;According to the target source IP, the data to be accelerated is strategically routed to the target GRE tunnel, so that the data to be accelerated enters the acceleration point of entry through the target GRE tunnel, and then is strategically routed to the target acceleration link through the acceleration point of entry; the target GRE tunnel is the GRE tunnel between itself and the acceleration point of entry, and the target acceleration link is the acceleration link between the acceleration point of entry and the target server; 所述光网络客户端用于:The optical network client is used for: 基于向代理服务器集群发送的连接请求,与所述代理服务器集群建立连接;Establishing a connection with the proxy server cluster based on a connection request sent to the proxy server cluster; 将待加速数据引流至代理隧道,以使所述待加速数据经过所述代理隧道进入所述代理服务器集群,再经过所述代理服务器集群根据所述选路信息策略路由至目标加速链路;所述代理隧道是自身与所述代理服务器集群之间的隧道。The data to be accelerated is directed to the proxy tunnel, so that the data to be accelerated enters the proxy server cluster through the proxy tunnel, and then is routed to the target acceleration link through the proxy server cluster according to the routing information strategy; the proxy tunnel is a tunnel between itself and the proxy server cluster. 9.一种电子设备,包括处理器和存储有计算机程序的存储器,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至4任一项所述的代理选路方法的步骤,或实现权利要求5至7任一项所述的代理选路方法的步骤。9. An electronic device, comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, the processor implements the steps of the proxy routing method according to any one of claims 1 to 4, or implements the steps of the proxy routing method according to any one of claims 5 to 7. 10.一种非暂态计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至4任一项所述的代理选路方法的步骤,或实现权利要求5至7任一项所述的代理选路方法的步骤。10. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of the proxy routing method described in any one of claims 1 to 4, or implements the steps of the proxy routing method described in any one of claims 5 to 7.
CN202410046411.8A 2024-01-12 2024-01-12 Proxy routing method and system Pending CN118803474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410046411.8A CN118803474A (en) 2024-01-12 2024-01-12 Proxy routing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410046411.8A CN118803474A (en) 2024-01-12 2024-01-12 Proxy routing method and system

Publications (1)

Publication Number Publication Date
CN118803474A true CN118803474A (en) 2024-10-18

Family

ID=93028562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410046411.8A Pending CN118803474A (en) 2024-01-12 2024-01-12 Proxy routing method and system

Country Status (1)

Country Link
CN (1) CN118803474A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177384A1 (en) * 2002-03-14 2003-09-18 International Business Machines Corporation Efficient transmission of IP data using multichannel SOCKS server proxy
US20160192235A1 (en) * 2014-12-27 2016-06-30 Hughes Network Systems, Llc Acceleration of gtp traffic flows, over a satellite link, in a terrestrial wireless mobile communications system
CN106375128A (en) * 2016-09-14 2017-02-01 网宿科技股份有限公司 Accelerated access method, device and equipment based on PPTP VPN
CN111211980A (en) * 2019-12-17 2020-05-29 中移(杭州)信息技术有限公司 Transmission link management method, transmission link management device, electronic equipment and storage medium
CN115412599A (en) * 2022-09-01 2022-11-29 北京东土军悦科技有限公司 Message data forwarding method and device and server
CN116546105A (en) * 2022-01-26 2023-08-04 腾讯科技(深圳)有限公司 Data transmission method, device, equipment and storage medium
US20230275836A1 (en) * 2021-09-08 2023-08-31 Tencent Technology (Shenzhen) Company Limited Accelerated data transmission method and apparatus, computer device, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177384A1 (en) * 2002-03-14 2003-09-18 International Business Machines Corporation Efficient transmission of IP data using multichannel SOCKS server proxy
US20160192235A1 (en) * 2014-12-27 2016-06-30 Hughes Network Systems, Llc Acceleration of gtp traffic flows, over a satellite link, in a terrestrial wireless mobile communications system
CN106375128A (en) * 2016-09-14 2017-02-01 网宿科技股份有限公司 Accelerated access method, device and equipment based on PPTP VPN
CN111211980A (en) * 2019-12-17 2020-05-29 中移(杭州)信息技术有限公司 Transmission link management method, transmission link management device, electronic equipment and storage medium
US20230275836A1 (en) * 2021-09-08 2023-08-31 Tencent Technology (Shenzhen) Company Limited Accelerated data transmission method and apparatus, computer device, and storage medium
CN116546105A (en) * 2022-01-26 2023-08-04 腾讯科技(深圳)有限公司 Data transmission method, device, equipment and storage medium
CN115412599A (en) * 2022-09-01 2022-11-29 北京东土军悦科技有限公司 Message data forwarding method and device and server

Similar Documents

Publication Publication Date Title
CN113873453B (en) Communication method, apparatus, system and medium
US11277313B2 (en) Data transmission method and corresponding device
CN113452686B (en) Data processing method, data processing device, proxy server and storage medium
JP7282146B2 (en) BRAS system-based packet encapsulation method and apparatus
US10587544B2 (en) Message processing method, processing server, terminal, and storage medium
CN110247848B (en) Method, network device and computer-readable storage medium for sending message
CN110650076A (en) VXLAN implementation method, network equipment and communication system
CN115225292B (en) Intranet access method, device, equipment and computer readable storage medium
CN101325557A (en) A method, system and device for tunnel load sharing
US20230007457A1 (en) Systems, devices and methods for edge node computing
CN116668558B (en) Method and system for implementing dynamic access control for UDP protocol flow
WO2020083269A1 (en) Method, apparatus and system for establishing subflows of multipath connection
WO2023116165A1 (en) Network load balancing method and apparatus, electronic device, medium, and program product
CN105245359A (en) A router remote management method, system and equipment
JP4833995B2 (en) Mobile online game system and communication method between mobile game terminals
CN111030914A (en) Data transmission method and data transmission system
CN113422772A (en) Private network terminal access processing method and device and electronic equipment
WO2019041332A1 (en) Method and system for optimizing transmission of acceleration network
CN118803474A (en) Proxy routing method and system
US11394580B2 (en) Data transmission
US20190166041A1 (en) Flow aggregation and routing for multi-connectivity client devices
WO2021068937A1 (en) Service binding method and apparatus
EP1950917A1 (en) Methods for peer-to-peer application message identifying and operating realization and their corresponding devices
CN116782275A (en) Control method and device for terminal equipment to access core network
CN114501680B (en) Local area network implementation method, core network equipment and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination