Content of the invention
In view of the above problems it is proposed that the present invention so as to provide one kind overcome the problems referred to above or at least in part solve on
State a kind of method that network test is realized based on reverse proxy of problem.
According to one aspect of the present invention, there is provided a kind of method that network test is realized based on reverse proxy, wherein, should
Method be applied to: by set up and the master proxy server being located in wide area network between positioned at the terminal device LAN anti-
Carry out network test to agency, the method includes:
Described terminal device starts first port, second port is started on described master proxy server;
Set up network tunnel between the first port and the second port of master proxy server of described terminal device;
Send network test by the second port of described master proxy server via described network tunnel to ask to described
The first port of terminal device;
Described terminal device carries out corresponding network access operation according to the request of described network test, by described network access
The result of operation feeds back to described master proxy server.
Alternatively, the method further includes:
Described terminal device is received application server and is asked by the network test that described network tunnel sends;Wherein, institute
State application server and network test request is sent to the described second port on described master proxy server;
Described terminal device carries out corresponding network access operation according to the request of described network test, and network access is operated
Result fed back by described network tunnel;Wherein, described application server is described in from described master proxy server
The result of described network access operation is obtained in second port.
Alternatively, set up network tunnel between the first port and the second port of master proxy server of described terminal device
Road includes:
Set up between the first port and the second port of master proxy server of described terminal device according to Connecting quantity
Network tunnel;Wherein, described Connecting quantity includes: the logon account of terminal device and password, the wide area network of master proxy server
Ip address and the port numbers of second port, the port numbers of the first port of described terminal device of startup.
Alternatively, alternatively, the method further includes: on-premise network tunnel building client and anti-on the terminal device
To agency service end;
First port is started on the terminal device by reverse proxy service end;
Set up the second port of the first port in described terminal device for the client and master proxy server by network tunnel
Between set up network tunnel;
By reverse proxy service end receive from network tunnel network test request, according to described network test ask into
Row corresponding network access operation, the result that network access is operated is fed back by described network tunnel.
Alternatively, the method includes:
It is ssh client that described network tunnel sets up client;
Described reverse proxy service end is squid service end.
Alternatively, the method further includes:
Dispose Auto-reconnect client on the terminal device,
When the network tunnel set up disconnects, network tunnel described in described Auto-reconnect client terminal start-up sets up client
End, described network tunnel is set up client and again described first port is mapped to master proxy server according to described Connecting quantity
On described second port on, re-establish network tunnel.
Alternatively, described Auto-reconnect client is autossh client.
Alternatively, described network test request includes: network speed test request or network quality test request;
When described network test is asked as network quality test request, described terminal device please according to described network test
Ask and carry out corresponding network access operation inclusion:
Terminal device sends test data bag and to destination server and receives the feedback bag of destination server, according to described survey
The delivery time of examination packet and the time of reception of feedback bag, during network between computing terminal equipment and described destination server
Prolong;And sending between number and the number computing terminal equipment and the described destination server that feed back bag according to test data bag
Packet loss;
Or,
When described network test is asked as network speed test request, described terminal device according to described network test ask into
Row corresponding network access operation includes:
Terminal device downloads the packet specifying size, the size according to described packet and having downloaded from destination server
Become the required time, calculate the download speed and destination server between.
Alternatively, described master proxy server determines described network test knot according to the result that described network access operates
Really.
According to one aspect of the present invention, there is provided a kind of terminal device realizing network test based on reverse proxy, its
In, this terminal device is located in LAN, and sets up reverse proxy between the master proxy server in wide area network, carries out net
Network is tested, and this terminal device includes:
Reverse proxy module is it is adaptable to start first port on the terminal device;
Network tunnel sets up module it is adaptable to build between the second port in described first port and master proxy server
Vertical network tunnel;
Reverse proxy module is it is adaptable to receive described master proxy server by described second port via described network tunnel
Road sends to the network test access request of described first port;Corresponding network access is carried out according to the request of described network test
Operation, the result that network access is operated feeds back to master proxy server.
Optionally, reverse proxy module, is further applicable to receive what application server was sent by described network tunnel
Network test is asked;Wherein, described application server by network test request be sent on described master proxy server described in
Second port;
Reverse proxy module is it is adaptable to carry out corresponding network access operation according to the request of described network test, by network
The result accessing operation is fed back by described network tunnel;Wherein, described application server is from described master proxy server
On described second port in obtain the result of described network access operation.
Optionally, network tunnel sets up module it is adaptable to according to Connecting quantity in described first port and master agent service
Network tunnel is set up between the second port of device;Wherein, described Connecting quantity includes: the logon account of terminal device and password,
The wide area network ip address of master proxy server and the port numbers of second port, the end of the first port of described terminal device of startup
Slogan.
Optionally, described network tunnel sets up module is ssh client;
Described reverse proxy module is squid service end.
Optionally, this terminal device further includes: Auto-reconnect module,
Auto-reconnect module is it is adaptable to when the network tunnel set up disconnects, described Auto-reconnect module starts described
Network tunnel sets up module, and described network tunnel is set up module and is again mapped to described first port according to described Connecting quantity
In described second port on master proxy server, re-establish network tunnel.
Optionally, Auto-reconnect module is autossh client.
Optionally, described network test request includes: network speed test request or network quality test request;
When described network test is asked as network quality test request, reverse proxy module is it is adaptable to send test number
According to feedback, the delivery time according to described test data bag and the test of wrapping to described destination server and wait destination server
The time of reception of packet feedback, calculate the network delay and described destination server between;And according to test data bag
The number sending the feedback of number and test data bag calculates the network quality and described destination server between;
Or,
When described network test is asked as network speed test request, reverse proxy module is it is adaptable to from destination server
Carry the packet specifying size, the size according to described packet and the time downloaded needed for completing, calculate and destination server
Between download speed.
According to one aspect of the present invention, there is provided a kind of system realizing network test based on reverse proxy, wherein, should
System includes: has the terminal device described in the master proxy server of wide area network ip address and above-mentioned middle any one.
Optionally, described master proxy server is deployed with network tunnel and sets up service end,
Described master proxy server is set up and terminal device between it is adaptable to set up service end by described network tunnel
Network tunnel;To terminal device send network test request, and receiving terminal apparatus return according to described network test please
Seek the result of the network access operation carrying out corresponding network access operation.
Optionally, this system further includes: application server;
Described application server is it is adaptable to be sent to master proxy server by described network tunnel by network test request
On described second port;Described terminal device is made to carry out corresponding network access operation according to the request of described network test,
The result that network access is operated is fed back by described network tunnel;
Described application server is it is adaptable to obtain described network from the described second port described master proxy server
Access the result of operation.
The technical scheme of the offer according to the present invention, by installing network tunnel in the terminal device disposed in a local network
Set up client and reverse proxy service end, deployment network tunnel sets up server on master proxy server.Joined by connecting
First port on terminal device is mapped in the second port on master proxy server number, sets up master proxy server and end
Network tunnel between end equipment.Master proxy server can send network test by this network tunnel and ask corresponding end
End equipment, and the Reverse Proxy obtaining in this terminal device carries out corresponding network access according to network test request
The operating result being fed back after operation.Solve and carry out network test in deployment network test environment in all parts of the country, need
The problem of the high cost needed for deployment idc machine room throughout the country.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the specific embodiment of the present invention.
Specific embodiment
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing
Exemplary embodiment it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to be able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
Fig. 1 shows a kind of stream of method realizing network test based on reverse proxy according to an embodiment of the invention
Cheng Tu;This method be applied to: by positioned at the terminal device LAN and be located at wide area network in master proxy server it
Between set up reverse proxy and carry out network test, referring to Fig. 1, the method comprises the steps.
Step s101, starts first port on the terminal device, starts second port on master proxy server.
Step s102, sets up network tunnel between the first port and the second port of master proxy server of terminal device
Road.
Step s103, sends network test by the second port of master proxy server via network tunnel and asks to described
The first port of terminal device.
Step s104 terminal device carries out corresponding network access operation according to network test request, by described network access
The result of operation feeds back to described master proxy server.
In the technical scheme shown in Fig. 1 that the present invention provides, by installing net in the terminal device disposed in a local network
Network tunnel building client and reverse proxy service end, on master proxy server, deployment network tunnel sets up server.Pass through
First port on terminal device is mapped in the second port on master proxy server Connecting quantity, sets up master agent service
Network tunnel between device and terminal device.It is right that master proxy server can be asked by this network tunnel transmission network test
The terminal device answered, and the Reverse Proxy obtaining in this terminal device carries out corresponding net according to network test request
Network accesses the operating result being fed back after operation.Solve and carry out network survey in deployment network test environment in all parts of the country
Examination, needs to dispose the problem of the high cost needed for idc machine room throughout the country.
Fig. 2 shows a kind of the detailed of method realizing network test based on reverse proxy according to an embodiment of the invention
Thin flow chart;The method sets up the network tunnel between terminal device and master proxy server based on reverse proxy, and real with this
Existing network test.Wherein, the terminal device being in LAN by the visible foundation of reverse proxy and the master being in wide area network
Network tunnel between proxy server, and then set up the communication between terminal device and master proxy server.
Shown in Figure 2, the method comprises the steps.
Step s201, starts the network tunnel being arranged on master proxy server and sets up service end, in master proxy server
Upper startup second port.
In an embodiment of the present invention, network tunnel is installed on master proxy server and set up service end, be easy to
After startup network tunnel sets up service end, it is possible to achieve allow arbitrarily source to connect this second port.It is easy to set with terminal
Standby set up network tunnel.
In a kind of specific embodiment of the present invention, the network tunnel being arranged on master proxy server is set up service end and is
Ssh service end.
Step s202, starts the reverse proxy service end installed on the terminal device, starts and installs on the terminal device
Network tunnel sets up client, starts first port on the terminal device.
In an embodiment of the present invention, start described install reverse proxy service end on the terminal device it
Afterwards, the first port on this reverse proxy service end meeting this terminal device of automatic.
In an embodiment of the present invention, the reverse proxy service end installed on the terminal device is squid service end.
Step s203, sets up network tunnel between the first port and the second port of master proxy server of terminal device
Road.
In an embodiment of the present invention, start install network tunnel on the terminal device set up client it
Afterwards, network tunnel is set up client and is set up server and set up with the network tunnel being arranged on master proxy server and is connected, that is, lead to
Cross network tunnel and set up client and network tunnel and set up service end and the first port on terminal device is mapped to master agent clothes
In second port on business device, and then set up the net between the first port of terminal device and the second port of master proxy server
Network tunnel.
In an embodiment of the present invention, deployment network tunnel on the terminal device sets up client is ssh client
End.During network tunnel is set up, with specific reference to Connecting quantity terminal device first port and master proxy server
Network tunnel is set up between second port;Wherein, Connecting quantity includes: the logon account of terminal device and password, and master agent takes
The business wide area network ip address of device and the port numbers of second port, the port numbers of the first port of described terminal device of startup.
Step s204, sends network test by the second port of master proxy server via network tunnel and asks to terminal
The first port of equipment.
Step s205, terminal device carries out corresponding network access operation according to network test request, and described network is visited
Ask that the result of operation feeds back to described master proxy server.
In step s204 and step s205, in an embodiment of the present invention, by the reverse proxy in terminal device
Service end receives the network test request from network tunnel, and is carried out according to network test request by reverse proxy service end
Corresponding network access operation, the result that network access is operated is fed back by network tunnel.During feedback, will
The result of network access operation feeds back in the first port of terminal device so that master proxy server can be from second port
Obtain this network access operating result.
Step s206, the network tunnel that application server passes through on master proxy server sends network test to terminal device
Request.
In the specific implementation process of the present invention, master proxy server will not be only had to send network test request, be deployed in
Around master proxy server, the application server being logically connected with master proxy server also can send network test please
Ask so that terminal device carries out corresponding network access operation.
In an embodiment of the present invention, terminal device is received application server and is surveyed by the network that network tunnel sends
Examination request;Wherein, network test request is sent to the second port on master proxy server by application server;Terminal device from
Second port on master proxy server obtains described network test request.
Step s207, terminal device carries out corresponding network access operation according to network test request, and described network is visited
Ask that the result of operation feeds back to described master proxy server.
In an embodiment of the present invention, terminal device carries out corresponding network access according to the request of described network test
Operation, the result that network access is operated is fed back by described network tunnel;Wherein, described application server is from described master
The result of described network access operation is obtained in described second port on proxy server.
In a kind of preferred embodiment of the present invention, in order to solve the problems, such as break down lead to network tunnel disconnect,
And after network tunnel disconnects, can automatically be reconnected, it is to avoid user is connected caused efficiency again manually
Low problem.The method further includes: disposes Auto-reconnect client on the terminal device.Wherein, when the net set up
When network tunnel disconnects, Auto-reconnect client terminal start-up network tunnel sets up client, and network tunnel sets up client according to described
Connecting quantity again described first port is mapped in the described second port on master proxy server, re-establishes network tunnel
Road.
In a kind of specific embodiment of the present invention, described Auto-reconnect client is autossh client.Preferably,
Locally preserve logon script in terminal device, logon script preserves Connecting quantity.When terminal device and master proxy server
Between network tunnel disconnect after, Auto-reconnect client restarts, and reads and connect from the local logon script preserving
Parameter, sets up network tunnel according to Connecting quantity with the second port on master proxy server.
In an embodiment of the present invention, network test request includes: network speed test request or network quality test please
Ask.Wherein, network speed test request can be: the network speed of download between test and destination server, network quality test section
Request can be: the network delay between test and destination server and packet loss.In other embodiments of the invention, net
Network speed test request and network quality test request can be included in network test request simultaneously.
When described network test is asked as network quality test request, terminal device carries out phase according to network test request
The network access operation answered to destination server and receives the anti-of destination server particularly as follows: terminal device sends test data bag
Feedback bag, the time of reception that the delivery time according to test data bag is wrapped with feedback, between computing terminal equipment and destination server
Network delay;And sending number and feeding back the number computing terminal equipment wrapping and destination server according to test data bag
Between packet loss;
When described network test is asked as network speed test request, terminal device carries out corresponding according to network test request
Network access operation is particularly as follows: terminal device downloads, from destination server, the packet specifying size, according to the size of packet
Complete the required time with downloading, calculate the download speed and destination server between.
In an embodiment of the present invention, master proxy server determines described network according to the result that network access operates
Test result.It is exemplified as, excellent: packet loss=0 and postponing less than 10ms.Normal: packet loss be less than 2% or time delay <
100ms.Abnormal: more than 2% or time delay is more than 100ms to packet loss.Interrupt: packet loss is 100%.
Fig. 3 shows a kind of network topology realizing network test based on reverse proxy according to an embodiment of the invention
Figure;Shown in Figure 3, Fig. 3 is only a kind of scheme that technical scheme is implemented.
The program is mainly for solving the expansion of the network egress resource in the case of network egress scarcity of resources in idc machine room
Fill, lay network test environment in all parts of the country so that low cost is quick, alleviation company needs to open up caused by new room in various places
This cost of height burden.
When not using technical scheme, in order to realize the test to certain web page server, in order to reach the whole nation
The network test environment of various places, needs to open up idc machine room throughout the country.For example, shown in Fig. 3, visited using Xi'an server 1
When asking certain web page server, this web page server judges that this access connects the idc link from Xi'an.
After using technical scheme, by running ssh service end on master proxy server, set in terminal
Standby upper operation ssh client and squid service end.And start first port on terminal device, master proxy server opens
Dynamic second port, the first port on terminal device is mapped in the second port on master proxy server.For example, Beijing
First port 80 is mapped in the second port 200 on master proxy server terminal device 1 in LAN, sets up terminal and sets
Standby network tunnel between 1 and master proxy server.First port 80 is mapped to master by the terminal device 2 in the LAN of Shanghai
In second port 300 on proxy server, set up the network tunnel between terminal device 2 and master proxy server.Wherein, often
Individual terminal device corresponds to any one port in master agent service, and the not phase of the port numbers corresponding to each terminal device
With.
When 200 ports that Xi'an server 1 passes through on master proxy server access web page server, this web page server
Judge that this access connects and be derived from Beijing idc link.Likewise, taking when accessing webpage by 300 ports on master proxy server
During business device, this web page server judges that this access connects and is derived from Shanghai idc link.And after carrying out network access operation
Result is also equal to the network access operating result with this area.
Wherein, Xi'an server 1 is equivalent to the application server in the present invention.
It is achieved that only needing to a master proxy server and several terminal devices, can be achieved with everybody net of the whole nation
Network test environment.Not only reduce and open up the time cost of machine room, also reduce human resources server laying cost.
In an embodiment of the present invention, terminal device can be small-sized arm equipment (plug computer), mobile phone, put down
The intelligent terminals such as plate computer or pc machine etc..Deployment Linux system and ssh client and reversely on the terminal device
Agency service end.
The invention also discloses a kind of terminal device realizing network test based on reverse proxy, wherein, this terminal device
In LAN, and set up reverse proxy between the master proxy server in wide area network, carry out network test.Fig. 4 shows
Go out a kind of structural representation of terminal device realizing network test based on reverse proxy according to an embodiment of the invention.
Shown in Figure 4, this terminal device 400 includes:
Reverse proxy module 401 is it is adaptable to start first port on terminal device 400;
Network tunnel set up module 402 it is adaptable to second port on described first port and master proxy server it
Between set up network tunnel;
Reverse proxy module 401 is it is adaptable to receive described master proxy server by described second port via described net
Network tunnel sends to the network test access request of described first port;Corresponding network is carried out according to the request of described network test
Access operation, the result that network access is operated feeds back to master proxy server.
In an embodiment of the present invention, reverse proxy module 401, is further applicable to reception application server and passes through
The network test request that described network tunnel sends;Wherein, network test request is sent to described master by described application server
Described second port on proxy server.
Reverse proxy module 401 is it is adaptable to carry out corresponding network access operation according to the request of described network test, by net
The result that network accesses operation is fed back by described network tunnel;Wherein, described application server is from described master agent service
The result of described network access operation is obtained in described second port on device.
In an embodiment of the present invention, network tunnel sets up module 402 it is adaptable to according to Connecting quantity described
Network tunnel is set up between Single port and the second port of master proxy server;Wherein, described Connecting quantity includes: terminal device
Logon account and password, the wide area network ip address of master proxy server and the port numbers of second port, the described terminal of startup
The port numbers of the first port of equipment.
In an embodiment of the present invention, described network tunnel sets up module 402 is ssh client;Described reverse generation
Reason module 401 is squid service end.
Fig. 5 shows a kind of terminal device realizing network test based on reverse proxy according to an embodiment of the invention
Detailed construction schematic diagram.Shown in Figure 5, in addition to the module shown in Fig. 4, this terminal device enters one to this terminal device
Step includes: Auto-reconnect module 403.
Auto-reconnect module 403 is it is adaptable to when the network tunnel set up disconnects, Auto-reconnect module 403 starts net
Network tunnel building module 402, network tunnel is set up module 402 and again first port is mapped to master agent clothes according to Connecting quantity
In second port on business device, re-establish network tunnel.
In an embodiment of the present invention, Auto-reconnect module is autossh client.
Network test request includes: network speed test request or network quality test request.
In an embodiment of the present invention, when described network test is asked as network quality test request,
Reverse proxy module 401 to described destination server and waits destination server it is adaptable to send test data bag
Feedback, the time of reception of the delivery time according to described test data bag and test data bag feedback, calculate and described purpose
Network delay between server;And calculated with the number of the feedback of test data bag according to the number that sends of test data bag
Network quality and described destination server between.
In an embodiment of the present invention, when described network test is asked as network speed test request,
Reverse proxy module 401 is it is adaptable to download, from destination server, the packet specifying size, according to described packet
Size and download and complete the required time, calculate the download speed and destination server between.
The invention also discloses a kind of system realizing network test based on reverse proxy, this system includes: has wide area
The net master proxy server of ip address and the terminal device as shown in Fig. 4 or Fig. 5.
Fig. 6 shows a kind of knot of system realizing network test based on reverse proxy according to an embodiment of the invention
Structure schematic diagram.Shown in Figure 6, this system includes:
It is deployed with network tunnel on master proxy server 601 and set up service end,
Master proxy server 601 sets up the net and terminal device 602 between it is adaptable to set up service end by network tunnel
Network tunnel;To terminal device 602 send network test request, and receiving terminal apparatus 602 return according to network test please
Seek the result of the network access operation carrying out corresponding network access operation.
Fig. 7 shows a kind of the detailed of system realizing network test based on reverse proxy according to an embodiment of the invention
Fine texture schematic diagram.Referring to described in Fig. 7, this system further includes: application server 603.
Application server 603 is it is adaptable to network test request is sent on master proxy server 601 by network tunnel
State second port;Terminal device 602 is made to carry out corresponding network access operation according to network test request, by network access
The result of operation is fed back by network tunnel;
Described application server 603 is it is adaptable to obtain described net from the described second port master proxy server 601
Network accesses the result of operation.
In sum, the technical scheme that the present invention provides, pacifies by the terminal device of deployment in the LAN of various places
Dress network tunnel sets up client and reverse proxy service end, and on master proxy server, deployment network tunnel sets up server.
First port on terminal device can be mapped to master agent service by Connecting quantity in the case of start by terminal device
In second port on device, set up the network tunnel between master proxy server and terminal device.Master proxy server or phase
The application server answered can send network test according to this network tunnel and ask corresponding terminal device, and obtains this end
Reverse Proxy in end equipment carries out corresponding network and accesses the operating result being fed back after operation.Master agent is taken
Business device or application server can determine the structure of network test according to the result of the network access operation fed back.Additionally,
Terminal device according to present invention offer, just can be with master it is only necessary to be connected to this terminal device in the LAN of test zone
Network tunnel set up by proxy server, and then master proxy server or application server are made by this network tunnel
Obtain the results verification network test results that feedback network after this terminal device carries out corresponding network access operation accesses operation.
As can be seen here, the technical scheme that the present invention provides solves in prior art in the situation disposing nationwide network test environment
Under, need to dispose the problem of the high cost needed for idc machine room.And ensure the accurate beneficial effect of result of network test.
It should be understood that
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with based on teaching in this.As described above, construct required by this kind of system
Structure be obvious.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use various
Programming language realizes the content of invention described herein, and the description above language-specific done is to disclose this
Bright preferred forms.
In specification mentioned herein, illustrate a large amount of details.It is to be appreciated, however, that the enforcement of the present invention
Example can be put into practice in the case of not having these details.In some instances, known method, structure are not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly it will be appreciated that in order to simplify the disclosure and help understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect an intention that i.e. required guarantor
The application claims of shield more features than the feature being expressly recited in each claim.More precisely, it is such as following
Claims reflected as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
The claims following specific embodiment are thus expressly incorporated in this specific embodiment, wherein each claim itself
All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that and the module in the equipment in embodiment can be carried out adaptively
Change and they are arranged in one or more equipment different from this embodiment.Can be the module in embodiment or list
Unit or assembly be combined into a module or unit or assembly, and can be divided in addition multiple submodule or subelement or
Sub-component.In addition to such feature and/or at least some of process or unit exclude each other, can adopt any
Combination is to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed
Where method or all processes of equipment or unit are combined.Unless expressly stated otherwise, this specification (includes adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can carry out generation by the alternative features providing identical, equivalent or similar purpose
Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiment means to be in the present invention's
Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint
One of meaning can in any combination mode using.
The all parts embodiment of the present invention can be realized with hardware, or to run on one or more processor
Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor (dsp) are realizing according to embodiments of the present invention realizing network based on reverse proxy and surveying
The some or all functions of some or all parts in the terminal device and system of examination.The present invention is also implemented as using
In some or all equipment executing method as described herein or program of device (for example, computer program and meter
Calculation machine program product).Such program realizing the present invention can store on a computer-readable medium, or can have one
The form of individual or multiple signal.Such signal can be downloaded from internet website and obtain, or above carries in carrier signal
For, or provided with any other form.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can come real by means of the hardware including some different elements and by means of properly programmed computer
Existing.If in the unit claim listing equipment for drying, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
Disclosed herein is a1, a kind of method realizing network test based on reverse proxy, wherein, the method is applied to: logical
Cross and setting up reverse proxy and carry out net and the master proxy server being located in wide area network between positioned at the terminal device in LAN
Network is tested, and the method includes: starts first port on described terminal device, starts the second end on described master proxy server
Mouthful;Set up network tunnel between the first port and the second port of master proxy server of described terminal device;By described
The second port of master proxy server sends network test via described network tunnel and asks to the first end of described terminal device
Mouthful;Described terminal device carries out corresponding network access operation according to the request of described network test, and described network access is operated
Result feed back to described master proxy server.A2, the method according to claim a1, wherein, the method is wrapped further
Include: described terminal device is received application server and asked by the network test that described network tunnel sends;Wherein, described application
Network test request is sent to the described second port on described master proxy server by server;Described terminal device is according to institute
State network test request and carry out corresponding network access operation, the result that network access is operated is carried out by described network tunnel
Feedback;Wherein, described application server obtains described network access from the described second port described master proxy server
The result of operation.A3, the method as described in claim a1, wherein, take in first port and the master agent of described terminal device
Set up network tunnel and include between the second port of business device: according to Connecting quantity in the first port of described terminal device and main generation
Network tunnel is set up between the second port of reason server;Wherein, described Connecting quantity includes: the logon account of terminal device and
Password, the wide area network ip address of master proxy server and the port numbers of second port, the first end of the described terminal device of startup
The port numbers of mouth.A4, the method as any one of claim a1 to a3, wherein, the method further includes: in terminal
Its upper side administration network tunnel sets up client and reverse proxy service end;Started on the terminal device by reverse proxy service end
First port;Set up the second port of the first port in described terminal device for the client and master proxy server by network tunnel
Between set up network tunnel;Network test request from network tunnel is received by reverse proxy service end, according to described network
Test request carries out corresponding network access operation, and the result that network access is operated is fed back by described network tunnel.
A5, the method as described in claim a4, wherein, the method includes: it is ssh client that described network tunnel sets up client;
Described reverse proxy service end is squid service end.A6, method as claimed in claim 4, wherein, the method is wrapped further
Include: dispose Auto-reconnect client on the terminal device, when the network tunnel set up disconnects, described Auto-reconnect client
Start described network tunnel and set up client, described network tunnel sets up client according to described Connecting quantity again by described
Single port is mapped in the described second port on master proxy server, re-establishes network tunnel.A7, as claim a6 institute
The method stated, wherein, described Auto-reconnect client is autossh client.A8, the method for claim 1, its
In, described network test request includes: network speed test request or network quality test request;When described network test is asked as net
During network quality test request, described terminal device carries out corresponding network access operation according to the request of described network test and includes:
Terminal device sends test data bag and to destination server and receives the feedback bag of destination server, according to described test data bag
Delivery time with feedback bag the time of reception, the network delay between computing terminal equipment and described destination server;And
Sending number and feeding back the packet loss between the number computing terminal equipment of bag and described destination server according to test data bag
Rate;Or, when described network test is asked as network speed test request, described terminal device according to described network test ask into
Row corresponding network access operation includes: terminal device downloads, from destination server, the packet specifying size, according to described number
Size and download according to bag complete the required time, calculate the download speed and destination server between.A9, such as claim a1
Described method, wherein, described master proxy server determines described network test knot according to the result that described network access operates
Really.B10, a kind of terminal device realizing network test based on reverse proxy, wherein, this terminal device is located in LAN, with
Set up reverse proxy between the master proxy server in wide area network, carry out network test, this terminal device includes: reversely generation
Reason module is it is adaptable to start first port on the terminal device;Network tunnel set up module it is adaptable to described first port with
Network tunnel is set up between second port on master proxy server;Reverse proxy module is it is adaptable to receive described master agent clothes
Business device is sent via described network tunnel by described second port to the network test access request of described first port;According to
Described network test request carries out corresponding network access operation, and the result that network access is operated feeds back to master agent service
Device.B11, the terminal device as described in claim b10, wherein, reverse proxy module, it is further applicable to receive application service
Device is asked by the network test that described network tunnel sends;Wherein, network test request is sent to by described application server
Described second port on described master proxy server;Reverse proxy module is it is adaptable to carry out according to the request of described network test
Corresponding network access operation, the result that network access is operated is fed back by described network tunnel;Wherein, described application
Server obtains the result of described network access operation from the described second port described master proxy server.B12, such as weigh
Profit requires the terminal device described in b10, and wherein, network tunnel sets up module it is adaptable to according to Connecting quantity in described first end
Network tunnel is set up between mouth and the second port of master proxy server;Wherein, described Connecting quantity includes: the stepping on of terminal device
Record account and password, the wide area network ip address of master proxy server and the port numbers of second port, the described terminal device of startup
First port port numbers.B13, the terminal device as described in claim b11, wherein, described network tunnel sets up module
For ssh client;Described reverse proxy module is squid service end.B14, the terminal device as described in claim b10, its
In, this terminal device further includes: Auto-reconnect module;Auto-reconnect module is broken it is adaptable to work as set up network tunnel
When opening, described Auto-reconnect module starts described network tunnel and sets up module, and described network tunnel sets up module according to described company
Connect parameter again described first port to be mapped in the described second port on master proxy server, re-establish network tunnel
Road.B15, the terminal device as described in claim b13, wherein, Auto-reconnect module is autossh client.B16, such as weigh
Profit requires the terminal device described in b10, and wherein, described network test request includes: network speed test request or network quality test
Request;When described network test is asked as network quality test request, reverse proxy module is it is adaptable to send test data bag
To described destination server and wait feedback, the delivery time according to described test data bag and the test data of destination server
The time of reception of bag feedback, calculate the network delay and described destination server between;And the transmission according to test data bag
The number of the feedback of number and test data bag calculates the network quality and described destination server between;Or, when described net
When network test request is network speed test request, reverse proxy module it is adaptable to download the data specifying size from destination server
Bag, the size according to described packet and the time downloaded needed for completing, calculate the download speed and destination server between.
C17, a kind of system realizing network test based on reverse proxy, wherein, this system includes: has the main generation of wide area network ip address
Reason server and the terminal device as described in any one in claim b10~b14.C18, according to claim c17
System, wherein, described master proxy server is deployed with network tunnel and sets up service end, described master proxy server, be suitable for
Set up the network tunnel and terminal device between in setting up service end by described network tunnel;Send network to terminal device to survey
Examination request, and the network carrying out corresponding network access operation according to the request of described network test that receiving terminal apparatus return
Access the result of operation.C19, the system as described in claim c17, wherein, this system further includes: application server;
Described application server it is adaptable to by described network tunnel by network test request be sent on master proxy server described in
Second port;Make described terminal device carry out corresponding network access operation according to the request of described network test, network is visited
Ask that the result of operation is fed back by described network tunnel;Described application server is it is adaptable to from described master proxy server
On described second port in obtain the result of described network access operation.