Method, device, equipment and medium for accelerating gateway of proxy server

By introducing an accelerated server into the proxy server system, using BGP network technology and DNS server IP library to optimize domain name resolution, and using encrypted data transmission method, it solves the data transmission lag, resolution speed differences and security risks when users visit foreign e-commerce platforms, significantly improving access speed and user experience.

CN119766778APending Publication Date: 2025-04-04ZIXUN TECHNOLOGY (FUJIAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411443623.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, when a user visits a foreign e-commerce platform, data transmission is stuttered due to the different proxy servers from the user's network operators; and, the fixed DNS server cannot be adjusted according to business needs, resulting in a difference in resolution speed and reducing user experience; at the same time, there are security risks in socks5 plain text transmission.

Method used

By setting up an acceleration server, using BGP network technology to receive user requests, and setting up a DNS server IP library on the acceleration server, resolving the domain name and selecting the optimal DNS server IP address, and directly forwarding the IP address and request information to the proxy server to avoid DNS resolution, and using encrypted data transmission method.

Benefits of technology

It greatly improves the speed of users visiting foreign websites, improves the user experience, and improves data security through encrypted data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766778A_ABST
    Figure CN119766778A_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for accelerating gateway of a proxy server. The method comprises: setting an acceleration server, setting a gateway on the acceleration server, and adopting BGP network technology; the gateway receives user request data through BGP network technology; the gateway is provided with a DNS server IP library corresponding to the domain name; parsing the request data, obtaining the domain name and request information, and selecting the IP address of the best DNS server from the DNS library according to the domain name; sending the domain name to the DNS server of the IP address for domain name resolution, and obtaining the request IP address; the gateway forwards the request IP address and request information to the proxy server, and the proxy server directly processes the user request according to the IP address, and the proxy server does not need to perform DNS resolution again, and directly accesses foreign websites, which greatly improves the user's access speed and improves the user's experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a method, device, equipment and medium for accelerating a gateway of a proxy server. Background Art

[0002] When existing domestic users visit foreign e-commerce platforms, they need to connect through a proxy server. Most of the existing users use broadband from China Telecom, China Mobile or China Unicom, which means that they use different network operators from the proxy server. At this time, since different network operators only set up data exchange stations in specific cities in China, there will be data transmission jams when users connect to the proxy server. In addition, in current technology, the proxy server usually only provides the proxy IP, account and password, but its DNS server is fixed, and users cannot adjust it according to business needs. This fixed DNS method brings inconvenience in certain scenarios, especially cross-border e-commerce platforms. Due to the obvious differences in network environments in different regions around the world, the speed of parsing e-commerce platforms may vary greatly due to different choices of DNS servers. When current domestic users browse web pages or perform other operations, there is a large delay, which greatly reduces the user experience.

[0003] In addition, when users interact with the proxy server, data is transmitted using socks5, which uses plain text transmission. Plain text data transmission leads to security risks. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for an acceleration gateway of a proxy server, by which the IP address and request information are directly sent to the proxy server through the acceleration server. The proxy server no longer needs to perform DNS resolution and can directly and quickly access foreign websites, which greatly improves the user's access speed and improves the user experience.

[0005] In a first aspect, the present invention provides a method for accelerating a gateway of a proxy server, comprising the following steps:

[0006] Step 1: Setting an acceleration server, setting a gateway on the acceleration server, and using BGP network technology;

[0007] Step 2: The gateway receives the user's request data through BGP network technology;

[0008] Step 3: The gateway is provided with a DNS server IP library corresponding to the domain name; the request data is parsed to obtain the domain name and request information, and the IP address of the best DNS server is selected from the DNS library according to the domain name; the domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address;

[0009] Step 4: The gateway forwards the request IP address and request information to the proxy server, and the proxy server processes the user request directly according to the IP address.

[0010] In a second aspect, the present invention provides a device for accelerating a gateway of a proxy server, comprising the following modules:

[0011] A setting module is used to set an acceleration server, a gateway is set on the acceleration server, and the gateway adopts BGP network technology;

[0012] A request receiving module, wherein the gateway receives the user's request data through BGP network technology;

[0013] A domain name resolution module, wherein the gateway is provided with a DNS server IP library corresponding to the domain name; the request data is resolved, the domain name and request information are obtained, and the optimal DNS server IP address is selected from the DNS library according to the domain name; the domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address;

[0014] The request module, the gateway forwards the request IP address and request information to the proxy server, and the proxy server directly processes the user request according to the IP address.

[0015] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0016] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0017] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:

[0018] This embodiment uses encrypted data transmission to ensure data security between the client and the acceleration server and prevents interference. It also uses BGP network technology to make data transmission between the client and the acceleration server faster. Since the acceleration server has resolved the domain name into an IP address, the proxy server does not need to resolve it again and can directly access and process the request, which greatly speeds up the processing speed and increases the user experience.

[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0021] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention.

[0022] Figure 2 It is a schematic diagram of the structure of the device in the second embodiment of the present invention. DETAILED DESCRIPTION

[0023] The technical solution in the embodiment of the present application has the following general idea:

[0024] An acceleration server is set up between the proxy server and the client. The acceleration server interacts with the client using encrypted data. The acceleration server parses the data to obtain the corresponding domain name, assigns the domain name to the optimal DNS server for resolution, and then sends the obtained IP address and user request information directly to the proxy server for processing.

[0025] You also need to set the corresponding encryption algorithm on the acceleration server and client, as follows:

[0026] 1. The acceleration server generates SM2 public key and private key:

[0027] The acceleration server generates a pair of random SM2 asymmetric key pairs during initialization, including SM2 public key and private key. The acceleration server sends the generated SM2 public key to the client through a secure channel.

[0028] 2. The client generates an AES256 symmetric encryption key through the following steps:

[0029] 1. **Get hardware information**: The client extracts unique identification information from the device hardware, including hardware feature information such as the number of CPU cores, memory size (in GB), hard disk capacity (in GB), and the MAC address of the network card.

[0030] 2. **Generate machine code**: Combine the acquired hardware information in sequence to generate a unique machine code string.

[0031] 3. **Generate random characters**: The client generates 128-bit random characters.

[0032] 4. **Combining machine code and random characters**: Combine the machine code with 128 bits of random characters as a seed to generate the AES256 key.

[0033] 5. **Use hash to generate key**: Hash the above combined seed through the SHA256 hash function to generate a 256-bit AES symmetric encryption key.

[0034] The python sample code is as follows:

[0035] importhashlib

[0036] import os

[0037] importpsutil

[0038] import uuid

[0039] #Get the number of CPU cores

[0040] defget_cpu_cores():

[0041] return str(psutil.cpu_count(logical=False))

[0042] #Get the memory size (in GB)

[0043] defget_memory_size():

[0044] return str(round(psutil.virtual_memory().total / (1024**3),2))#Convert to GB

[0045] #Get the hard disk capacity (in GB)

[0046] defget_disk_size():

[0047] disk_usage=psutil.disk_usage(' / ')

[0048] return str(round(disk_usage.total / (1024**3),2))#Convert to GB

[0049] #Get the MAC address of the network card

[0050] defget_mac_address():

[0051] mac = uuid.getnode()

[0052] return ':'.join(('%012X' % mac)[i:i + 2] for i in range(0, 12, 2))

[0053] # Generate machine code

[0054] def generate_machine_code():

[0055] cpu_cores = get_cpu_cores()

[0056] memory_size = get_memory_size()

[0057] disk_size = get_disk_size()

[0058] mac_address = get_mac_address()

[0059] machine_code = f"{cpu_cores}-{memory_size}GB-{disk_size}GB-{mac_address}"

[0060] return machine_code

[0061] # Generate 128-bit random characters

[0062] def generate_random_string():

[0063] return os.urandom(16) # 16 bytes = 128 bits

[0064] # Generate AES256 key

[0065] def generate_aes256_key():

[0066] machine_code = generate_machine_code()

[0067] random_string = generate_random_string()

[0068] combined_data = machine_code.encode('utf-8') + random_string

[0069] aes_key = hashlib.sha256(combined_data).digest() # Generate a 256-bit (32-byte) AES key

[0070] return aes_key

[0071] #Test to generate AES256 key

[0072] aes256_key=generate_aes256_key()

[0073] print("AES256 key:",aes256_key.hex()).

[0074] 3. The client encrypts the AES256 key and sends it to the acceleration server:

[0075] The client uses the SM2 public key received from the acceleration server to encrypt the generated AES256 key to obtain the encrypted AES256 key. The client sends the encrypted AES256 key to the acceleration server.

[0076] 4. Accelerate the server to decrypt the AES256 key:

[0077] After receiving the encrypted AES256 key sent by the client, the acceleration server uses its locally stored SM2 private key to decrypt the key and obtain the AES256 key generated by the client.

[0078] 5. The client and the acceleration server use AES256 to communicate:

[0079] After the client and the acceleration server obtain the same AES256 key through the above steps, they begin to use the AES256 symmetric encryption algorithm for data communication.

[0080] 6. Data verification and signature:

[0081] In order to ensure that the data has not been tampered with during transmission, the present invention designs a signature algorithm based on SM3 to verify the data. The specific steps are as follows:

[0082] 1. **Signature data construction**: The client or acceleration server constructs signature data every time it transmits data, which includes the following: the ciphertext data to be transmitted, the timestamp (Unix timestamp since January 1, 1970), and the currently used AES256 key.

[0083] 2. **SM3 Signature**: After combining the data of the above three parts, a signature is generated through the SM3 hash algorithm.

[0084] 3. **Send Signature**: Send the signature together with the ciphertext data and timestamp to the other party.

[0085] 4. **Verify the signature**: After receiving the ciphertext, timestamp and signature, the recipient uses the same SM3 algorithm to hash the received ciphertext, timestamp and AES256 key and compares them with the signature to verify the integrity of the data and the authenticity of its source.

[0086] Embodiment 1

[0087] like Figure 1 As shown, this embodiment provides a method for accelerating a gateway of a proxy server, comprising the following steps:

[0088] Step 1: Setting an acceleration server, setting a gateway on the acceleration server, and using BGP network technology;

[0089] Step 2: The gateway receives the user's request data through BGP network technology;

[0090] Step 3: The gateway is provided with a DNS server IP library corresponding to the domain name; the request data is parsed to obtain the domain name and request information, and the IP address of the best DNS server is selected from the DNS library according to the domain name; the domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address;

[0091] Step 4: The gateway forwards the request IP address and request information to the proxy server, and the proxy server processes the user request directly according to the IP address.

[0092] In this embodiment, preferably, step 1 is specifically as follows: setting up an acceleration server, setting up a gateway on the acceleration server, and the gateway adopts BGP network technology; the acceleration server generates a public key and a private key, and then sends the public key to the client; the client extracts unique identification information from the hardware of the local device, including the number of CPU cores, memory, hard disk capacity and MAC address of the network card, and the memory and hard disk capacity are both in GB; the obtained unique identification information is combined in a set order to generate a unique machine code string; then 128-bit random characters are generated; the machine code string is combined with the 128-bit random characters as an encryption seed; the encryption seed is hashed by the SHA256 hash function to generate a 256-bit AES symmetric encryption key, the client encrypts the encryption key by the public key and sends it to the server, and the server decrypts it by the private key to obtain the encryption key.

[0093] In this embodiment, preferably, the step 2 is specifically as follows: the gateway receives the user's request data encrypted by the encryption key and the corresponding signature through the BGP network technology.

[0094] In this embodiment, preferably, step 3 is specifically as follows: a DNS server IP library corresponding to the domain name is set on the gateway; the DNS server IP library is updated at a set time interval; the gateway verifies the signature, and after the signature verification passes, the encrypted request data is decrypted using an encryption key, and then parsed to obtain the domain name and request information, and the IP address of the optimal DNS server is selected from the DNS library according to the domain name; the domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address.

[0095] Based on the same inventive concept, the present application also provides a device corresponding to the method in Example 1, see Example 2 for details.

[0096] Embodiment 2

[0097] like Figure 2 As shown, in this embodiment, a device for accelerating a gateway of a proxy server is provided, comprising the following modules:

[0098] A setting module is used to set an acceleration server, a gateway is set on the acceleration server, and the gateway adopts BGP network technology;

[0099] A request receiving module, wherein the gateway receives the user's request data through BGP network technology;

[0100] A domain name resolution module, wherein the gateway is provided with a DNS server IP library corresponding to the domain name; the request data is resolved, the domain name and request information are obtained, and the optimal DNS server IP address is selected from the DNS library according to the domain name; the domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address;

[0101] The request module, the gateway forwards the request IP address and request information to the proxy server, and the proxy server directly processes the user request according to the IP address.

[0102] In this embodiment, preferably, the setting module is specifically as follows: an acceleration server is set up, a gateway is set up on the acceleration server, and the gateway adopts BGP network technology; the acceleration server generates a public key and a private key, and then sends the public key to the client; the client extracts unique identification information from the hardware of the local device, including the number of CPU cores, memory, hard disk capacity and MAC address of the network card, and the memory and hard disk capacity are both in GB; the obtained unique identification information is combined in a set order to generate a unique machine code string; then 128-bit random characters are generated; the machine code string is combined with the 128-bit random characters as an encryption seed; the encryption seed is hashed by the SHA256 hash function to generate a 256-bit AES symmetric encryption key, the client encrypts the encryption key by the public key and sends it to the server, and the server decrypts it by the private key to obtain the encryption key.

[0103] In this embodiment, preferably, the request receiving module is specifically: the gateway receives the user's request data encrypted by the encryption key and the corresponding signature through the BGP network technology.

[0104] In this embodiment, preferably, the domain name resolution module is specifically as follows: a DNS server IP library corresponding to the domain name is set on the gateway; the DNS server IP library is updated at a set time interval; the gateway verifies the signature, and after the signature verification, the encrypted request data is decrypted using an encryption key, and then parsed to obtain the domain name and request information, and the IP address of the optimal DNS server is selected from the DNS library according to the domain name; the domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address.

[0105] Since the device introduced in the second embodiment of the present invention is a device used to implement the method of the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the device based on the method introduced in the first embodiment of the present invention, so it is not described here in detail. All devices used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.

[0106] Based on the same inventive concept, the present application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.

[0107] Embodiment 3

[0108] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.

[0109] Since the electronic device introduced in this embodiment is a device used to implement the method in the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the device used by the method in the embodiment of the present application, it belongs to the scope of protection of the present application.

[0110] Based on the same inventive concept, the present application provides a storage medium corresponding to the first embodiment, see the fourth embodiment for details.

[0111] Embodiment 4

[0112] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any implementation method in the first embodiment can be implemented.

[0113] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages: the present embodiment uses an encrypted data transmission method to ensure that the data between the client and the acceleration server is secure and not easily interfered with; the original agreed method is used for transmission between the acceleration server and the proxy server, ensuring that the proxy server does not need to be modified; because the acceleration server has resolved the domain name into an IP address, the proxy server does not need to resolve it again and can directly access and process the request, which greatly speeds up the processing speed and increases the user experience.

[0114] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0115] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0116] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0118] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A method for accelerating a gateway of a proxy server, characterized in that: The steps include: Step 1: Setting an acceleration server, setting a gateway on the acceleration server, and using BGP network technology; Step 2: The gateway receives the user's request data through BGP network technology; Step 3: The gateway is provided with a DNS server IP library corresponding to the domain name; parsing the request data, obtaining the domain name and request information, and selecting the optimal DNS server IP address from the DNS library according to the domain name; Send the domain name to the DNS server of the IP address for domain name resolution to obtain the requested IP address; Step 4: The gateway forwards the request IP address and request information to the proxy server, and the proxy server processes the user request directly according to the IP address.

2. The method for accelerating a gateway of a proxy server according to claim 1, characterized in that: The step 1 is specifically as follows: an acceleration server is set up, a gateway is set up on the acceleration server, and the gateway adopts BGP network technology; the acceleration server generates a public key and a private key, and then sends the public key to the client; the client extracts unique identification information from the hardware of the local device, including the number of CPU cores, memory, hard disk capacity and MAC address of the network card, and the memory and hard disk capacity are both in GB; the obtained unique identification information is combined in a set order to generate a unique machine code string; then 128-bit random characters are generated; the machine code string is combined with the 128-bit random characters as an encryption seed; the encryption seed is hashed by the SHA256 hash function to generate a 256-bit AES symmetric encryption key, the client encrypts the encryption key by the public key and sends it to the server, and the server decrypts it by the private key to obtain the encryption key.

3. The method for accelerating a gateway of a proxy server according to claim 2, characterized in that: The step 2 specifically includes: the gateway receives the user's request data encrypted by the encryption key and the corresponding signature through the BGP network technology.

4. The method for accelerating a gateway for a proxy server according to claim 3, characterized in that: The step 3 is specifically as follows: the gateway is provided with a DNS server IP library corresponding to the domain name; the DNS server IP library is updated at a set time interval; the gateway verifies the signature, and after the signature verification passes, the encrypted request data is decrypted using an encryption key, and then parsed to obtain the domain name and request information, and the optimal DNS server IP address is selected from the DNS library according to the domain name; The domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address.

5. A device for accelerating a gateway of a proxy server, characterized in that: Includes the following modules: A setting module is used to set an acceleration server, a gateway is set on the acceleration server, and the gateway adopts BGP network technology; A request receiving module, wherein the gateway receives the user's request data through BGP network technology; A domain name parsing module, wherein the gateway is provided with a DNS server IP library corresponding to the domain name; the request data is parsed, the domain name and request information are obtained, and the optimal DNS server IP address is selected from the DNS library according to the domain name; Send the domain name to the DNS server of the IP address for domain name resolution to obtain the requested IP address; The request module, the gateway forwards the request IP address and request information to the proxy server, and the proxy server directly processes the user request according to the IP address.

6. The device for accelerating a gateway of a proxy server according to claim 5, characterized in that: The setting module is specifically as follows: setting an acceleration server, setting a gateway on the acceleration server, and the gateway adopts BGP network technology; the acceleration server generates a public key and a private key, and then sends the public key to the client; the client extracts unique identification information from the hardware of the local device, including the number of CPU cores, memory, hard disk capacity and MAC address of the network card, and the memory and hard disk capacity are both in GB; the obtained unique identification information is combined in a set order to generate a unique machine code string; then 128-bit random characters are generated; the machine code string is combined with the 128-bit random characters as an encryption seed; the encryption seed is hashed by the SHA256 hash function to generate a 256-bit AES symmetric encryption key, the client encrypts the encryption key by the public key and sends it to the server, and the server decrypts it by the private key to obtain the encryption key.

7. The device for accelerating a gateway of a proxy server according to claim 6, characterized in that: The request receiving module specifically includes: the gateway receives the user's request data encrypted by the encryption key and the corresponding signature through the BGP network technology.

8. The device for accelerating a gateway of a proxy server according to claim 7, characterized in that: The domain name resolution module is specifically as follows: the gateway is provided with a DNS server IP library corresponding to the domain name; the DNS server IP library is updated at a set time interval; the gateway verifies the signature, and after the signature verification passes, the encrypted request data is decrypted using an encryption key, and then parsed to obtain the domain name and request information, and the optimal DNS server IP address is selected from the DNS library according to the domain name; The domain name is sent to the DNS server of the IP address for domain name resolution to obtain the requested IP address.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.