[go: up one dir, main page]

WO2015081709A1 - Method, terminal device, and system for implementing network test based on reverse proxy - Google Patents

Method, terminal device, and system for implementing network test based on reverse proxy Download PDF

Info

Publication number
WO2015081709A1
WO2015081709A1 PCT/CN2014/083227 CN2014083227W WO2015081709A1 WO 2015081709 A1 WO2015081709 A1 WO 2015081709A1 CN 2014083227 W CN2014083227 W CN 2014083227W WO 2015081709 A1 WO2015081709 A1 WO 2015081709A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
terminal device
port
server
proxy server
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.)
Ceased
Application number
PCT/CN2014/083227
Other languages
French (fr)
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Publication of WO2015081709A1 publication Critical patent/WO2015081709A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Definitions

  • the present invention relates to the field of network testing technologies, and in particular, to a method, a terminal, and a system for implementing network testing based on a reverse proxy.
  • the network test is performed only through the network IP segment in the IDC room, and there is a defect that the test result is not comprehensive enough.
  • the present invention has been made in order to provide a method for implementing network testing based on a reverse proxy that overcomes the above problems or at least partially solves the above problems.
  • a method for implementing network testing based on a reverse proxy is provided, wherein the method is applicable to: establishing a reverse proxy between a terminal device located in a local area network and a master proxy server located in a wide area network Performing a network test, the method includes: starting a first port on the terminal device, and starting a second port on the primary proxy server;
  • the terminal device performs a corresponding network access operation according to the network test request, and The result of the network access operation is fed back to the primary proxy server.
  • a terminal device for implementing network testing based on a reverse proxy wherein the terminal device is located in a local area network, and a reverse proxy is established with a primary proxy server located in the wide area network to perform network testing.
  • the terminal device includes:
  • a reverse proxy module configured to start the first port on the terminal device
  • a network tunnel establishing module configured to establish a network tunnel between the first port and a second port on the primary proxy server
  • a reverse proxy module configured to receive a network test access request sent by the primary proxy server to the first port by using the network port by using the second port; performing a corresponding network access operation according to the network test request, The results of the network access operation are fed back to the primary proxy server.
  • a system for implementing network testing based on a reverse proxy comprising: a primary proxy server having a wide area network IP address and the terminal device according to any one of the above.
  • a computer program comprising computer readable code, the computer readable code, when run on a server, causing the server to perform the method of one aspect of the invention.
  • a computer readable medium wherein a computer program as described in one aspect of the invention is stored.
  • a network tunnel establishment client and a reverse proxy server are installed in a terminal device deployed in a local area network, and a network tunnel establishment server is deployed on the master proxy server.
  • a network tunnel between the master proxy server and the terminal device is established by mapping the first port on the terminal device to the second port on the primary proxy server through the connection parameter.
  • the master proxy server can send a network test request to the corresponding terminal device through the network tunnel, and obtain a feedback operation result after the reverse proxy server in the terminal device performs the corresponding network access operation according to the network test request. It solves the problem of high cost required to deploy IDC machine rooms throughout the country for network testing in network test environments across the country.
  • Figure 1 illustrates a flow diagram of a method for implementing network testing based on a reverse proxy, in accordance with one embodiment of the present invention
  • FIG. 2 shows a detailed flow chart of a method for implementing network testing based on a reverse proxy, in accordance with one embodiment of the present invention
  • FIG. 3 illustrates a network topology diagram for implementing network testing based on a reverse proxy, in accordance with one embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a terminal device for implementing network testing based on a reverse proxy according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a terminal device for implementing network testing based on a reverse proxy according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention
  • FIG. 7 is a block diagram showing a detailed structure of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention.
  • Figure 8 is a view schematically showing a 4] 1 diagram of a server for performing a method for implementing network test based on a reverse proxy according to the present invention
  • Fig. 9 schematically shows a storage unit for holding or carrying program code implementing a method for implementing network test based on a reverse proxy according to the present invention.
  • FIG. 1 illustrates a network measurement based on a reverse proxy according to an embodiment of the present invention.
  • Flow chart of the test method the method is applicable to: performing network test by establishing a reverse proxy between a terminal device located in a local area network and a master proxy server located in the wide area network, see figure
  • the method includes the following steps.
  • Step S101 Start a first port on the terminal device, and start a second port on the master proxy server.
  • Step S102 Establish a network tunnel between the first port of the terminal device and the second port of the primary proxy server.
  • Step S103 Send a network test request to the first port of the terminal device via a network tunnel by using a second port of the master proxy server.
  • Step S104 The terminal device performs a corresponding network access operation according to the network test request, and feeds back the result of the network access operation to the primary proxy server.
  • a network tunnel establishment client and a reverse proxy server are installed in a terminal device deployed in a local area network, and a network tunnel establishment server is deployed on the master proxy server.
  • a network tunnel between the master proxy server and the terminal device is established by mapping the first port on the terminal device to the second port on the master proxy server through the connection parameter.
  • the master proxy server can send a network test request to the corresponding terminal device through the network tunnel, and obtain a feedback operation result after the reverse proxy server in the terminal device performs the corresponding network access operation according to the network test request. It solves the problem of high cost required to deploy IDC rooms across the country in the network test environment for deploying network test environments across the country.
  • FIG. 2 shows a detailed flowchart of a method for implementing network testing based on a reverse proxy according to an embodiment of the present invention
  • the method establishes a network tunnel between a terminal device and a master proxy server based on a reverse proxy, and Implement network testing.
  • the reverse tunneling can be used to establish a network tunnel between the terminal device in the local area network and the master proxy server in the wide area network, thereby establishing communication between the terminal device and the master proxy server.
  • the method includes the following steps.
  • Step S201 Start a network tunnel establishment server installed on the primary proxy server, and start a second port on the primary proxy server.
  • the network tunnel establishment server is installed on the primary proxy server, so that after the network tunnel is established to establish the server, the second port can be allowed to be connected by any source. That is, it is convenient to establish a network tunnel with the terminal device.
  • the network tunnel establishment server installed on the primary proxy server is an SSH server.
  • Step S202 Start a reverse proxy server installed on the terminal device, start a network tunnel establishment client installed on the terminal device, and start the first port on the terminal device.
  • the reverse proxy server after the reverse proxy server installed on the terminal device is started, the reverse proxy server automatically starts the first port on the terminal device.
  • the reverse proxy server installed on the terminal device is Squid, the server.
  • Step S203 establishing a network tunnel between the first port of the terminal device and the second port of the primary proxy server.
  • the network tunnel establishment client after the network tunnel establishment client installed on the terminal device is started, the network tunnel establishment client establishes a connection with the network tunnel establishment server installed on the primary proxy server, that is, establishes a network tunnel.
  • the client and the network tunnel establishment server map the first port on the terminal device to the second port on the master proxy server, thereby establishing a network tunnel between the first port of the terminal device and the second port of the master proxy server.
  • the network tunnel establishment client deployed on the terminal device is an SSH client.
  • a network tunnel is established between the first port of the terminal device and the second port of the primary proxy server according to the connection parameter.
  • the connection parameters include: a login account and a password of the terminal device, and a master proxy server.
  • Step S204 Send a network test request to the first port of the terminal device via the network tunnel through the second port of the primary proxy server.
  • Step S205 The terminal device performs a corresponding network access operation according to the network test request, and feeds back the result of the network access operation to the primary proxy server.
  • step S204 and step S205 in an embodiment of the present invention, the network test request from the network tunnel is received by the reverse proxy server in the terminal device, and the reverse proxy server performs corresponding according to the network test request.
  • the network access operation the result of the network access operation is fed back through the network tunnel.
  • the result of the network access operation is fed back to the first port of the terminal device, so that the master proxy server can obtain the network access operation result from the second port.
  • Step S206 the application server passes the network tunnel on the primary proxy server to the terminal device. Send a network test request.
  • the primary proxy server only the primary proxy server sends a network test request, and the application server deployed around the primary proxy server and logically connected with the primary proxy server also sends a network test request, so that the terminal device performs The corresponding network access operation.
  • the terminal device receives a network test request sent by the application server through the network tunnel; wherein, the application server sends the network test request to the second port on the master proxy server; the terminal device is from the master proxy server.
  • the second port obtains the network test request.
  • Step S207 The terminal device performs a corresponding network access operation according to the network test request, and feeds back the result of the network access operation to the primary proxy server.
  • the terminal device performs a corresponding network access operation according to the network test request, and feeds back a result of the network access operation through the network tunnel; wherein the application server is from the master agent The result of the network access operation is obtained in the second port on the server.
  • the reconnection in order to solve the problem that the network tunnel is disconnected in the event of a failure, and after the network tunnel is disconnected, the reconnection can be automatically performed to avoid inefficiency caused by the user manually performing the manual connection again.
  • the problem. further includes: deploying an automatic reconnect client on the terminal device. When the established network tunnel is disconnected, the automatic reconnection client starts the network tunnel establishment client, and the network tunnel establishment client remaps the first port to the first proxy server according to the connection parameter. On the second port, re-establish the network tunnel.
  • the automatic reconnection client is an AUTOSSH client.
  • the login script is saved locally on the terminal device, and the connection parameters are saved in the login script.
  • the automatic reconnection client restarts, reads the connection parameters from the locally saved login book, and establishes a network according to the connection parameter and the second port on the primary proxy server. tunnel.
  • the network test request comprises: a network speed test request or a network quality test request.
  • the network speed test request may be: a network download speed between the test and the destination server, and the network quality test area request may be: a network delay between the test and the destination server, and a packet loss rate.
  • the test request may comprise a network speed test and network quality test request requests simultaneously 0
  • the terminal device performs a corresponding network access operation according to the network test request, specifically: the terminal device sends the test data packet to the destination server and receives the feedback packet of the destination server, according to the test data packet. Calculating a network delay between the terminal device and the destination server according to the sending time and the receiving time of the feedback packet; and calculating a packet loss rate between the terminal device and the destination server according to the number of the test data packet and the number of the feedback packet;
  • the terminal device When the network test request is a network speed test request, the terminal device performs a corresponding network access operation according to the network test request, specifically: the terminal device downloads a data packet of a specified size from the destination server, according to the size of the data packet and the completion of the downloading. Time, calculate the download speed between the server and the destination server.
  • FIG. 3 shows a network topology diagram for implementing network testing based on a reverse proxy according to an embodiment of the present invention; FIG. 3 is only a scheme for implementing the technical solution of the present invention.
  • the solution is mainly to solve the expansion of the network export resources in the IDC room under the shortage of network export resources, to quickly lay down the network test environment across the country at low cost, and alleviate the high cost burden that the company needs to open new computer rooms everywhere. .
  • an IDC machine room needs to be opened throughout the country.
  • the web server determines that the access connection is from IDC's IDC link.
  • the SSH client and the Squid server are run on the terminal device by running the SSH server on the master proxy server. And starting the first port on the terminal device, starting the second port on the primary proxy server, and mapping the first port on the terminal device to the second port on the primary proxy server.
  • the terminal device 1 in a local area network of Beijing maps the first port 80 to the second port 200 on the master proxy server, and establishes a network tunnel between the terminal device 1 and the master proxy server.
  • the terminal device 2 in a local area network of Shanghai maps the first port 80 to the second port 300 on the master proxy server to establish a terminal.
  • Each terminal device corresponds to any port on the primary proxy service, and the port number corresponding to each terminal device is different.
  • the web server determines that the access connection is from Beijing: [DC link. Similarly, when accessing a web server through port 300 on the primary proxy server, the web server determines that the access connection is from a Shanghai IDC link. And the result after the network access operation is equivalent to the network access operation result of the region.
  • the Xi'an server 1 is equivalent to the application server in the present invention.
  • the terminal device may be a smart device such as a small ARM device (plug computer), a mobile phone, a tablet computer, or a PC. Deploy the Linux system and the SSH-client and reverse proxy servers on the terminal.
  • a smart device such as a small ARM device (plug computer), a mobile phone, a tablet computer, or a PC.
  • FIG. 4 is a schematic structural diagram of a terminal device for implementing network test based on a reverse proxy according to an embodiment of the present invention.
  • the terminal device 400 includes:
  • the reverse proxy module 401 is adapted to start the first port on the terminal device 400.
  • the network tunnel establishing module 402 is adapted to establish a network tunnel between the first port and the second port on the primary proxy server.
  • the reverse proxy module 401 is adapted to receive a network test access request sent by the primary proxy server to the first port by using the network port by using the second port; performing a corresponding network access operation according to the network test request , feed back the results of the network access operation to the master proxy server.
  • the reverse proxy module 40 is further adapted to receive a network test request sent by the application server through the network tunnel; wherein the application server sends a network test request to the The second port on the primary proxy server.
  • the reverse proxy module 401 is adapted to perform a corresponding network access operation according to the network test request, and feed back a result of the network access operation by using the network tunnel; where the application server is from the host proxy server Obtaining the network access in the second port Ask the result of the operation.
  • the network tunnel establishing module 402 is configured to establish a network tunnel between the first port and the second port of the primary proxy server according to the connection parameter, where the connection parameter includes: The login account and password of the device, the WAN IP address of the primary proxy server and the port number of the second port, and the port number of the first port of the terminal device that is activated.
  • the network tunnel establishing module 402 is an SSH client; and the reverse proxy module 40i is a Squid server.
  • FIG. 5 is a block diagram showing the detailed structure of a terminal device for implementing network test based on a reverse proxy according to an embodiment of the present invention.
  • the terminal device further includes: an automatic reconnection module 403 in addition to the module shown in FIG.
  • the automatic reconnection module 403 is adapted to: when the established network tunnel is disconnected, the automatic reconnection module 403 starts the network tunnel establishment module 402, and the network tunnel establishment module 402 remaps the first port to the primary proxy server according to the connection parameter. On the second port, re-establish the network tunnel -.
  • the automatic reconnect module is an AIJTOSSH client.
  • Network test requests include: a network speed test request or a network quality test request.
  • the network test request is a network quality test request
  • the reverse proxy module 401 is configured to send a test data packet to the destination server and wait for feedback from the destination server, and calculate and the destination server according to the sending time of the test data packet and the receiving time fed back by the test data packet. Network delay; and calculating the network quality with the destination server based on the number of transmissions of the test data packet and the number of feedbacks of the test data packet.
  • the reverse proxy module 401 when the network test request is a network speed test request, is adapted to download a data packet of a specified size from the destination server, according to the size and download of the data packet. The time required to complete the calculation, and calculate the download speed between the destination server and the destination server.
  • the present invention also discloses a system for implementing network testing based on a reverse proxy, the system comprising: a primary proxy server having a wide area network IP address and a terminal device as shown in FIG. 4 or FIG.
  • FIG. 6 is a schematic structural diagram of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention.
  • the system includes: A network tunnel establishment server is deployed on the main proxy server 601.
  • the master proxy server 601 is adapted to establish a network tunnel between the server and the terminal device 602 through the network tunnel; send a network test request to the terminal device 602, and receive a corresponding network access operation according to the network test request returned by the terminal device 602. The result of a network access operation.
  • FIG. 7 shows a detailed structural diagram of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention.
  • the system further includes: an application server 603.
  • the application server 603 is adapted to send the network test request to the second port on the master proxy server 601 through the network tunnel.
  • the terminal device 602 performs a corresponding network access operation according to the network test request, and the network access operation results through the network tunnel.
  • the feedback is performed; the application server 603 is adapted to obtain a result of the network access operation from the second port on the primary proxy server 601.
  • the technical solution provided by the present invention establishes a client and a reverse proxy server by installing a network tunnel in a terminal device deployed in a local area network, and deploys a network tunnel establishment server on the master proxy server.
  • the terminal device can map the first port on the terminal device to the second port on the master proxy server through the connection parameter in the case of booting, and establish a network tunnel between the master proxy server and the terminal device.
  • the master proxy server or the corresponding application server can send a network test request to the corresponding terminal device according to the network tunnel, and obtain an operation result fed back by the reverse proxy server in the terminal device after performing the corresponding network access operation.
  • the primary proxy server or application server is enabled to determine the structure of the network test based on the results of the fed back network access operations.
  • the terminal device provided by the present invention only needs to connect the terminal device to the local area network of the test area, and can establish a network tunnel with the master proxy server, thereby enabling the master proxy server or the application server to make the terminal through the network tunnel.
  • the result of the feedback network access operation after the device performs the corresponding network access operation confirms the network test result.
  • DSP DSP
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or provided in any relaxed form.
  • FIG. 8 schematically illustrates a server for performing a method of implementing network testing based on a reverse proxy according to the present invention
  • an application server conventionally includes a processor 810 and a computer program product or computer readable medium in the form of a memory 820.
  • Memory 820 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk or ROM.
  • Memory 820 has a memory space 830 for program code 831 for performing any of the method steps described above.
  • storage space 830 for program code may include various program code 831 for implementing various steps in the above methods, respectively.
  • program codes can be read from or written to one or more of the computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • FIG. 9 schematically illustrates a storage unit for holding or carrying program code implementing a method for implementing network test based on reverse management according to the present invention; the storage unit may have a similar arrangement to the memory 820 in the server of FIG. Storage segment, storage space, etc.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 83, i.e., code that can be read by, for example, a processor such as 810, which when executed by the server causes the server to perform various steps in the methods described above.
  • an embodiment or “one or more embodiments” as used herein means that the particular features, structures, or characteristics described in connection with the embodiments are included in at least one embodiment of the invention.
  • the phrase “in one embodiment” herein does not necessarily refer to the same embodiment.

Landscapes

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

Abstract

The present invention relates to the field of network test technologies. Disclosed are a method, a terminal device, and a system for implementing a network test based on a reverse proxy. The method is applicable to establishment of a reverse proxy between a terminal device located in a local area network and a main proxy server located in a wide area network to perform a network test. The method comprise: starting a first port on the terminal device and starting a second port on the main proxy server; establishing a network tunnel between the first port on the terminal device and the second port on the main proxy server; sending a network test request to the first port on the terminal device by using the second port on the main proxy server via the network tunnel; and the terminal device performing a corresponding network access operation according to the network test request, and feeding back a result of the network access operation to the main proxy server. The present invention can solve a problem of a huge cost for a network test in an existing deployment network test environment.

Description

本发明涉及网络测试技术领域, 具体涉及一种基于反向代理实现网络测 试的方法、 终端 ·没备和系统。  The present invention relates to the field of network testing technologies, and in particular, to a method, a terminal, and a system for implementing network testing based on a reverse proxy.

背景技.术  Background technique

在现有技术中, 为了铺设全国各地的网络测试环境, 通常需要给全国各 地部署 IDC机房。 然而, 在全国各地都部署 IDC机房不仅需要耗费巨大的 人力和财力, 并且对部署的 IDC机房进行维护还需额外的投入。 此外, 即使 部署了 IDC机房, 现有的 IDC机房仍然存在着网络出口资源稀缺的情况, 即对应 IDC机房所对应 IP地址基本上的固定的。  In the prior art, in order to lay a network test environment throughout the country, it is usually necessary to deploy IDC rooms throughout the country. However, deploying an IDC room throughout the country requires not only significant human and financial resources, but also additional investment in the maintenance of the deployed IDC room. In addition, even if an IDC room is deployed, the existing IDC room still has a shortage of network export resources, that is, the IP address corresponding to the IDC room is basically fixed.

因此, 当需要全国性的网络测试环境进行网络测试的情况下, 通过在全 国各地部署 IDC机房无疑是耗费最大的方案。  Therefore, when a nationwide network test environment is required for network testing, deploying an IDC room throughout the country is undoubtedly the most expensive solution.

此外, 在对网页服务器进行测试的过.程中, 只通过 IDC 机房中的网络 IP段进行网络测试, 存在测试结果不够全面的缺陷。  In addition, in the process of testing the web server, the network test is performed only through the network IP segment in the IDC room, and there is a defect that the test result is not comprehensive enough.

综上所述, 现有的部署网络测试环境进行网络测试存在成本巨大的问 题。  In summary, the existing deployment of network test environments for network testing has a huge cost problem.

发明内容  Summary of the invention

鉴于上述问题, 提出了本发明以便提供一种克服上述问题或者至少 部分地解决上述问题的一种基于反向代理实现网络测试的方法。  In view of the above problems, the present invention has been made in order to provide a method for implementing network testing based on a reverse proxy that overcomes the above problems or at least partially solves the above problems.

依据本发明的一个方面, 提供了一种基于反向代理实现网络测试的 方法, 其中, 该方法适用于: 通过在位于局域网中的终端设备和位于广 域网中的主代理服务器之间建立反向代理进行网络测试, 该方法包括: 在所述终端设备上启动第一端口, 在所述主代理服务器上启动第二 端口;  According to an aspect of the present invention, a method for implementing network testing based on a reverse proxy is provided, wherein the method is applicable to: establishing a reverse proxy between a terminal device located in a local area network and a master proxy server located in a wide area network Performing a network test, the method includes: starting a first port on the terminal device, and starting a second port on the primary proxy server;

在所述终端设备的第一端口与主代理服务器的第二端口之间建立网 络隧道;  Establishing a network tunnel between the first port of the terminal device and the second port of the primary proxy server;

通过所述主代理服务器的第二端口经由所述网络隧道发送网络测试 请求至所述终端设备的第一端口;  Transmitting, by the second port of the primary proxy server, a network test request to the first port of the terminal device via the network tunnel;

所述终端设备根据所述网络测试请求进行相应的网络访问操作, 将 所述网络访问操作的结果反馈至所述主代理服务器。 The terminal device performs a corresponding network access operation according to the network test request, and The result of the network access operation is fed back to the primary proxy server.

依据本发明的一个方面, 提供了一种基于反向代理实现网络测试的 终端设备, 其中, 该终端设备位于局域网中, 与位于广域网中的主代理 服务器之间建立反向代理, 进行网络测试, 该终端设备包括:  According to an aspect of the present invention, a terminal device for implementing network testing based on a reverse proxy is provided, wherein the terminal device is located in a local area network, and a reverse proxy is established with a primary proxy server located in the wide area network to perform network testing. The terminal device includes:

反向代理模块, 适用于在终端设备上启动第一端口;  a reverse proxy module, configured to start the first port on the terminal device;

网络隧道建立模块, 适用于在所述第一端口与主代理服务器上的第 二端口之间建立网络隧道;  a network tunnel establishing module, configured to establish a network tunnel between the first port and a second port on the primary proxy server;

反向代理模块, 适用于接收所述主代理服务器通过所述第二端口经 由所述网络隧道发送至所述第一端口的网络测试访问请求; 根据所述网 络测试请求进行相应的网络访问操作, 将网络访问操作的结果反馈到主 代理服务器。  a reverse proxy module, configured to receive a network test access request sent by the primary proxy server to the first port by using the network port by using the second port; performing a corresponding network access operation according to the network test request, The results of the network access operation are fed back to the primary proxy server.

依据本发明的一个方面, 提供了一种基于反向代理实现网络测试的 系统, 其中, 该系统包括: 具有广域网 IP地址的主代理服务器和上述中 任意一项所述的终端设备。  According to an aspect of the present invention, a system for implementing network testing based on a reverse proxy is provided, wherein the system comprises: a primary proxy server having a wide area network IP address and the terminal device according to any one of the above.

根据本发明的一个方面提供了一种針算机程序, 包括计算机可读代 码, 当所述计算机可读代码在服务器上运行时, 导致所述服务器执行 本发明一个方面所述.的方法。  According to an aspect of the invention there is provided a computer program comprising computer readable code, the computer readable code, when run on a server, causing the server to perform the method of one aspect of the invention.

根据本发明的一个方面提供了一种计算机可读介质 , 其中存储'了如 本发明一个方面所述.的计算机程序。  According to an aspect of the invention, a computer readable medium is provided, wherein a computer program as described in one aspect of the invention is stored.

根据本发明的提供的技术方案, 通过在局域网中部署的终端设备中 安装网络隧道建立客户端和反向代理服务端, 在主代理服务器上部署网 络隧道建立服务器。 通过连接参数将终端设备上的第一端口映射到主代 理服务器上的第二端口上, 建立主代理服务器与终端设备之间的网络隧 道。 主代理服务器能够通过该网络隧道发送网络测试请求到对应的终端 设备, 并且获取该终端设备中的反向代理服务器根据网络测试请求进行 相应的网络访问操作之后的所反馈的操作结果。 解决了在部署全国各地 网络测试环境进行网络测试, 需要在全国各地部署 IDC机房所需的高成 本的问题。  According to the technical solution provided by the present invention, a network tunnel establishment client and a reverse proxy server are installed in a terminal device deployed in a local area network, and a network tunnel establishment server is deployed on the master proxy server. A network tunnel between the master proxy server and the terminal device is established by mapping the first port on the terminal device to the second port on the primary proxy server through the connection parameter. The master proxy server can send a network test request to the corresponding terminal device through the network tunnel, and obtain a feedback operation result after the reverse proxy server in the terminal device performs the corresponding network access operation according to the network test request. It solves the problem of high cost required to deploy IDC machine rooms throughout the country for network testing in network test environments across the country.

上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明 的技术手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上 述和其它目的, 特征和优点能够更明显易懂, 以下特举本发明的具体实 施方式。 附图说明 The above description is only an overview of the technical solutions of the present invention, and the technical means of the present invention can be more clearly understood, and can be implemented in accordance with the contents of the specification, and the above and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below. DRAWINGS

通过阅读下文优选实施方式的详细描述, 各种其他的优点和益处对 于本领域普通技术人员将变得清楚明了。 酎图仅用于示出优选实施方式 的目的, 而并不认为是对本发明的限制。 而且在整个附图中, 用相同的 参考符号表示相同的部件。 在酎图中:  Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not intended to limit the invention. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the map:

图 i示出了根据本发明一个实施例的一种基于反向代理实现网络测试的 方法的流:程图;  Figure 1 illustrates a flow diagram of a method for implementing network testing based on a reverse proxy, in accordance with one embodiment of the present invention;

图 2示出了根据本发明一个实施例的一种基于反向代理实现网络测试的 方法的洋细流程图;  2 shows a detailed flow chart of a method for implementing network testing based on a reverse proxy, in accordance with one embodiment of the present invention;

图 3示出了根据本发明一个实施例的一种基于反向代理实现网络测试的 网络拓朴图;  3 illustrates a network topology diagram for implementing network testing based on a reverse proxy, in accordance with one embodiment of the present invention;

图 4示出了根据本发.明一个实施例的一种基于反向代理实现网络测试的 终端设备的结构示意图;  4 is a schematic structural diagram of a terminal device for implementing network testing based on a reverse proxy according to an embodiment of the present invention;

图 5示出了根据本发明一个实施例的一种基于反向代理实现网络测试的 终端设备的详细结构示意图;  FIG. 5 is a schematic structural diagram of a terminal device for implementing network testing based on a reverse proxy according to an embodiment of the present invention; FIG.

图 6示出了根据本发明一个实施例的一种基于反向代理实现网络测试的 系统的结构示意图;  6 is a schematic structural diagram of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention;

图 7示出了根据本发明一个实施例的一种基于反向代理实现网络测试的 系统的详细结构示意图;  FIG. 7 is a block diagram showing a detailed structure of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention; FIG.

图 8 示意性地示出了用于执行根据本发明的基于反向代理实现网 络测试的方法的服务器的 4]1图; 以及  Figure 8 is a view schematically showing a 4] 1 diagram of a server for performing a method for implementing network test based on a reverse proxy according to the present invention;

图 9 示意性地示出了用于保持或者携带实现根据本发明的基于反 向代理实现网络测试的方法的程序代码的存储单元。 具体实施例  Fig. 9 schematically shows a storage unit for holding or carrying program code implementing a method for implementing network test based on a reverse proxy according to the present invention. Specific embodiment

下面将参照附图更详细地描述本公开的示例性实施例。 虽然附图中 显示了本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本 公开而不应被这里阐述的实施例所限制。 相反, 提供这些实施例是为了 能够更透彻地理解本公开, 并且能够将本公开的范围完整的传达给本领 域的技术 .人员。  Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the exemplary embodiments of the present invention are shown in the drawings, it is understood that the invention may be embodied in various forms and not limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be more fully understood, and the scope of the present disclosure can be fully conveyed to those skilled in the art.

图 1 示出了根据本发明一个实施例的一种基于反向代理实现网络测 试的方法的流程图; 本方法适用于: 通过在位于局域网中的终端设备和 位于广域网中的主代理服务器之间建立反向代理进行网络测试, 参见图FIG. 1 illustrates a network measurement based on a reverse proxy according to an embodiment of the present invention. Flow chart of the test method; the method is applicable to: performing network test by establishing a reverse proxy between a terminal device located in a local area network and a master proxy server located in the wide area network, see figure

I , 该方法包括如下步骤.。 I, the method includes the following steps.

步骤 S 101, 在终端设备上启动第一端口, 在主代理服务器上启动第 二端口。  Step S101: Start a first port on the terminal device, and start a second port on the master proxy server.

步骤 S 102 , 在终端设备的第一端口与主代理服务器的第二端口之间 建立网络隧道。  Step S102: Establish a network tunnel between the first port of the terminal device and the second port of the primary proxy server.

步骤 S 103 , 通过主代理服务器的第二端口经由网络隧道发送网络测 试请求至所述终端设备的第一端口。  Step S103: Send a network test request to the first port of the terminal device via a network tunnel by using a second port of the master proxy server.

步骤 S104终端设备根据网络测试请求进行相应的网络访问操作, 将 所述网络访问操作的结果反馈至所述主代理服务器。  Step S104: The terminal device performs a corresponding network access operation according to the network test request, and feeds back the result of the network access operation to the primary proxy server.

本发明提供的图 1 所示的技术方案中, 通过在局域网中部署的终端 设备中安装网络隧道建立客户端和反向代理服务端, 在主代理服务器上 部署网络隧道建立服务器。 通过连接参数将终端设备上的第一端口映射 到主代理服务器上的第二端口上, 建立主代理服务器与终端设备之间的 网络隧道。 主代理服务器能够通过该网络隧道发送网络测试请求到对应 的终端设备, 并且获取该终端设备中的反向代理服务器根据网络测试请 求进行相应的网络访问操作之后的所反馈的操作结果。 解决了在部署全 国各地网络测试环境进行网络测试, 需要在全国各地部署 IDC机房所需 的高成本的问题。 图 2 示出了根据本发明一个实施例的一种基于反向代理实现网络测 试的方法的详细流程图; 该方法基于反向代理建立终端设备与主代理服 务器之间的网络隧道, 并以此实现网络测试。 其中, 通过反向代理可见 建立处于局域网中的终端设备与处于广域网中的主代理服务器之间的网 络隧道, 进而建立终端设备与主代理服务器之间的通信。  In the technical solution shown in FIG. 1 provided by the present invention, a network tunnel establishment client and a reverse proxy server are installed in a terminal device deployed in a local area network, and a network tunnel establishment server is deployed on the master proxy server. A network tunnel between the master proxy server and the terminal device is established by mapping the first port on the terminal device to the second port on the master proxy server through the connection parameter. The master proxy server can send a network test request to the corresponding terminal device through the network tunnel, and obtain a feedback operation result after the reverse proxy server in the terminal device performs the corresponding network access operation according to the network test request. It solves the problem of high cost required to deploy IDC rooms across the country in the network test environment for deploying network test environments across the country. 2 shows a detailed flowchart of a method for implementing network testing based on a reverse proxy according to an embodiment of the present invention; the method establishes a network tunnel between a terminal device and a master proxy server based on a reverse proxy, and Implement network testing. The reverse tunneling can be used to establish a network tunnel between the terminal device in the local area network and the master proxy server in the wide area network, thereby establishing communication between the terminal device and the master proxy server.

参见图 2所示, 该方法包括如下步骤。  Referring to Figure 2, the method includes the following steps.

步骤 S201 , 启动安装在主代理服务器上的网络隧道建立服务端, 在 主代理服务器上启动第二端口。  Step S201: Start a network tunnel establishment server installed on the primary proxy server, and start a second port on the primary proxy server.

在本发明的一种实施例中, 在主代理服务器上安装网络隧道建立服 务端, 便于在启动网络隧道建立服务端之后, 可以实现允许任意来源连 接该第二端口。 即便于与终端设备建立网络隧道。 在本发明的一种具体实施例中, 安装在主代理服务器上的网络隧道 建立服务端为 SSH服务端。 In an embodiment of the present invention, the network tunnel establishment server is installed on the primary proxy server, so that after the network tunnel is established to establish the server, the second port can be allowed to be connected by any source. That is, it is convenient to establish a network tunnel with the terminal device. In a specific embodiment of the present invention, the network tunnel establishment server installed on the primary proxy server is an SSH server.

步骤 S202, 启动安装在终端设备上的反向代理服务端, 启动安装在 终端设备上的网络隧道建立客户端, 在终端设备上启动第一端口。  Step S202: Start a reverse proxy server installed on the terminal device, start a network tunnel establishment client installed on the terminal device, and start the first port on the terminal device.

在本发明的一种实施例中, 在启动所述安装在终端设备上的反向代 理服务端之后, 该反向代理服务端会自动启动该终端设备上的第一端口。  In an embodiment of the present invention, after the reverse proxy server installed on the terminal device is started, the reverse proxy server automatically starts the first port on the terminal device.

在本发明的一种实施例中, 安装在终端设备上的反向代理服务端为 Squid ,服务端。  In an embodiment of the present invention, the reverse proxy server installed on the terminal device is Squid, the server.

步骤 S203, 在终端设备的第一端口与主代理服务器的第二端口之间 建立网络隧.道。  Step S203, establishing a network tunnel between the first port of the terminal device and the second port of the primary proxy server.

在本发明的一种实施例中, 在启动安装在终端设备上的网络隧道建 立客户端之后, 网络隧道建立客户端与安装在主代理服务器上的网络隧 道建立服务器建立连接, 即通过网络隧道建立客户端与网络隧道建立服 务端将终端设备上的第一端口映射到主代理服务器上的第二端口上, 进 而建立终端设备的第一端口与主代理服务器的第二端口之间的网络隧 道。  In an embodiment of the present invention, after the network tunnel establishment client installed on the terminal device is started, the network tunnel establishment client establishes a connection with the network tunnel establishment server installed on the primary proxy server, that is, establishes a network tunnel. The client and the network tunnel establishment server map the first port on the terminal device to the second port on the master proxy server, thereby establishing a network tunnel between the first port of the terminal device and the second port of the master proxy server.

在本发明的一种实施例中, 部署在终端设备上的网络隧道建立客户 端为 SSH客户端。 在网络隧道建立过程中, 具体根据连接参数在终端设 备的第一端口与主代理服务器的第二端口之间建立网络隧道; 其中, 连 接参数包括: 终端设备的登录账户和密码, 主代理服务器的广域网 IP地 址和第二端口的端口号, 启动的所述终端设备的第一端口的端口号。  In an embodiment of the present invention, the network tunnel establishment client deployed on the terminal device is an SSH client. During the establishment of the network tunnel, a network tunnel is established between the first port of the terminal device and the second port of the primary proxy server according to the connection parameter. The connection parameters include: a login account and a password of the terminal device, and a master proxy server. The WAN IP address and the port number of the second port, the port number of the first port of the terminal device that is activated.

步骤 S204, 通过主代理服务器的第二端口经由网络隧道发送网络测 试请求至终端设备的第一端口。  Step S204: Send a network test request to the first port of the terminal device via the network tunnel through the second port of the primary proxy server.

步骤 S205 , 终端设备根据网络测试请求进行相应的网络访问操作, 将所述网络访问操作的结果反馈至所述主代理服务器。  Step S205: The terminal device performs a corresponding network access operation according to the network test request, and feeds back the result of the network access operation to the primary proxy server.

在步骤 S204和步骤 S205 中, 在本发明的一种实施例中, 由终端设 备中的反向代理服务端接收来自网络隧道的网络测试请求, 并且由反向 代理服务端根据网络测试请求进行相应的网络访问操作, 将网络访问操 作的结果通过网络隧道进行反馈。 在反馈的过程中, 将网络访问操作的 结果反馈到终端设备的第一端口上, 使得主代理服务器能够从第二端口 中获取该网络访问操作结果。  In step S204 and step S205, in an embodiment of the present invention, the network test request from the network tunnel is received by the reverse proxy server in the terminal device, and the reverse proxy server performs corresponding according to the network test request. The network access operation, the result of the network access operation is fed back through the network tunnel. In the process of feedback, the result of the network access operation is fed back to the first port of the terminal device, so that the master proxy server can obtain the network access operation result from the second port.

步骤 S206, 应用服务器通过主代理服务器上的网络隧道向终端设备 发送网络测试请求。 Step S206, the application server passes the network tunnel on the primary proxy server to the terminal device. Send a network test request.

在本发明的具体实施过程中, 不会只有主代理服务器发送网络测试 请求, 部署在主代理服务器周围的, 与主代理服务器在逻辑上连接的应 用服务器也会发送网络测试请求, 使得终端设备进行相应的网络访问操 作。  In the specific implementation process of the present invention, only the primary proxy server sends a network test request, and the application server deployed around the primary proxy server and logically connected with the primary proxy server also sends a network test request, so that the terminal device performs The corresponding network access operation.

在本发明的一种实施例中, 终端设备接收应用服务器通过网络隧道 发送的网络测试请求; 其中, 应用服务器将网络测试请求发送到主代理 服务器上的第二端口; 终端设备从主代理服务器上的第二端口获取所述 网络测试请求。  In an embodiment of the present invention, the terminal device receives a network test request sent by the application server through the network tunnel; wherein, the application server sends the network test request to the second port on the master proxy server; the terminal device is from the master proxy server. The second port obtains the network test request.

步骤 S207 , 终端设备根据网络测试请求进行相应的网络访问操作, 将所述网络访问操作的结果反馈至所述主代理服务器。  Step S207: The terminal device performs a corresponding network access operation according to the network test request, and feeds back the result of the network access operation to the primary proxy server.

在本发明的一种实施例中, 终端设备根据所述网络测试请求进行相 应的网络访问操作, 将网络访问操作的结果通过所述网络隧道进行反馈; 其中, 所述应用服务器从所述主代理服务器上的所述第二端口中获取所 述网络访问操作的结果。  In an embodiment of the present invention, the terminal device performs a corresponding network access operation according to the network test request, and feeds back a result of the network access operation through the network tunnel; wherein the application server is from the master agent The result of the network access operation is obtained in the second port on the server.

在本发明的一种较佳实施例中, 为了解决在出现故障导致网络隧道 断开的问题, 以及在网络隧道断开之后, 能够自动进行重连, 避免用户 再次进行手动连接所造成的效率低下的问题。 该方法进一步包括: 在终 端设备上部署自动重连客户端。 其中, 当所建立的网络隧道断开时, 自 动重连客户端启动网络隧道建立客户端, 网络隧道建立客户端根据所述 连接参数重新将所述第一端口映射到主代理服务器上的所述第二端口 上, 重新建立网络隧道。  In a preferred embodiment of the present invention, in order to solve the problem that the network tunnel is disconnected in the event of a failure, and after the network tunnel is disconnected, the reconnection can be automatically performed to avoid inefficiency caused by the user manually performing the manual connection again. The problem. The method further includes: deploying an automatic reconnect client on the terminal device. When the established network tunnel is disconnected, the automatic reconnection client starts the network tunnel establishment client, and the network tunnel establishment client remaps the first port to the first proxy server according to the connection parameter. On the second port, re-establish the network tunnel.

在本发.明的一种具体实施例中, 所述自动重连客户端为 AUTOSSH 客户端。 较佳的, 在终端设备本地保存登录脚本, 在登录脚本中保存连 接参数。 当终端设备与主代理服务器之间的网络隧道断开之后, 自动重 连客户端重新启动, 从本地保存的登录 本中读取连接参数, 根据连接 参数与主代理服务器上的第二端口建立网络隧道。  In a specific embodiment of the present invention, the automatic reconnection client is an AUTOSSH client. Preferably, the login script is saved locally on the terminal device, and the connection parameters are saved in the login script. After the network tunnel between the terminal device and the primary proxy server is disconnected, the automatic reconnection client restarts, reads the connection parameters from the locally saved login book, and establishes a network according to the connection parameter and the second port on the primary proxy server. tunnel.

在本发明的一种实施例中, 网络测试请求包括: 网速测试请求或网 络质量测试请求。 其中, 网速测试请求可以为: 测试与目的服务器之间 的网络下载速度, 网络质量测试区请求可以为: 测试与目的服务器之间 的网络时延以及丢包率。 在本发明的其他实施例中, 网络测试请求中可 以同时包括网速测试请求和网络质量测试请求 0 当所述网络测试请求为网络质量测试请求时, 终端设备根据网络测 试请求进行相应的网络访问操作具体为: 终端设备发送测试数据包到目 的服务器并接收目的服务器的反馈包, 根据测试数据包的发送时刻与反 馈包的接收时刻, 计算终端设备与目的服务器之间的网络时延; 以及根 据测试数据包的发送数目与反馈包的数目计算终端设备与目的服务器之 间的丟包率; In an embodiment of the invention, the network test request comprises: a network speed test request or a network quality test request. The network speed test request may be: a network download speed between the test and the destination server, and the network quality test area request may be: a network delay between the test and the destination server, and a packet loss rate. In other embodiments of the present invention, the test request may comprise a network speed test and network quality test request requests simultaneously 0 When the network test request is a network quality test request, the terminal device performs a corresponding network access operation according to the network test request, specifically: the terminal device sends the test data packet to the destination server and receives the feedback packet of the destination server, according to the test data packet. Calculating a network delay between the terminal device and the destination server according to the sending time and the receiving time of the feedback packet; and calculating a packet loss rate between the terminal device and the destination server according to the number of the test data packet and the number of the feedback packet;

当所述网络测试请求为网速测试请求时, 终端设备根据网络测试请 求进行相应的网络访问操作具体为: 终端设备从目的服务器下载指定大 小的数据包, 根据数据包的大小和下载完成所需的时间, 计算与目的服 务器之间的下载网速。  When the network test request is a network speed test request, the terminal device performs a corresponding network access operation according to the network test request, specifically: the terminal device downloads a data packet of a specified size from the destination server, according to the size of the data packet and the completion of the downloading. Time, calculate the download speed between the server and the destination server.

在本发明的一种实施例中, 主代理服务器根据网络访问操作的结果 确定所述网络测试结果。 举例为, 优良: 丟包率 =0并且延迟小于 10ms。 正常: 丢包率小于 2%或者时延< 100ms。 不正常: 丢包率大于 2%或者时 延大于 100ms。 中断: 丟包率为 100%。 图 3 示出了根据本发明一个实施例的一种基于反向代理实现网络测 试的网络拓朴图; 参见图 3所示, 图 3仅为本发明的技术方案实施的一 种方案。  In one embodiment of the invention, the primary proxy server determines the network test results based on the results of the network access operations. For example, excellent: packet loss rate = 0 and delay is less than 10ms. Normal: The packet loss rate is less than 2% or the delay is <100ms. Not normal: The packet loss rate is greater than 2% or the delay is greater than 100ms. Interrupt: The packet loss rate is 100%. FIG. 3 shows a network topology diagram for implementing network testing based on a reverse proxy according to an embodiment of the present invention; FIG. 3 is only a scheme for implementing the technical solution of the present invention.

该方案主要为了解决在 IDC机房在网络出口资源稀缺情况下的网络 出口资源的扩充, 以低成本快速铺设全国各地的网络测试环境, 缓解公 司需要在各地开设新机房所造成的高本成本的负担。  The solution is mainly to solve the expansion of the network export resources in the IDC room under the shortage of network export resources, to quickly lay down the network test environment across the country at low cost, and alleviate the high cost burden that the company needs to open new computer rooms everywhere. .

在未使用本发明的技术方案时, 为了实现对某网页服务器的测试, 为了达到全国各地的网络测试环境, 需要在全国各地开设 IDC机房。 例 如, 图 3 中所示, 使用西安服务器 1访问某网页服务器时, 该网页服务 器判断该访问连接来自西安的 IDC链路。  When the technical solution of the present invention is not used, in order to implement testing of a web server, in order to achieve a network test environment throughout the country, an IDC machine room needs to be opened throughout the country. For example, as shown in Figure 3, when using Xi'an Server 1 to access a web server, the web server determines that the access connection is from IDC's IDC link.

在使用本发明的技术方案之后, 通过在主代理服务器上运行 SSH服 务端, 在终端设备上运行 SSH客户端和 Squid服务端。 并启动终端设备 上的第一端口, 在主代理服务器上启动第二端口, 将终端设备上的第一 端口映射到主代理服务器上的第二端口上。 例如, 北京某局域网中的终 端设备 1将第一端口 80映射到主代理服务器上的第二端口 200上, 建立 终端设备 1 与主代理服务器之间的网络隧道。 上海某局域网中的终端设 备 2将第一端口 80映射到主代理服务器上的第二端口 300上, 建立终端 设备 2 与主代理服务器之间的网络隧道。 其中, 每个终端设备对应于主 代理服务上的任意一个端口, 并且每个终端设备所对应的端口号不相同。 After using the technical solution of the present invention, the SSH client and the Squid server are run on the terminal device by running the SSH server on the master proxy server. And starting the first port on the terminal device, starting the second port on the primary proxy server, and mapping the first port on the terminal device to the second port on the primary proxy server. For example, the terminal device 1 in a local area network of Beijing maps the first port 80 to the second port 200 on the master proxy server, and establishes a network tunnel between the terminal device 1 and the master proxy server. The terminal device 2 in a local area network of Shanghai maps the first port 80 to the second port 300 on the master proxy server to establish a terminal. A network tunnel between device 2 and the primary proxy server. Each terminal device corresponds to any port on the primary proxy service, and the port number corresponding to each terminal device is different.

当西安服务器 1通过主代理服务器上的 200端口访问网页服务器时, 该网页服务器判断该访问连接来自北京 : [DC链路。 同样的, 当通过主代 理服务器上的 300 端口访问网页服务器时, 该网页服务器判断该访问连 接来自上海 IDC链路。 并且在进行网络访问操作之后的结果也等同与该 地区的网络访问操作结果。  When the Xi'an server 1 accesses the web server through the port 200 on the main proxy server, the web server determines that the access connection is from Beijing: [DC link. Similarly, when accessing a web server through port 300 on the primary proxy server, the web server determines that the access connection is from a Shanghai IDC link. And the result after the network access operation is equivalent to the network access operation result of the region.

其中, 西安服务器 1相当于本发明中的应用服务器。  Among them, the Xi'an server 1 is equivalent to the application server in the present invention.

因此实现了只需要一台主代理服务器和若千个终端设备, 就能实现 全国各位的网络测试环境 不仅减少了开设机房的时间成本、 还减少了 人力资源和服务器铺设成本。  Therefore, it is realized that only one main proxy server and thousands of terminal devices are needed, and the network test environment of all the countries can be realized, which not only reduces the time cost of opening the computer room, but also reduces the human resources and server installation costs.

在本发明的一种实施例中, 终端设.备可以为小型的 ARM设备(插头 电脑) 、 手机、 平板电脑等智能终端, 也可以是 PC机等。 在终端设备上 部署 linux系统以及 SSH—客户端和反向代理服务端。  In an embodiment of the present invention, the terminal device may be a smart device such as a small ARM device (plug computer), a mobile phone, a tablet computer, or a PC. Deploy the Linux system and the SSH-client and reverse proxy servers on the terminal.

本发明还公开了一种基于反向代理实现网络测试的终端设备, 其中, 该终端设备位于局域网中, 与位于广域网中的主代理服务器之间建立反 向代理, 进行网络测试。 图 4 示出了根据本发明一个实施例的一种基于 反向代理实现网络测试的终端设备的结构示意图。 参见图 4 所示, 该终 端设备 400包括:  The invention also discloses a terminal device for implementing network test based on a reverse proxy, wherein the terminal device is located in a local area network, and establishes a reverse proxy with a master proxy server located in the wide area network to perform network test. FIG. 4 is a schematic structural diagram of a terminal device for implementing network test based on a reverse proxy according to an embodiment of the present invention. Referring to Figure 4, the terminal device 400 includes:

反向代理模块 401 , 适用于在终端设备 400上启动第一端口; 网络隧道建立模块 402 ,适用于在所述第一端口与主代理服务器上的 第二端口之间建立网络隧道;  The reverse proxy module 401 is adapted to start the first port on the terminal device 400. The network tunnel establishing module 402 is adapted to establish a network tunnel between the first port and the second port on the primary proxy server.

反向代理模块 401,适用于接收所述主代理服务器通过所述第二端口 经由所述网络隧道发送至所述第一端口的网络测试访问请求; 根据所述 网络测试请求进行相应的网络访问操作, 将网络访问操作的结果反馈到 主代理服务器。  The reverse proxy module 401 is adapted to receive a network test access request sent by the primary proxy server to the first port by using the network port by using the second port; performing a corresponding network access operation according to the network test request , feed back the results of the network access operation to the master proxy server.

在本.发明的一种实施例中, 反.向代理模块 40】 , 进一步适用于接收应 用服务器通过所述网络隧道发送的网络测试请求; 其中, 所述应用服务 器将网络测试请求发送到所述主代理服务器上的所述第二端口。  In an embodiment of the present invention, the reverse proxy module 40 is further adapted to receive a network test request sent by the application server through the network tunnel; wherein the application server sends a network test request to the The second port on the primary proxy server.

反向代理模块 401,适用于根据所述网络测试请求进行相应的网络访 问操作, 将网络访问操作的结果通过所述网络隧道进行反馈; 其中, 所 述应用服务器从所述主代理服务器上的所述第二端口中获取所述网络访 问操作的结果。 The reverse proxy module 401 is adapted to perform a corresponding network access operation according to the network test request, and feed back a result of the network access operation by using the network tunnel; where the application server is from the host proxy server Obtaining the network access in the second port Ask the result of the operation.

在本发明的一种实施例中, 网络隧道建立模块 402, 适用于根据连接 参数在所述第一端口与主代理服务器的第二端口之间建立网络隧道; 其 中, 所述连接参数包括: 终端设备的登录账户和密码, 主代理服务器的 广域网 IP地址和第二端口的端口号, 启动的所述终端设备的第一端口的 端口号。  In an embodiment of the present invention, the network tunnel establishing module 402 is configured to establish a network tunnel between the first port and the second port of the primary proxy server according to the connection parameter, where the connection parameter includes: The login account and password of the device, the WAN IP address of the primary proxy server and the port number of the second port, and the port number of the first port of the terminal device that is activated.

在本发明的一种实施例中, 所述网络隧道建立模块 402为 SSH客户 端; 所述反向代理模块 40i为 Squid服务端。  In an embodiment of the present invention, the network tunnel establishing module 402 is an SSH client; and the reverse proxy module 40i is a Squid server.

图 5 示出了根据本发明一个实施例的一种基于反向代理实现网络测 试的终端设备的详细结构示意图。 参见图 5 所示, 该终端设备除了图 4 中所示的模块之外, 该终端设备进一步包括: 自动重连模块 403。  FIG. 5 is a block diagram showing the detailed structure of a terminal device for implementing network test based on a reverse proxy according to an embodiment of the present invention. Referring to FIG. 5, the terminal device further includes: an automatic reconnection module 403 in addition to the module shown in FIG.

自动重连模块 403, 适用于当所建立的网络隧道断开时, 自动重连模 块 403启动网络隧道建立模块 402, 网络隧道建立模块 402根据连接参数 重新将第一端口映射到主代理服务器上的第二端口上, 重新建立网络隧 道-。  The automatic reconnection module 403 is adapted to: when the established network tunnel is disconnected, the automatic reconnection module 403 starts the network tunnel establishment module 402, and the network tunnel establishment module 402 remaps the first port to the primary proxy server according to the connection parameter. On the second port, re-establish the network tunnel -.

在本.发明的一种实施例中, 自动重连模块为 AIJTOSSH客户端。 网络测试请求包括: 网速测试请求或网络质量测试请求。  In an embodiment of the invention, the automatic reconnect module is an AIJTOSSH client. Network test requests include: a network speed test request or a network quality test request.

在本发明的一种实施例中, 当所述网络测试请求为网络质量测试请 求时,  In an embodiment of the present invention, when the network test request is a network quality test request,

反向代理模块 401 ,适用于发送测试数据包到所述目的服务器并等待 目的服务器的反馈, 根据所述测试数据包的发送时刻与测试数据包反馈 的接收时刻, 计算与所述目的服务器之间的网络时延; 以及根据测试数 据包的发送数目与测试数据包的反馈的数目计算与所述目的服务器之间 的网络质量。  The reverse proxy module 401 is configured to send a test data packet to the destination server and wait for feedback from the destination server, and calculate and the destination server according to the sending time of the test data packet and the receiving time fed back by the test data packet. Network delay; and calculating the network quality with the destination server based on the number of transmissions of the test data packet and the number of feedbacks of the test data packet.

在本发明的一种实施例中, 当所述网络测试请求为网速测试请求时, 反向代理模块 401, 适用于从目的服务器下载指定大小的数据包, 根 据所述数据包的大小和下载完成所需的时间, 计算与目的服务器之间的 下载网速。  In an embodiment of the present invention, when the network test request is a network speed test request, the reverse proxy module 401 is adapted to download a data packet of a specified size from the destination server, according to the size and download of the data packet. The time required to complete the calculation, and calculate the download speed between the destination server and the destination server.

本发明还公开了一种基于反向代理实现网络测试的系统, 该系统包 括:具有广域网 IP地址的主代理服务器和如图 4或图 5所示的终端设备。  The present invention also discloses a system for implementing network testing based on a reverse proxy, the system comprising: a primary proxy server having a wide area network IP address and a terminal device as shown in FIG. 4 or FIG.

图 6 示出了根据本发明一个实施例的一种基于反向代理实现网络测 试的系统的结构示意图 参见图 6所示, 该系统包括: 主代理服务器 601上部署有网络隧道建立服务端, FIG. 6 is a schematic structural diagram of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention. Referring to FIG. 6, the system includes: A network tunnel establishment server is deployed on the main proxy server 601.

主代理服务器 601,适用于通过网络隧道建立服务端建立与终端设备 602之间的网络隧道; 向终端设备 602发送网络测试请求, 以及接收终端 设备 602 返回的根据网络测试请求进行相应的网络访问操作的网络访问 操作的结果。  The master proxy server 601 is adapted to establish a network tunnel between the server and the terminal device 602 through the network tunnel; send a network test request to the terminal device 602, and receive a corresponding network access operation according to the network test request returned by the terminal device 602. The result of a network access operation.

图 7 示出了根据本发明一个实施例的一种基于反向代理实现网络测 试的系统的详细结构示意图。 参见图 7 所述, 该系统进一步包括: 应用 服务器 603。  FIG. 7 shows a detailed structural diagram of a system for implementing network testing based on a reverse proxy according to an embodiment of the present invention. Referring to FIG. 7, the system further includes: an application server 603.

应用服务器 603,适用于通过网络隧道将网络测试请求发送到主代理 服务器 601上的述第二端口; 使得终端设备 602根据网络测试请求进行 相应的网络访问操作, 将网络访问操作的结果通过网络隧道进行反馈; 所述应用服务器 603 ,适用于从主代理服务器 601上的所述第二端口 中获取所述网络访问操作的结果。  The application server 603 is adapted to send the network test request to the second port on the master proxy server 601 through the network tunnel. The terminal device 602 performs a corresponding network access operation according to the network test request, and the network access operation results through the network tunnel. The feedback is performed; the application server 603 is adapted to obtain a result of the network access operation from the second port on the primary proxy server 601.

综上所述, 本发明提供的技术方案, 通过在各地的局域网中部署的 终端设备中安装网络隧道建立客户端和反向代理服务端, 在主代理服务 器上部署网络隧道建立服务器。 终端设备能够在开机的情况下通过连接 参数将终端设备上的第一端口映射到主代理服务器上的第二端口上, 建 立主代理服务器与终端设备之间的网络隧道。 主代理服务器或者相应的 应用服务器能够根据该网络隧道发送网络测试请求到对应的终端设备, 并且获取该终端设备中的反向代理服务器进行相应网络访问操作之后所 反馈的操作结果。 使得主代理服务器或者应用服务器能够根据所反馈的 网络访问操作的结果确定网络测试的结构。 此外, 根据本发明提供的终 端设备, 只需要将该终端设备连接到测试区域的局域网中, 就能与主代 理服务器建立网络隧道, 进而使得主代理服务器或者应用服务器能够通 过该网络隧道使得该终端设备进行相应的网络访问操作之后反馈网络访 问操作的结果确认网络测试结果。 由此可见, 本发明提供的技术方案解 决了现有技术中在部署全国性的网络测试环境的情况下, 需要部署 IDC 机房所需的高成本的问题。 并且保证网络测试的结果准确的有益效果。

Figure imgf000012_0001
In summary, the technical solution provided by the present invention establishes a client and a reverse proxy server by installing a network tunnel in a terminal device deployed in a local area network, and deploys a network tunnel establishment server on the master proxy server. The terminal device can map the first port on the terminal device to the second port on the master proxy server through the connection parameter in the case of booting, and establish a network tunnel between the master proxy server and the terminal device. The master proxy server or the corresponding application server can send a network test request to the corresponding terminal device according to the network tunnel, and obtain an operation result fed back by the reverse proxy server in the terminal device after performing the corresponding network access operation. The primary proxy server or application server is enabled to determine the structure of the network test based on the results of the fed back network access operations. In addition, the terminal device provided by the present invention only needs to connect the terminal device to the local area network of the test area, and can establish a network tunnel with the master proxy server, thereby enabling the master proxy server or the application server to make the terminal through the network tunnel. The result of the feedback network access operation after the device performs the corresponding network access operation confirms the network test result. It can be seen that the technical solution provided by the present invention solves the problem of high cost required for deploying an IDC machine room in the prior art in the case of deploying a nationwide network test environment. And to ensure the accuracy of the results of the network test.
Figure imgf000012_0001

可以以硬件'实现 , 或者以在―个或者多 现, 或者以它们的组合实现。 本领域的 ― 1()― 技术人员应当理解, 可以在实践中使用微处理器或者数字信号处理器It can be implemented in hardware, or in one or more, or in a combination of them. ― 1() in this field The skilled person should understand that a microprocessor or digital signal processor can be used in practice.

( DSP )来实现根据本发明实施例的截屏装置中的一些或者全部部件的 —些或者全部功能。 本发明还可以实现为用于执行这里所描述的方法 的一部分或者全部的设备或者装置程序 (例如, 计算机程序和计算机 程序产品) 。 这样的实现本发明的程序可以存储在计算机可读介质上, 或者可以具有一个或者多个信号的形式。 这样的信号可以从因特网网 站上下载得到, 或者在载体信号上提供, 或者以任何其弛形式提供。 (DSP) to implement some or all of the functions of some or all of the components of the screen capture device in accordance with an embodiment of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier signal, or provided in any relaxed form.

例如, 图 8 示意性地示出了用于执行根据本发明的基于反向代理 实现网络测试的方法的服务器;  For example, FIG. 8 schematically illustrates a server for performing a method of implementing network testing based on a reverse proxy according to the present invention;

例如应用服务器。该服务器传统上包括处理器 810和以存储器 820 形式的计算机程序产品或者计算机可读介质。 存储器 820 可以是诸如 闪存、 EEPROM (电可擦除可编程只读存储器) 、 EPROM、 硬盘或者 ROM之类的电子存储器。 存储器 820具有用于执行上述方法中的任何 方法步骤的程序代码 831的存储空间 830。 例如, 用于程序代码的存储 空间 830 可以包括分别用于实现上面的方法中的各种步骤的各个程序 代码 831。这些程序代码可以从一个或者多个針算机程序产品中读出或 者写入到这一个或者多个计算机程序产品中。 这些计算机程序产品包 括诸如硬盘, 紧致盘 (CD ) 、 存储卡或者软盘之类的程序代码载体。 这样的计算机程序产品通常为如参考图 9 所述的便携式或者固定存储 单元。 图 9 示意性地示出了用于保持或者携带实现根据本发明的基于 反向 理实现网络测试的方法的程序代码的存储单元; 该存储单元可 以具有与图 8的服务器中的存储器 820类似布置的存储段、 存储空间 等。 程序代码可以例如以适当形式进行压缩。 通常, 存储单元包括计 算机可读代码 83 Γ , 即可以由例如诸如 810之类的处理器读取的代码, 这些代码当由服务器运行时, 导致该服务器执行上面所描述的方法中 的各个步驟。  For example, an application server. The server conventionally includes a processor 810 and a computer program product or computer readable medium in the form of a memory 820. Memory 820 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk or ROM. Memory 820 has a memory space 830 for program code 831 for performing any of the method steps described above. For example, storage space 830 for program code may include various program code 831 for implementing various steps in the above methods, respectively. These program codes can be read from or written to one or more of the computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to Figure 9. FIG. 9 schematically illustrates a storage unit for holding or carrying program code implementing a method for implementing network test based on reverse management according to the present invention; the storage unit may have a similar arrangement to the memory 820 in the server of FIG. Storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes computer readable code 83, i.e., code that can be read by, for example, a processor such as 810, which when executed by the server causes the server to perform various steps in the methods described above.

本文中所称的 "一个实施例"、 "实施例"或者"一个或者多个实施 例"意味着, 结合实施例描述的特定特征、 结构或者特性包括在本发明 的至少一个实施例中。 此外, 请注意, 这里"在一个实施例中"的词语例 子不一定全指同一个实施例。  "an embodiment," or "one or more embodiments" as used herein means that the particular features, structures, or characteristics described in connection with the embodiments are included in at least one embodiment of the invention. In addition, it is noted that the phrase "in one embodiment" herein does not necessarily refer to the same embodiment.

在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理  Numerous specific details are set forth in the description provided herein. However, it can be

- i 1 - 解, 本发明的实施例可以在没有这些具体细节的情况下被实践。 在一 些实例中, 并未详细示出公知的方法、 结构和技术, 以便不模糊对本 说明书的理解。 - i 1 - The embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行 限制, 并且本领域技术人员在不脱离所附权利要求的范围的情况下可 设计出替换实施例。 在权利要求中, 不应将位于括号之间的任何参考 符号构造成对权刹要求的限制。单词"包含"不排除存在未列在权.利要求 中的元件或步骤。位于元件之前的单词"一 "或"一个"不排除存在多个这 样的元件。 本发明可以借助于包括有若千不同元件的硬件以及借助于 适当编程的计算机来实现。 在列举了若千装置的单元权利要求中, 这 些装置中的若千个可以是通过同一个硬件项来具体体现。 单词第一、 第二、 以及第三等的使用不表示任何顺序。 可将这些单词解释为名称。  It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to limit the invention, and that alternative embodiments can be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs between parentheses should not be construed as a limitation to the stipulations. The word "comprising" does not exclude the presence of elements or steps that are not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising thousands of different elements and by means of a suitably programmed computer. In the unit claims enumerating the thousands of devices, thousands of these devices may be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

此外, 还应当注意, 本说明书中使用的语言主要是为了可读性和 教导的目的而选择的, 而不是为了解释或者限定本发明的主题而选择 的。 因此, 在不偏离所附权利要求书的范围和精神的情况下, 对于本 技术领域的普通技术人员来说许多修改和变更都是显而易见的。 对于 本发明的范围, 对本发明所做的公开是说明性的, 而非限制性的, 本 发明的范围由所附权利要求书限定。  In addition, it should be noted that the language used in the present specification has been selected primarily for the purpose of readability and teaching, and is not intended to be interpreted or limited. Therefore, many modifications and variations will be apparent to those of ordinary skill in the art. The disclosure of the present invention is intended to be illustrative, and not restrictive, and the scope of the invention is defined by the appended claims.

1 1

Claims

杈 利 要 求 profit requirements 1、 一种.基于.反向代理实现网络测试的方法, 其中, 该方法适用于: 通过在位于局域网中的终端设备和位于广域网中的主代理服务器之间建 立反向代理进行网络测试, 该方法包括: 1. A method for implementing network testing based on reverse proxy, wherein the method is suitable for: performing network testing by establishing a reverse proxy between a terminal device located in a local area network and a main proxy server located in a wide area network, the Methods include: 在所述终端设备上启动第一端口, 在所述主代理服务器上启动第二 端口; Start the first port on the terminal device, and start the second port on the main proxy server; 在所述终端设备的第一端口与主代理服务器的第二端口之间建立网 络隧道; Establish a network tunnel between the first port of the terminal device and the second port of the main proxy server; 通过所述主代理服务器的第二端口经由所述网络隧道发送网络测试 请求至所述终端设备的第一端口; Send a network test request to the first port of the terminal device via the network tunnel through the second port of the main proxy server; 所述终端设备根据所述网络测试请求进行相应的网络访问操作, 将 所述网络访问操作的结果反馈至所述主代理服务器。 The terminal device performs corresponding network access operations according to the network test request, and feeds back the results of the network access operations to the main proxy server. 2、 根据权利要求 1所述的方法, 其中, 该方法进一步包括: 所述终端设备接收应用服务器通过所述网络隧道发送的网络测试请 求; 其中, 所述应用服务器将网络测试请求发送到所述主代理服务器上 的所述第二端口; 2. The method according to claim 1, wherein the method further comprises: the terminal device receiving a network test request sent by the application server through the network tunnel; wherein the application server sends the network test request to the said second port on the primary proxy server; 所述终端设备根据所述网络测试请求进行相应的网络访问操作, 将 网络访问操作的结果通过所述网络隧道进行反馈; 其中, 所述应用服务 器从所述主代理服务器上的第二端口中获取所述网络访问操作的结果 The terminal device performs corresponding network access operations according to the network test request, and feeds back the results of the network access operations through the network tunnel; wherein, the application server obtains from the second port on the main proxy server The result of the network access operation 3、 如权利要求 1所述的方法, 其中, 在所述终端设备的第一端口与 主代理服务器的第二端口之间建立网络隧道包括: 3. The method of claim 1, wherein establishing a network tunnel between the first port of the terminal device and the second port of the main proxy server includes: 根据连接参数在所述终端设备的第一端口与主代理服务器的第二端 口之间建立网络隧道; 其中, 所述连接参数包括: 终端设备的登录账户 和密码, 主代理服务器的广域网 IP地址和第二端口的端口号, 启动的所 述终端设备的第一端口的端口号。 A network tunnel is established between the first port of the terminal device and the second port of the main proxy server according to the connection parameters; wherein the connection parameters include: the login account and password of the terminal device, the WAN IP address of the main proxy server and The port number of the second port is the port number of the first port of the activated terminal device. 4、 如权利要求 1至 3中任一项所述的方法, 其中, 该方法进一步包 括: 在终端设备上部署网络隧道建立客户端和反向代理服务端; 4. The method according to any one of claims 1 to 3, wherein the method further includes: deploying a network tunnel establishment client and a reverse proxy server on the terminal device; 由反向代理服务端在终端设备上启动第一端口; 由网络隧道建立客户端在所述终端设备的第一端口与主代理服务器 的第二端口之间建立网络隧道; The reverse proxy server starts the first port on the terminal device; The network tunnel establishment client establishes a network tunnel between the first port of the terminal device and the second port of the main proxy server; 由反向代理服务端接收来自网络隧道的网络测试请求, 根据所述网 络测试请求进行相应的网络访问操作, 将网络访问操作的结果通过所述 网络隧道进行反馈。 The reverse proxy server receives the network test request from the network tunnel, performs corresponding network access operations according to the network test request, and feeds back the results of the network access operations through the network tunnel. 5、 如权利要求 4所述的方法, 其中, 该方法包括: 5. The method of claim 4, wherein the method includes: 所述网络隧道建立客户端为 SSH客户端; The network tunnel establishment client is an SSH client; 所述反向代理服务端为 Squid服务端。 The reverse proxy server is a Squid server. 6、 如权利要求 4所述的方法, 其中, 该方法进一步包括: 6. The method of claim 4, wherein the method further comprises: 在终端设备上部署自动重连客户端, Deploy automatic reconnection client on terminal device, 当所建立的网络隧道断开时, 所述自动重连客户端启动所述网络隧 道建立客户端, 所述网络隧道建立客户端根据所述连接参数重新将所述 第一端口映射到主代理服务器上的所述第二端口上, 重新建立网络隧道。 When the established network tunnel is disconnected, the automatic reconnection client starts the network tunnel establishment client, and the network tunnel establishment client remaps the first port to the main proxy server according to the connection parameters. On the second port, re-establish the network tunnel. 7、 如权利要求 6所述的方法, 其中, 7. The method of claim 6, wherein, 所述自动重连客户端为 AUTOSSI-I客户端。 The automatic reconnection client is the AUTOSSI-I client. 8、 如权利要求 1所述的方法, 其中, 所述网络测试请求包括: 网速 测试请求或网络质量测试请求; 8. The method of claim 1, wherein the network test request includes: a network speed test request or a network quality test request; 当所述网络测试请求为网络质量测试请求时, 所述终端设备根据所 述网络测试请求进行相应的网络访问操作包括: When the network test request is a network quality test request, the terminal device performs corresponding network access operations according to the network test request, including: 终端设备发送测试数据包到目的服务器并接收目的服务器的反馈 包, 根据所述测试数据包的发送时刻与反馈包的接收时刻, 计算终端设 备与所述目的服务器之间的网络时延; 以及根据测试数据包的发送数目 与反馈包的数目计算终端设备与所述目的服务器之间的丟包率; The terminal device sends a test data packet to the destination server and receives a feedback packet from the destination server, and calculates the network delay between the terminal device and the destination server based on the sending time of the test data packet and the receiving time of the feedback packet; and according to The number of test data packets sent and the number of feedback packets are used to calculate the packet loss rate between the terminal device and the destination server; 或者, or, 当所述网络测试请求为网速测试请求时, 所述终端设备根据所述网 络测试请求进行相应的网络访问操作包括: When the network test request is a network speed test request, the terminal device performs corresponding network access operations according to the network test request, including: 终端设备从目的服务器下载指定大小的数据包, 根据所述数据包的 大小和下载完成所需的时间, 计算与目的服务器之间的下载网速。 The terminal device downloads a data packet of a specified size from the destination server, and calculates the download network speed with the destination server based on the size of the data packet and the time required to complete the download. 9、 如权利要求 1 所述的方法, 其中, 所述主代理服务器根据所述 网络访问操作的结果确定所述网络测试结果。 9. The method of claim 1, wherein the main proxy server determines the network test result according to the result of the network access operation. 10、 一种基于反向代理实现网络测试的终端设备, 其中, 该终端设 备位于局域网中, 与位于广域网中的主代理服务器之间建立反向代理, 进行网络测试, 该终端设备包括: 10. A terminal device that implements network testing based on reverse proxy. The terminal device is located in the local area network and establishes a reverse proxy with the main proxy server located in the wide area network to perform network testing. The terminal device includes: 反向代理模块, 适用于在终端设备上启动第一端口; Reverse proxy module, suitable for starting the first port on the terminal device; 网络隧道建立模块, 适用于在所述第一端口与主代理服务器上的第 二端口之间建立网络隧道; A network tunnel establishment module, adapted to establish a network tunnel between the first port and the second port on the main proxy server; 反向代理模块, 适用于接收所述主代理服务器通过所述第二端口经 由所述网络隧道发送至所述第一端口的网络测试访问请求; 根据所述网 络测试请求进行相应的网络访问操作, 将网络访问操作的结果反馈到主 代理服务器。 A reverse proxy module, adapted to receive a network test access request sent by the main proxy server to the first port through the network tunnel through the second port; and perform corresponding network access operations according to the network test request, Feed back the results of network access operations to the main proxy server. 11、 如权利要求 10所述的终端设备, 其中, 11. The terminal device as claimed in claim 10, wherein, 反向代理模块, 进一步适用于接收应用服务器通过所述网络隧道发 送的网络测试请求; 其中, 所述应用服务器将网络测试请求发送到所述 主代理服务器上的所述第二端口; A reverse proxy module, further adapted to receive a network test request sent by an application server through the network tunnel; wherein, the application server sends the network test request to the second port on the main proxy server; 反向代理模块, 适用于才艮据所述网络测试请求进行相应的网络访问 操作, 将网络访问操作的结果通过所述网络隧道进行反馈; 其中, 所述 应用服务器从所述主代理服务器上的所述第二端口中获取所述网络访问 操作的结果。 A reverse proxy module, adapted to perform corresponding network access operations according to the network test request, and feed back the results of the network access operations through the network tunnel; wherein, the application server obtains the information from the main proxy server. The result of the network access operation is obtained from the second port. 12、 如权利要求 10所述的终端设备, 其中, 12. The terminal device as claimed in claim 10, wherein, 网络隧道建立模块, 适用于根据连接参数在所述第一端口与主代理 服务器的第二端口之间建立网络隧道; 其中, 所述连接参数包括: 终端 设备的登录账户和密码, 主代理服务器的广域网 IP地址和第二端口的端 口号, 启动的所述终端设备的第一端口的端口号。 A network tunnel establishment module, adapted to establish a network tunnel between the first port and the second port of the main proxy server according to the connection parameters; wherein the connection parameters include: the login account and password of the terminal device, the main proxy server's The WAN IP address and the port number of the second port, and the port number of the first port of the terminal device that is started. 13 , 如权利要求 11所述的终端设备, 其中, 13. The terminal device as claimed in claim 11, wherein, 所述网络隧道建立.模块为 SSH客户端; 所述反向代理模块为 Squid服务端。 The network tunnel is established. The module is an SSH client; The reverse proxy module is a Squid server. 14、如权利要求 10所述的终端设备, 其中, 该终端设备进一步包括: 自动重连模块, 14. The terminal device according to claim 10, wherein the terminal device further includes: an automatic reconnection module, 自动重连模块, 适用于当所建立的网络隧道断开时, 所述自动重连 模块启动所述网络隧道建立模块, 所述网络隧道建立模块根据所述连接 参数重新将所述第一端口映射到主代理服务器上的所述第二端口上, 重 新建立网络隧道。 The automatic reconnection module is suitable for when the established network tunnel is disconnected, the automatic reconnection module starts the network tunnel establishment module, and the network tunnel establishment module remaps the first port to the network tunnel according to the connection parameters. On the second port on the primary proxy server, re-establish the network tunnel. 15、 如权利要求 13所述的终端设备, 其中, 15. The terminal device as claimed in claim 13, wherein, 自动重连模块为 AUTOS SH客户端。 The automatic reconnection module is the AUTOS SH client. 16、如权利 ~要求 10所述的终端设备, 其中, 所述网络测试请求包括: 网速测试请求或网络质量测试请求; 16. The terminal device according to claim 10, wherein the network test request includes: a network speed test request or a network quality test request; 当所述网络测试请求为网络质量测试请求时, 反向代理模块, 适用 于发送测试数据包到所述目的服务器并等待目的服务器的反馈, 根据所 述测试数据包的发送时刻与测试数据包反馈的接收时刻, 计算与所述目 的服务器之间的网络时延; 以及根据测试数据包的发送数目与测试数据 包的反馈的数目计算与所述目的服务器之间的网络质量; When the network test request is a network quality test request, the reverse proxy module is adapted to send a test data packet to the destination server and wait for feedback from the destination server, based on the sending time of the test data packet and the test data packet feedback at the reception time, calculate the network delay with the destination server; and calculate the network quality with the destination server based on the number of sent test data packets and the number of feedback test data packets; 或者, or, 当所述网络测试请求为网速测试请求时, 反向代理模块, 适用于从 目的服务器下载指定大小的数据包, 根据所述数据包的大小和下载完成 所需的时间, 计算与目的服务器之间的下载网速。 When the network test request is a network speed test request, the reverse proxy module is suitable for downloading a data packet of a specified size from the destination server. According to the size of the data packet and the time required to complete the download, calculate the distance between the data packet and the destination server. download speed. 17、 一种基于反向代理实现网络测试的系统, 其中, 该系统包括: 具有广域网 IP地址的主代理服务器和如权利要求 7所述的终端设备。 17. A system for implementing network testing based on reverse proxy, wherein the system includes: a main proxy server with a WAN IP address and the terminal device as claimed in claim 7. 18、 根据权利要求 17所述的系统, 其中, 18. The system of claim 17, wherein, 所述主代理服务器上部署有网络隧道建立服务端, The main proxy server is deployed with a network tunnel establishment server, 所述主代理服务器, 适用于通过所述网络隧道建立服务端建立与终 端设备之间的网络隧道; 向终端设备发送网络测试请求, 以及接收终端 设备返回的根据所述网络测试请求进行相应的网络访问操作的网络访问 操作的结果。 The main proxy server is adapted to establish a network tunnel between the server and the terminal device through the network tunnel establishment server; send a network test request to the terminal device, and receive the corresponding network test request returned by the terminal device according to the network test request. Network access to access operations The result of the operation. 19、 如权利要求 17所述的系统, 其中, 该系统进一步包括: 应用服 务器; 19. The system of claim 17, wherein the system further includes: an application server; 所述应用服务器, 适用于通过所述网络隧道将网络测试请求发送到 主代理服务器上的所述第二端口; 使得所述终端设备根据所述网络测试 请求进行相应的网络访问操作, 将网络访问操作的结果通过所述网络隧 道进行反馈'; The application server is adapted to send a network test request to the second port on the main proxy server through the network tunnel; causing the terminal device to perform corresponding network access operations according to the network test request, and access the network to The results of the operation are fed back through the network tunnel'; 所述应用服务器, 适用于从所述主代理服务器上的所述第二端口中 获取所述网络访问操作的结果。 The application server is adapted to obtain the result of the network access operation from the second port on the main proxy server. 20、 一种计算.机程序, 包括计算机可读代码, 当所述计算机可读 代码在服务器上运行时,导致所述服务器执行如权利要求 1 9中的任一 所述的方法。 20. A computer program, including computer readable code, which when the computer readable code is run on a server, causes the server to execute the method according to any one of claims 19. 21、 一种计算机可读介质, 其中存储了如权利要求 20所述的计算 机程序。 21. A computer-readable medium in which the computer program according to claim 20 is stored.
PCT/CN2014/083227 2013-12-05 2014-07-29 Method, terminal device, and system for implementing network test based on reverse proxy Ceased WO2015081709A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310655034.X 2013-12-05
CN201310655034.XA CN103634165B (en) 2013-12-05 2013-12-05 Method, terminal device and system for realizing network testing based on reverse proxy

Publications (1)

Publication Number Publication Date
WO2015081709A1 true WO2015081709A1 (en) 2015-06-11

Family

ID=50214817

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/083227 Ceased WO2015081709A1 (en) 2013-12-05 2014-07-29 Method, terminal device, and system for implementing network test based on reverse proxy

Country Status (2)

Country Link
CN (1) CN103634165B (en)
WO (1) WO2015081709A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12167297B2 (en) 2023-04-25 2024-12-10 T-Mobile Usa, Inc. Location clustering and routing for 5G drive testing

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634165B (en) * 2013-12-05 2017-01-18 北京奇安信科技有限公司 Method, terminal device and system for realizing network testing based on reverse proxy
CN104978247B (en) * 2014-04-29 2019-08-23 腾讯科技(深圳)有限公司 A kind of application testing method, apparatus and system
CN104660716A (en) * 2015-03-16 2015-05-27 联想(北京)有限公司 Data processing method, electronic equipment and first server
CN108075934B (en) * 2016-11-15 2021-05-25 腾讯科技(深圳)有限公司 A network quality monitoring method, device and system
CN107040777A (en) * 2017-06-08 2017-08-11 深圳市创维软件有限公司 A kind of remote debugging method, set top box and server
CN108063696A (en) * 2017-12-14 2018-05-22 北京云端智度科技有限公司 A kind of meshed network method for evaluating quality
CN108616389B (en) * 2018-04-10 2021-09-17 深信服科技股份有限公司 Network evaluation method, equipment, storage medium and device based on cloud server
CN108965256A (en) * 2018-06-15 2018-12-07 四川斐讯全智信息技术有限公司 A kind of system and method remotely managing embedded device based on SSH reverse tunnel
CN110740152B (en) * 2018-07-20 2022-11-04 北京奇虎科技有限公司 Test task processing method, device and system
CN110460732B (en) * 2019-09-24 2021-05-14 腾讯科技(深圳)有限公司 Network quality monitoring method and device and communication server
CN113765936A (en) * 2021-09-22 2021-12-07 杭州安恒信息技术股份有限公司 Data transmission method, device, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172575A1 (en) * 2007-01-15 2008-07-17 Microsoft Corporation Simulated internet for testing internet software
CN101345741A (en) * 2007-07-13 2009-01-14 盛大计算机(上海)有限公司 Proxy system and proxy connecting method based on internet
CN102571840A (en) * 2010-12-16 2012-07-11 卓望数码技术(深圳)有限公司 Remote terminal test method, system and proxy server
CN103634165A (en) * 2013-12-05 2014-03-12 北京奇虎科技有限公司 Method, terminal device and system for realizing network testing based on reverse proxy

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4179535B2 (en) * 2002-09-03 2008-11-12 インターナショナル・ビジネス・マシーンズ・コーポレーション Network system, reverse proxy, computer apparatus, data processing method and program
FR2840499B1 (en) * 2002-05-30 2004-12-10 Cit Alcatel METHOD AND DEVICE FOR CONTROLLING ACCESS TO A LOCAL WIRELESS COMMUNICATIONS NETWORK
CN1921438A (en) * 2006-09-15 2007-02-28 深圳市深信服电子科技有限公司 Method for realizing acceleration between networks by using proxy
CN101094104A (en) * 2007-07-30 2007-12-26 中兴通讯股份有限公司 Method and device for carrying out device management through proxy of security network management
CN101340312A (en) * 2008-08-12 2009-01-07 腾讯科技(深圳)有限公司 Network quality monitoring method and system of internet data center
CN102065111B (en) * 2009-11-13 2015-02-25 北京神州绿盟信息安全科技股份有限公司 Reverse proxy method and reverse proxy server
CN103210614B (en) * 2010-11-18 2015-10-07 村田机械株式会社 Relay server and relay communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080172575A1 (en) * 2007-01-15 2008-07-17 Microsoft Corporation Simulated internet for testing internet software
CN101345741A (en) * 2007-07-13 2009-01-14 盛大计算机(上海)有限公司 Proxy system and proxy connecting method based on internet
CN102571840A (en) * 2010-12-16 2012-07-11 卓望数码技术(深圳)有限公司 Remote terminal test method, system and proxy server
CN103634165A (en) * 2013-12-05 2014-03-12 北京奇虎科技有限公司 Method, terminal device and system for realizing network testing based on reverse proxy

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12167297B2 (en) 2023-04-25 2024-12-10 T-Mobile Usa, Inc. Location clustering and routing for 5G drive testing
US12177696B2 (en) 2023-04-25 2024-12-24 T-Mobile Usa, Inc. Location clustering and routing for 5G drive testing
US12363501B2 (en) 2023-04-25 2025-07-15 T-Mobile Usa, Inc. Location clustering and routing for 5G drive testing

Also Published As

Publication number Publication date
CN103634165A (en) 2014-03-12
CN103634165B (en) 2017-01-18

Similar Documents

Publication Publication Date Title
WO2015081709A1 (en) Method, terminal device, and system for implementing network test based on reverse proxy
CN104253866B (en) Software deployment method, system and the relevant device of virtual network function network element
CN103532751B (en) Method and device for managing network access equipment
CN105703938A (en) Equipment configuration method, configuration device and management equipment
CN103595825B (en) Domain name mapping detection method and device, server
CN102468992A (en) PXE function test system and method
CN104394223A (en) Automatic rapid deployment method for large-scale computer cluster system nodes
CN108271054A (en) A kind of firmware upgrade backup method and device
US20060155838A1 (en) Program installation system and method using the same
US20160006828A1 (en) Embedded network proxy system, terminal device and proxy method
CN104580267A (en) A resource downloading method, device, server and corresponding system
CN103618780A (en) Method and device for realizing multiple virtual machine mounted externally-arranged components
CN104077152A (en) Batch upgrading method and batch upgrading device for embedded system
CN103677962B (en) Desktop delivery device based on Intel Virtualization Technology realize system and method
CN105072140A (en) Method and device for deploying virtual platform
CN107566518A (en) The method and apparatus of management equipment information during installation file
CN106776347A (en) A kind of virtualization system mirror image mounting test system and method
WO2016078291A1 (en) Method, apparatus and system for accessing file sharing server
CN112099902A (en) Network adapter configuration method, device, electronic device and storage medium for virtual machine
CN103618767A (en) Virtual machine configuration method and related equipment
CN108255500A (en) A kind of automatic installing method of operating system of the compatibility virtualization architecture based on cobbler
CN103501335A (en) Data transmission method, data transmission equipment and data transmission system
CN103618661A (en) Data separation method and system
CN111984360A (en) A method of using virtual machine to build VMware6.7 OS compatibility test environment
CN115086216B (en) Test method and system for multiple virtual terminals

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14867092

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14867092

Country of ref document: EP

Kind code of ref document: A1