CN105376107A - Terminal test method and proxy server - Google Patents

Terminal test method and proxy server Download PDF

Info

Publication number
CN105376107A
CN105376107A CN201410438024.5A CN201410438024A CN105376107A CN 105376107 A CN105376107 A CN 105376107A CN 201410438024 A CN201410438024 A CN 201410438024A CN 105376107 A CN105376107 A CN 105376107A
Authority
CN
China
Prior art keywords
address
proxy server
port
mark
application 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.)
Granted
Application number
CN201410438024.5A
Other languages
Chinese (zh)
Other versions
CN105376107B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410438024.5A priority Critical patent/CN105376107B/en
Publication of CN105376107A publication Critical patent/CN105376107A/en
Application granted granted Critical
Publication of CN105376107B publication Critical patent/CN105376107B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a terminal test method and a proxy server. The method includes: the proxy server receives a request message used for having access to an application server and sent by a terminal, the request information comprises a first mark and a second mark, the first mark is used for indicating an IP address and a first port of the application server, the second mark is used for indicating a second port of the proxy server, the proxy server obtains the first mark and the second mark from the request message, and the proxy server sends request data of the request message to the first port of the application server whose address is the IP address via the second port indicated by the second mark. According to the method, the technical problem of high test complexity caused by the mapping relation between a domain name and the IP address configured corresponding to each network environment of the terminal is solved.

Description

Terminal test method and proxy server
Technical field
The present invention relates to Application testing field, in particular to a kind of terminal test method and proxy server.
Background technology
End application, before use of reaching the standard grade, needs to carry out testing to ensure end application in use safe and stable operation.End application is reached the standard grade from developing to, need the different network environment of experience to carry out Application testing, such as, need development environment to test in the development phase, test phase needs test environment to test, and the experience stage needs to experience environment and tests etc.
In order to ensure that end application can stable operation in each network environment, test when end application is in above-mentioned each network environment, this just needs the switching carrying out network environment.When prior art carries out network environment test, usually in the following ways:
S1: by computer access network, and open the proxy server of the software on computer, the agent side slogan of an acquiescence is set;
S2: the terminal being provided with application program is also linked in the network at computer place, and agent IP address and agent side slogan are set on the terminal, the IP address of agent IP address and computer, port numbers is the agent side slogan of the acquiescence of computer;
S3: after computer and terminal being configured, the access of terminal can, by the proxy port of computer, by configuring and revise the rule of the request forwarding terminal on computers, make terminal can access multiple network environment.
But, owing to needing to access same network as the computer of agency and the terminal of carrying out testing, when building network, for cannot the computer of connecting wireless network, needing to purchase wireless network card, adding the cost of testing equipment.
In addition, known by above-mentioned layoutprocedure, when testing for a certain network environment, need for Host file corresponding to this network environment of terminal configuration, wherein, this Host file comprises: the mapping relations between domain name and IP address, and this Host file cannot be changed after being configured.Like this, when testing different network environments, needing for each network environment configures the mapping relations between corresponding domain name and IP address respectively in terminal, thus adding the complexity of configuration.
For above-mentioned in terminal for each network environment configures the higher problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause, at present effective solution is not yet proposed.
Summary of the invention
Embodiments provide a kind of terminal test method and proxy server, at least to solve in terminal as each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause.
According to an aspect of the embodiment of the present invention, provide a kind of terminal test method.This terminal test method comprises: the request message for access application server that proxy server receiving terminal sends, wherein, described request message comprises: the first mark and the second mark, described first mark is used to indicate IP address and first port of described application server, and described second mark is used to indicate the second port of described proxy server; Described proxy server obtains described first mark and described second mark from described request message; And the request msg in described request message to be sent to described first port on the described application server that address is described IP address by described second port indicated by described second mark by described proxy server.
According to the another aspect of the embodiment of the present invention, additionally provide a kind of proxy server.This proxy server comprises: receiving element, for the request message for access application server that receiving terminal sends, wherein, described request message comprises: the first mark and the second mark, described first mark is used to indicate IP address and first port of described application server, and institute described second identifies the second port being used to indicate described proxy server; First acquiring unit, for obtaining described first mark and described second mark from described request message; And transmitting element, for by described second port indicated by described second mark the request msg in described request message being sent to described first port on the described application server that address is described IP address.
In embodiments of the present invention, sent the mark being used to indicate the port of proxy server to proxy server by terminal, the request msg be used in the solicited message of access application server that terminal sends by the port that proxy server can be arranged according to terminal sends to application server.Like this, on the proxy server that terminal can be arranged by it, different ports visits the application server under different network environments, thus solve for each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause in terminal, and then reach the technique effect reducing testing complex degree.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of the hardware environment according to the embodiment of the present invention;
Fig. 2 is the flow chart of the terminal test method according to the embodiment of the present invention;
Fig. 3 is the flow chart of terminal test method according to the preferred embodiment of the invention;
Fig. 4 is the schematic diagram of the terminal interface according to the embodiment of the present invention;
Fig. 5 is the schematic diagram of the proxy server according to the embodiment of the present invention; And
Fig. 6 is the schematic diagram of the proxy server according to the embodiment of the present invention.
Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Term is introduced:
Proxy server, proxy server (ProxyServer) can provide the function of the transfer to the network information, does not mainly send request the request of person to server, obtains the response contents of server, and response contents is beamed back requestor.
Terminal: mainly refer to the equipment such as smart mobile phone, flat board, notebook in the embodiment of the present invention.
Wifi: wireless network (Wi-Fi), being used for support terminal surfs the Net with radio connection.
Port: the outlet of port (Port) namely server and PERCOM peripheral communication.
Domain name: the title of a certain the computer on internet that domain name (DomainName) is made up of the name of a string separation or calculating unit, for the electronic bearing of the mark computer when transfer of data, can be mapped to one or more IP addresses etc.The object of a domain name is the address being convenient to remember and link up one group of server.
Network environment: interconnected on the multiple computer physics being distributed in different location, communicate mutually according to certain agreement, realize the system that software and hardware and network thereof are shared, network environment in the embodiment of the present invention can refer to LAN environment or wan environment, and can also comprise one or more in test environment, development environment, experience environment and formal environments in LAN environment or wan environment.
Embodiment 1
According to the embodiment of the present invention, provide a kind of embodiment of the method that can be performed by the application's device embodiment, it should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing, and, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
According to the embodiment of the present invention, provide a kind of terminal test method.Alternatively, in the present embodiment, above-mentioned terminal test method can be applied in the hardware environment of terminal 101, proxy server 102, first application server 103 and the second application server 104 formation as shown in Figure 1.As shown in Figure 1, terminal 101 is connected with proxy server 102 by network, proxy server 102 is connected with the second application server 104 respectively at the first application server 103 by network, and namely terminal 101 is sent by the data of proxy server 102 and is connected with the first application server 103 or the second application server 104.Above-mentioned network includes but not limited to: local area network (LAN) or multiple local area network (LAN), and terminal 101 can be but be not limited to mobile phone, PC, notebook or panel computer.
Fig. 2 is the flow chart of a kind of terminal test method according to the embodiment of the present invention.As shown in the figure, this terminal test method comprises the steps that S202 is to step S206:
Step S202, the request message for access application server 103 that proxy server 102 receiving terminal 101 sends, wherein, request message comprises: the first mark and the second mark, first mark is used to indicate IP address and first port of application server, and the second mark is used to indicate the second port of proxy server.
Step S204, proxy server 102 obtains the first mark and the second mark from request message.
Step S206, the request msg in request message to be sent to the first port on the application server that address is IP address by the second port indicated by the second mark by proxy server 102.
Application program in terminal is in different network environments in the different stages, in order to application program on different phase test terminal, needs to allow terminal be in corresponding network environment and tests.Such as, in the Develop Application System stage, need to allow terminal be in development environment; In the experience stage of application program, need to allow terminal be in experience environment.Network environment can be local area network (LAN) or wide area network, in the Develop Application System stage owing to needing the correctness of the development sequence of test application, develops the dependence test of process in the network environment that terminal may be needed to be in local area network (LAN); In the experience stage of application program, in the network environment just needing terminal to be in wide area network, use this application program with analog subscriber, to find that application program problem is in use carried out application programs and is optimized.
In order to meet the requirement of terminal access different network environments, the solicited message of the access application server sent by proxy server receiving terminal.In this request, carry the first mark of the position of instruction application server, also carry the second mark of the port of instruction proxy server.
Proxy server can be known the address of the application server of the request access of this terminal according to the first mark, and knows that proxy server sends the port of this solicited message according to the second mark.
Proxy server can configure multiple port, each port corresponds to different network environments, as shown in Figure 1, proxy server 102 is connected with the first application server 103, meanwhile, proxy server 102 is also connected with the second application server 104, and the first application server 103 can be made up of one or more server, alternatively, the multiple servers in the first application server 103 can be arranged in same local area network (LAN); Second application server 104 also can be made up of one or more server, and the one or more servers in the second application server 104 can be arranged in same wide area network.Proxy server 102 can be connected with the first application server 103 by a port, so all can be sent on the first application server 103 by proxy server 102 by the solicited message of this port, proxy server 102 can be connected with the second application server 104 by another one port, so all can be sent on the second application server 104 by proxy server 102 by the solicited message of this port.
The domain name of application server 103 is designated to describe the scheme in the present embodiment below for first, it should be noted that, the first mark in the present embodiment is not limited only to the domain name of application server 103, can also be but be not limited to the IP address of application server 103.
In the present embodiment, the second the second port being designated proxy server 102, the terminal test method below with reference to table 1 pair the present embodiment is described.
The mapping relations that table 1 proxy server configures
First mark can be the domain name of application server, imgcache.qq.com as shown in table 1, and the first mark can also be the initial ip address of application server.The present embodiment is designated imgcache.qq.com for first and is described.
Second mark is the port numbers of proxy server, and the port numbers of proxy server as shown in table 1 can be 8888, or 6660.
As shown in table 1, the network environment residing for application server 103 can be test environment or development environment, and when application server 103 is in test environment, the IP address of proxy server is 113.108.17.145, and port numbers is 8888; When application server 103 is in development environment, proxy IP address is 113.108.17.145, and port numbers is 6660.The present embodiment is with the IP address of proxy server for 113.108.17.145, and port numbers is 8888 for example is to describe the technical scheme in the present embodiment.
Such as, the solicited message of proxy server 102 receiving terminal 101, wherein, the first mark and the second mark is carried in solicited message, the first domain name imgcache.qq.com being designated application server, the port numbers of the first port of application server is the 80, the second port numbers 8888 being designated proxy server.The port numbers of the proxy server that terminal 101 will be accessed is 8888, in the test environment residing for the application server 103 that the request msg that the port that proxy server is 8888 by port numbers exports will mail to.
Such as, the solicited message of proxy server 102 receiving terminal 101, wherein, the first mark and the second mark is carried in solicited message, first initial ip address being designated application server is 172.25.32.202, the port numbers of the first port of application server is the 80, the second port numbers 6660 being designated proxy server.The port numbers of the proxy server that terminal 101 will be accessed is 6660, in the test environment residing for the application server 103 that the request msg that the port that proxy server is 6660 by port numbers exports will mail to.
Proxy server knows that the port of the request msg in sending a request message is the second port, and the request message IP address of application server of asking and the first port, then proxy server identify according to the first mark and second in information the request msg in solicited message is sent to the first port on application server that address is IP address in the first mark.
Pass through above-described embodiment, sent the mark being used to indicate the port of proxy server to proxy server by terminal, the request msg be used in the solicited message of access application server that terminal sends by the port that proxy server can be arranged according to terminal sends to application server.Like this, on the proxy server that terminal can be arranged by it, different ports visits the application server under different network environments, thus solve for each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause in terminal, and then reach the technique effect reducing testing complex degree.
Preferably, proxy server identifies according to the first mark and second be applied the IP address of server under predetermined network and the port numbers of the first port, and wherein, second identifies the predetermined network be also used to indicate residing for application server; Request msg to be sent to the first port on the application server that address is IP address by the second port by proxy server.
Second mark is sent to proxy server by terminal, and the second mark can indicate predetermined network residing for application server, by the port numbers of proxy server as the mark of the predetermined network residing for instruction application server.Second mark indicates the second port of proxy server, second port can indicate the predetermined network residing for application server, export request msg in different networks by the different port of proxy server, proxy server according to terminal sends second identify in the port numbers of proxy server determine to be in the IP address of the application server in predetermined network and the port numbers of the first port.
Now the port numbers of proxy server is as the mark of predetermined network, and the request msg exported by the port that certain port numbers is corresponding will be output in predetermined network, namely just can distinguish different networks by port numbers.Terminal is by informing that proxy server exports the port numbers of the proxy server of request msg, just can be connected in network corresponding to this port numbers, that is, terminal just can access different networks by the port numbers sending different proxy servers to proxy server, thus realizes the switching of heterogeneous networks.
As shown in table 1, the port numbers of the proxy server that test environment is corresponding is 8888, and the port numbers of the proxy server that development environment is corresponding is 6660.The port numbers of the proxy server carried in the solicited message that terminal 101 sends is 8888, then proxy server 102 by port numbers be 8888 port the request msg of terminal 101 is sent to application server, the domain name of the application server of terminal 101 request access is imgcache.qq.com, and the IP address of proxy server corresponding to this domain name is 10.130.24.31:80, then the request msg of terminal is sent to by the port that port numbers is 8888 application server 103 that IP address is 10.130.24.31 by proxy server 102, this application server 103 is in test environment.
Terminal is by informing that proxy server sends request the port numbers of data, proxy server sends request data by the port that the port numbers that terminal sends is corresponding, thus terminal can the connecting of application server in the network environment corresponding with being in port numbers.Only port numbers need be sent to proxy server in terminal, do not need for testing a set of test macro of configuration all separately at every turn, proxy server configures once, thus solve owing to needing for each network environment builds the higher technical problem of testing complex degree that a set of test macro causes in prior art, and then reach the technique effect reducing testing complex degree.
Preferably, proxy server comprises according to the be applied port numbers of the IP address of server under predetermined network and the first port of the first mark and the second mark: proxy server acquisition and first from the pre-configured mapping relations of the predetermined network indicated by the second mark identifies the port numbers of IP address under corresponding predetermined network and the first port.
The mapping relations that each network environment correspondence one is pre-configured, as table 1, the port numbers of network environment and proxy server has mapping relations, under each network environment, also there are the mapping relations of domain name to IP address of the application server be under this network environment.Because the application server by same domain name request is when being under different networks, its IP address under predetermined network is different from the IP address be under other networks, and therefore, the domain name of same application server may corresponding IP address.As table 1, domain name is the application server of imgcache.qq.com, and the IP address mapped in test environment is 10.130.24.31, but the IP address mapped in development environment is 10.185.20.211.The predetermined network of proxy server indicated by the second mark is locked in the mapping relations pre-set and can be obtained the IP address of the application server be in predetermined network and the port numbers of the first port.
In the present embodiment, second port numbers being designated proxy server is 6660, the first domain name imgcache.qq.com being designated application server, the network environment of port numbers 6660 correspondence is development environment, in the pre-configured mapping relations that development environment is corresponding, the IP address that domain name imgcache.qq.com maps is 10.185.20.211, and the port numbers of the first port is 80.
Preferably, first mark comprises the domain names of application server or the initial ip address of application server, the mapping relations under the predetermined network whether existed indicated by the second mark searched by proxy server in pre-configured mapping relations, wherein, the mapping relations under a network or at least two heterogeneous networks are previously stored with in proxy server, mapping relations under each network comprise following one of at least: domain names and the mapping relations between IP address and port numbers, IP address and the mapping relations between IP address and port numbers; If find the mapping relations under the predetermined network indicated by the second mark, then search in the mapping relations of proxy server under the predetermined network indicated by the second mark and send and the first port numbers identifying IP address under the domain names that comprises or predetermined network corresponding to initial ip address and the first port to proxy server.
If the first identification request is domain names, then the mapping relations between the IP address of proxy server Network Search domain name and application server in mapping relations and the port numbers of the first port; If mapping relations under there is the predetermined network of the second mark instruction, and the first identification request is initial ip address, then the mapping relations between the IP address of initial ip address and application server and the port numbers of the first port searched by proxy server in mapping relations.
Such as, the second mark is the port numbers of proxy server.Proxy server searches the IP address of application server under predetermined network and the port numbers of the first port according to the domain names of application server or initial ip address, the port corresponding to first end slogan of the application server corresponding to IP address that the request msg of terminal sends to address to search for proxy server by proxy server.
Mapping relations pre-configured on proxy server can be as shown in table 1.
As shown in table 1, take network environment as test environment and development environment be example, under test environment, proxy server sends request data by the port that port numbers is 8888; Under development environment, proxy server sends request data by the port that port numbers is 6660.Second mark can be the port numbers of proxy server, the network that different port numbers is corresponding different.Such as, the port numbers of the proxy server that development environment is corresponding is 6660, and the port numbers of the proxy server that test environment is corresponding is 8888.Terminal network environment as required can write the port numbers of corresponding proxy server in request message, and proxy server sends request data from the port that this port numbers is corresponding obtain the port numbers of proxy server from solicited message after.
Particularly, proxy server receives the domain names that terminal sends, as imgcache.qq.com, or the initial ip address of application server, as 172.25.32.202.
Proxy server is after receiving the first mark and the second mark, and the mapping relations under the predetermined network that whether there is the second mark instruction searched by proxy server.Such as, second is designated 8888, then the mapping relations that port numbers is 8888 correspondences searched in Table 1 by proxy server, in test environment, namely search the mapping relations about the first mark.If the first identification request is domain names, mapping relations then in test environment between the IP address of Network Search domain name and application server and port numbers, if domain names is i.gtimg.cn, the IP address of its correspondence is 10.130.24.31, and port numbers is 80.If what the first mark was carried is initial ip address, second to identify the port numbers of carrying be 6660, the IP address of the application server of the IP address 172.25.32.202 mapping of the application server then finding initial ip address that this initial ip address then cannot be found in the environment to map in development environment is 10.130.25.95, and the port numbers of application server is 8080.Because the first mark can also carry the port numbers of application server, except conventional port numbers 80, can also refer to fixed end slogan, such as, in table 1, assigned ip address is the port numbers of 172.25.32.202 is 8080.
After the first identity map that terminal sends according to the first mark and the second mark is the IP address of application server and port numbers by proxy server, the request msg of terminal is sent to the IP address that obtains according to mapping and application server corresponding to port numbers.Such as, in the Develop Application System stage, need terminal to test in development environment, the port numbers of the proxy server that development environment is corresponding is 6660.Terminal is when sending a request message to proxy server, the domain name carrying the application server that terminal will be accessed in first mark is imgcache.qq.com, the port numbers carrying proxy server in second mark is 6660, the IP address that the port numbers 6660 that then proxy server carries in identifying according to second finds the domain name of application server in the first mark corresponding, as can be seen from Table 1, the IP address that domain name imgcache.qq.com maps in development environment is 10.185.20.211, is different from the IP address 10.130.24.31 in test environment.Proxy server maps according to proxy server the application server that the solicited message of terminal sends to this IP address corresponding by the IP address that obtains, and the request msg that namely access domain is called the application server of imgcache.qq.com by proxy server sends to IP address to be the application server of 10.185.20.211.This application server is in development environment, therefore, can be tested access domain is called imgcache.qq.com in development environment application server by the transmitting terminal of proxy server.If development environment and test environment are in local area network (LAN), and terminal cannot directly be accessed by local area network (LAN) access application server, then can in the manner described above by the application server sent in access local area network (LAN) of proxy server.
In order to further illustrate the terminal test method of the embodiment of the present invention, be described below in conjunction with Fig. 1 and table 1.
The IP address of the proxy server that terminal 101 connects is 113.108.17.145, the port numbers of two ports of this proxy server is respectively 8888 and 6660, wherein, the request msg sent by port numbers 8888 is sent in the first application server 103, and the request msg sent by port numbers 6660 is sent in the second application server 104.Wherein, first application server 103 and the second application server 104 include multiple application server, the domain name of the multiple application servers in the first application server 103 is respectively imgcache.qq.com, i.gtimg.cn and p.qq.com, and multiple servers corresponding to these three domain names are in test environment; Second application server 104 comprises the application server that domain name is respectively imgcache.qq.com and i.gtimg.cn, and also have IP address to be the application server of 172.25.32.202, these three application servers are in development environment.
If the port numbers that terminal is carried is 8888, then according to port numbers, proxy server determines that the IP address of the application program that the domain name i.gtimg.cn of request is corresponding is 10.130.24.31; If the port numbers that terminal is carried is 6660, then determine that the IP address of the application server that the domain name i.gtimg.cn of request is corresponding is 10.185.20.211 according to port numbers.After the IP address that proxy server gets application server and port numbers, request msg is sent to the port that the port numbers of application server corresponding to the IP address determined is corresponding, thus the connection setting up terminal and application server is to test.
Above-described embodiment, by the port numbers of proxy server that proxy server configures, mapping relations between the IP address of application server and the domain name of application server, after proxy server receives the second mark of terminal transmission, proxy server determines the IP address of the domain name in the first mark or the application server corresponding to initial ip address according to the second port in the second mark, proxy server obtains mapping and obtains IP address, and the request msg of terminal being sent to address is in the application server of this IP address.Because there are the mapping relations between the IP address of application server and the port numbers of proxy server in proxy server, and the network environment that the port of proxy server is corresponding different, so can according to port numbers and the domain name lookup IP address to application server at proxy server, and the request msg of terminal is sent application server corresponding to this IP address, thus terminal can be connected to terminal according to the port numbers of the second port of terminal and the mark of address being used to indicate application server by proxy server will carry out in the network environment of testing, it is no matter the port numbers of the second multiple different port that a terminal sends, or the port numbers of the second identical or different port that multiple terminal sends, these terminals all can be connected in the network environment of terminal request by proxy server, if need handover network environment, terminal is only needed to change the port numbers of the second port in the second mark, without the need to changing the information on proxy server, therefore, solve in terminal as each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause, and then reach the technique effect reducing testing complex degree.
Preferably, the request message for access application server that proxy server receiving terminal sends comprises: proxy server receives the request message for access application server that multiple terminal sends; Proxy server sends the request msg in the request message of multiple terminal transmission by multiple thread, and wherein, each thread is for sending the request msg in the request message of a terminal transmission.
In order to ensure that terminal can access proxies, the IP address of proxy server is the IP address that terminal can be accessed, and that is terminal can pass through access to netwoks proxy server.
When proxy server receives the solicited message for access application server of multiple terminal transmission, proxy server can process by multiple thread the request msg of self terminal simultaneously, and each thread sends the request msg in the request message of the section of a gathering transmission.Because proxy server sends request data, not too large to the consumption of the internal memory of proxy server itself, therefore, the requirement of the request msg of simultaneously sending self terminal with multiple thread can be met.
By above-described embodiment, utilize multiple thread process to carry out the request msg of self terminal, the requirement that multiple terminal carries out test environment switching can be met, improve the efficiency that terminal carries out test environment switching.
Preferably, after the request message for access application server that proxy server receiving terminal sends, terminal test method also comprises: proxy server obtains the IP address of terminal and the IP section of proxy server permission terminal access; Proxy server judges whether the IP address of terminal is in proxy server and allows in the IP section of access; And if the IP address of terminal is in the IP section of proxy server permission access, then proxy server performs operation request msg being sent to the first port on application server.
After the request message for access application server receiving terminal transmission, proxy server obtains the IP address of terminal and the IP section of proxy server permission terminal access, if asking the IP address of carrying out the terminal be connected with proxy server to be in proxy server allows in the IP section of terminal access, then request msg is sent to the first port on application server by proxy server.That is, before terminal access application server, the terminal outside the IP section allowing access application can be tackled, to avoid the malice of terminal to connect, thus ensure that the fail safe of proxy server and application server.
Below in conjunction with Fig. 3, the terminal test method of the embodiment of the present invention is described.This terminal test method comprises the steps:
Step S301, proxy server listening port, namely monitors and formulates port.
Step S302, judges whether new request, namely has new request.
Step S303, if terminal request sends request data by this port, then resolve the request of self terminal, and obtain domain name and the port numbers of the application server that terminal will be accessed, namely analysis request obtains access domain name and port.
Whether directly step S304, judges that whether the solicited message of whether carrying in solicited message is the IP address of the application server of access, i.e. IP access.If so, perform step S307, if not, perform step S305.
Step S305, if the address of the application program of carrying in the request of terminal is domain name, then judge that whether the domain name of the application server that terminal request is accessed is the domain name of the application server that proxy server can be accessed, namely judge whether consistent with the domain name pre-set.If so, then step S307 is performed.
Step S306, if carry in the request of terminal for the domain name of application server and pre-configured domain name inconsistent, obtain application server IP address corresponding to domain name and port, and the request of the request msg of the port transmitting terminal indicated by the terminal then port transmitting terminal that the direct port numbers indicated by terminal is corresponding, namely obtain IP address corresponding to domain name and port repeat request.
Step S307, if the IP address of carrying application server in the solicited message of terminal, then direct Forward-reques.
Terminal can send to proxy server by interface as shown in Figure 4 by needing the port numbers of the proxy server used, and alternatively, terminal can also select the IP address of proxy server.Terminal is provided with the IP address 113.108.17.145 of proxy server in the interface shown in Fig. 4, and the port numbers of proxy server is 6660.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that can add required general hardware platform by software according to the method for above-described embodiment and realize, hardware can certainly be passed through, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal (can be mobile phone, computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
According to the embodiment of the present invention, additionally provide a kind of proxy server for implementing above-mentioned terminal test method, this proxy server is mainly used in the terminal test method that execution embodiment of the present invention foregoing provides, and the proxy server provided the embodiment of the present invention below does concrete introduction:
Fig. 5 is the schematic diagram of the proxy server according to the embodiment of the present invention.As shown in the figure, this proxy server comprises: receiving element 10, first acquiring unit 30 and transmitting element 50.
The request message for access application server that receiving element 10 sends for receiving terminal, wherein, request message comprises: the first mark and the second mark, first mark is used to indicate IP address and first port of application server, first port is the port of application server, second mark is used to indicate the second port, and the second port is the port of proxy server.
First acquiring unit 30 for obtaining the first mark and the second mark from request message.
Transmitting element 50 is for being sent to the first port on the application server that address is IP address by the request msg in request message by the second port indicated by the second mark.
Application program in terminal is in different network environments in the different stages, in order to application program on different phase test terminal, needs to allow terminal be in corresponding network environment and tests.Such as, in the Develop Application System stage, need to allow terminal be in development environment; In the experience stage of application program, need to allow terminal be in experience environment.Network environment can be local area network (LAN) or wide area network, in the Develop Application System stage owing to needing the correctness of the development sequence of test application, develops the dependence test of process in the network environment that terminal may be needed to be in local area network (LAN); In the experience stage of application program, in the network environment just needing terminal to be in wide area network, use this application program with analog subscriber, to find that application program problem is in use carried out application programs and is optimized.
In order to meet the requirement of terminal access different network environments, the solicited message of the access application server sent by proxy server receiving terminal.In this request, carry the first mark of the position of instruction application server, also carry the second mark of the port of instruction proxy server.
Proxy server can be known the address of the application server of the request access of this terminal according to the first mark, and knows that proxy server sends the port of this solicited message according to the second mark.
Proxy server can configure multiple port, each port corresponds to different network environments, as shown in Figure 1, proxy server 102 is connected with the first application server 103, simultaneously, proxy server 102 is also connected with the second application server 104, and the first application server 103 can be made up of one or more server, and certain multiple server can form a local area network (LAN); Second application server 104 also can be made up of one or more server, and one or more server can be in wide area network.Proxy server 102 can be connected with the first application server 103 by a port, so all can be sent on the first application server 103 by proxy server 102 by the solicited message of this port, proxy server 102 can be connected with the second application server 104 by another one port, so all can be sent on the second application server 104 by proxy server 102 by the solicited message of this port.
The domain name of application server 103 is designated to describe the scheme in the present embodiment below for first, it should be noted that, the first mark in the present embodiment is not limited only to the domain name of application server 103, can also be but be not limited to the IP address of application server 103.
In the present embodiment, the second the second port being designated proxy server 102, the terminal test method below with reference to table 1 pair the present embodiment is described.
First mark can be the domain name of application server, imgcache.qq.com as shown in table 1, and the first mark can also be the initial ip address of application server.The present embodiment is designated imgcache.qq.com for first and is described.
Second mark is the port numbers of proxy server, and the port numbers of proxy server as shown in table 1 can be 8888, or 6660.
As shown in table 1, the network environment residing for application server 103 can be test environment or development environment, and when application server 103 is in test environment, the IP address of proxy server is 113.108.17.145, and port numbers is 8888; When application server 103 is in development environment, proxy IP address is 113.108.17.145, and port numbers is 6660.The present embodiment is with the IP address of proxy server for 113.108.17.145, and port numbers is 8888 for example is to describe the technical scheme in the present embodiment.
Such as, the solicited message of proxy server 102 receiving terminal 101, wherein, the first mark and the second mark is carried in solicited message, the first domain name imgcache.qq.com being designated application server, the port numbers of the first port of application server is the 80, the second port numbers 8888 being designated proxy server.The port numbers of the proxy server that terminal 101 will be accessed is 8888, in the test environment residing for the application server 103 that the request msg that the port that proxy server is 8888 by port numbers exports will mail to.
Such as, the solicited message of proxy server 102 receiving terminal 101, wherein, the first mark and the second mark is carried in solicited message, first initial ip address being designated application server is 172.25.32.202, the port numbers of the first port of application server is the 80, the second port numbers 6660 being designated proxy server.The port numbers of the proxy server that terminal 101 will be accessed is 6660, in the test environment residing for the application server 103 that the request msg that the port that proxy server is 6660 by port numbers exports will mail to.
Proxy server knows that the port of the request msg in sending a request message is the second port, and the request message IP address of application server of asking and the first port, then proxy server identify according to the first mark and second in information the request msg in solicited message is sent to the first port on application server that address is IP address in the first mark.
Pass through above-described embodiment, the request message that proxy server receiving terminal sends, and from request message, obtain the first mark and the second mark, first mark indicates IP address and first port of the application server of solicited message institute request access, second mark indicate proxy server send a request message in the second port of request msg, request msg in solicited message sends to address to be the first port of the application server of IP address the first mark from the second port of proxy server according to above-mentioned information by proxy server, to realize terminal access application server.The request msg that solicited message can be carried by different port by proxy server is sent on corresponding application server, if a terminal needs to test in different network environments, access by the different port of proxy server the application server be in different network environments; If there is the application server that multiple terminal access is different, even if these application servers are in different network environments, the request msg that solicited message also can be carried by different ports by proxy server is sent on corresponding application server.Proxy server selects the port of the request msg of transmitting terminal by the second port that receiving terminal indicates, when not needing IP address and the port arranging agent computer for each terminal, terminal also can be connected in different network environments, thus solve for each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause in terminal, and then reach the technique effect reducing testing complex degree.
Preferably, transmitting element comprises determines subelement, and for be applied according to the first mark and the second mark the IP address of server under predetermined network and the port numbers of the first port, wherein, second identifies the predetermined network be also used to indicate residing for application server; First sends subelement, for by the second port request msg being sent to the first port on the application server that address is IP address.
Second mark is sent to proxy server by terminal, and the second mark can indicate predetermined network residing for application server, by the port numbers of proxy server as the mark of the predetermined network residing for instruction application server.Second mark indicates the second port of proxy server, second port can indicate the predetermined network residing for application server, export request msg in different networks by the different port of proxy server, proxy server according to terminal sends second identify in the port numbers of proxy server determine to be in the IP address of the application server in predetermined network and the port numbers of the first port.
Now the port numbers of proxy server is as the mark of predetermined network, and the request msg exported by the port that certain port numbers is corresponding will be output in predetermined network, namely just can distinguish different networks by port numbers.Terminal is by informing that proxy server exports the port numbers of the proxy server of request msg, just can be connected in network corresponding to this port numbers, that is, terminal just can access different networks by the port numbers sending different proxy servers to proxy server, thus realizes the switching of heterogeneous networks.
As shown in table 1, the port numbers of the proxy server that test environment is corresponding is 8888, and the port numbers of the proxy server that development environment is corresponding is 6660.The port numbers of the proxy server carried in the solicited message that terminal 101 sends is 8888, then proxy server 102 by port numbers be 8888 port the request msg of terminal 101 is sent to application server, the domain name of the application server of terminal 101 request access is imgcache.qq.com, and the IP address of proxy server corresponding to this domain name is 10.130.24.31:80, then the request msg of terminal is sent to by the port that port numbers is 8888 application server 103 that IP address is 10.130.24.31 by proxy server 102, this application server 103 is in test environment.
Terminal is by informing that proxy server sends request the port numbers of data, proxy server sends request data by the port that the port numbers that terminal sends is corresponding, thus terminal can the connecting of application server in the network environment corresponding with being in port numbers.Only port numbers need be sent to proxy server in terminal, do not need the IP address for testing Configuration Agent computer all separately at every turn and port, proxy server configures once, thus to solve in prior art for each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause in terminal, and then reach the technique effect reducing testing complex degree.
Preferably, determine that subelement comprises: acquisition module, for obtaining from the pre-configured mapping relations of the predetermined network indicated by the second mark and the first port numbers identifying IP address under corresponding predetermined network and the first port.
The mapping relations that each network environment correspondence one is pre-configured, as table 1, the port numbers of network environment and proxy server has mapping relations, under each network environment, also there are the mapping relations of domain name to IP address of the application server be under this network environment.Because the application server by same domain name request is when being under different networks, its IP address under predetermined network is different from the IP address be under other networks, and therefore, the domain name of same application server may corresponding IP address.As table 1, domain name is the application server of imgcache.qq.com, and the IP address mapped in test environment is 10.130.24.31, but the IP address mapped in development environment is 10.185.20.211.The predetermined network of proxy server indicated by the second mark is locked in the mapping relations pre-set and can be obtained the IP address of the application server be in predetermined network and the port numbers of the first port.
In the present embodiment, second port numbers being designated proxy server is 6660, the first domain name imgcache.qq.com being designated application server, the network environment of port numbers 6660 correspondence is development environment, in the pre-configured mapping relations that development environment is corresponding, the IP address that domain name imgcache.qq.com maps is 10.185.20.211, and the port numbers of the first port is 80.
Preferably, first mark comprises the domain names of application server or the initial ip address of application server, first searches submodule, for searching the mapping relations under the predetermined network that whether exists indicated by the second mark in pre-configured mapping relations, wherein, the mapping relations under a network or at least two heterogeneous networks are previously stored with in proxy server, mapping relations under each network comprise following one of at least: domain names and the mapping relations between IP address and port numbers, IP address and the mapping relations between IP address and port numbers; Second searches submodule, for when finding the mapping relations under the predetermined network indicated by the second mark, searching in the mapping relations under the predetermined network indicated by the second mark and sending and the first port numbers identifying IP address under the domain names that comprises or predetermined network corresponding to initial ip address and the first port to proxy server.
If the first identification request is domain names, then the mapping relations between the IP address of proxy server Network Search domain name and application server in mapping relations and the port numbers of the first port; If mapping relations under there is the predetermined network of the second mark instruction, and the first identification request is initial ip address, then the mapping relations between the IP address of initial ip address and application server and the port numbers of the first port searched by proxy server in mapping relations.
Such as, the second mark is the port numbers of proxy server.Proxy server searches the IP address of application server under predetermined network and the port numbers of the first port according to the domain names of application server or initial ip address, the port corresponding to first end slogan of the application server corresponding to IP address that the request msg of terminal sends to address to search for proxy server by proxy server.
Mapping relations pre-configured on proxy server can be as shown in table 1.
As shown in table 1, take network environment as test environment and development environment be example, under test environment, proxy server sends request data by the port that port numbers is 8888; Under development environment, proxy server sends request data by the port that port numbers is 6660.Second mark can be the port numbers of proxy server, the network that different port numbers is corresponding different.Such as, the port numbers of the proxy server that development environment is corresponding is 6660, and the port numbers of the proxy server that test environment is corresponding is 8888.Terminal network environment as required can write the port numbers of corresponding proxy server in request message, and proxy server sends request data from the port that this port numbers is corresponding obtain the port numbers of proxy server from solicited message after.
Particularly, proxy server receives the domain names that terminal sends, as imgcache.qq.com, or the initial ip address of application server, as 172.25.32.202.
Proxy server is after receiving the first mark and the second mark, and the mapping relations under the predetermined network that whether there is the second mark instruction searched by proxy server.Such as, second is designated 8888, then the mapping relations that port numbers is 8888 correspondences searched in Table 1 by proxy server, in test environment, namely search the mapping relations about the first mark.If the first identification request is domain names, mapping relations then in test environment between the IP address of Network Search domain name and application server and port numbers, if domain names is i.gtimg.cn, the IP address of its correspondence is 10.130.24.31, and port numbers is 80.If what the first mark was carried is initial ip address, second to identify the port numbers of carrying be 6660, the IP address of the application server of the IP address 172.25.32.202 mapping of the application server then finding initial ip address that this initial ip address then cannot be found in the environment to map in development environment is 10.130.25.95, and the port numbers of application server is 8080.Because the first mark can also carry the port numbers of application server, except conventional port numbers 80, can also refer to fixed end slogan, such as, in table 1, assigned ip address is the port numbers of 172.25.32.202 is 8080.
After the first identity map that terminal sends according to the first mark and the second mark is the IP address of application server and port numbers by proxy server, the request msg of terminal is sent to the IP address that obtains according to mapping and application server corresponding to port numbers.Such as, in the Develop Application System stage, need terminal to test in development environment, the port numbers of the proxy server that development environment is corresponding is 6660.Terminal is when sending a request message to proxy server, the domain name carrying the application server that terminal will be accessed in first mark is imgcache.qq.com, the port numbers carrying proxy server in second mark is 6660, the IP address that the port numbers 6660 that then proxy server carries in identifying according to second finds the domain name of application server in the first mark corresponding, as can be seen from Table 1, the IP address that domain name imgcache.qq.com maps in development environment is 10.185.20.211, is different from the IP address 10.130.24.31 in test environment.Proxy server is according to the application server mapping the IP address that obtains and send to this IP address corresponding the solicited message of terminal, and the request msg that namely access domain is called the application server of imgcache.qq.com by proxy server sends to IP address to be the application server of 10.185.20.211.This server is in development environment, therefore, can be tested access domain is called imgcache.qq.com in development environment application server by the transmitting terminal of proxy server.If development environment and test environment are in local area network (LAN), and terminal cannot directly be accessed by local area network (LAN) access application server, then can in the manner described above by the application server sent in access local area network (LAN) of proxy server.
In order to further illustrate the terminal test method of the embodiment of the present invention, be described below in conjunction with Fig. 1 and table 1.
The IP address of the proxy server that terminal 101 connects is 113.108.17.145, the port numbers of two ports of this proxy server is respectively 8888 and 6660, wherein, the request msg sent by port numbers 8888 is sent in the first application server 103, and the request msg sent by port numbers 6660 is sent in the second application server 104.Wherein, first application server 103 and the second application server 104 include multiple application server, the domain name of the multiple application servers in the first application server 103 is respectively imgcache.qq.com, i.gtimg.cn and p.qq.com, and multiple servers corresponding to these three domain names are in test environment; Second application server 104 comprises the application server that domain name is respectively imgcache.qq.com and i.gtimg.cn, and also have IP address to be the application server of 172.25.32.202, these three application servers are in development environment.
If the port numbers that terminal is carried is 8888, then according to port numbers, proxy server determines that the IP address of the application program that the domain name i.gtimg.cn of request is corresponding is 10.130.24.31, and mapping is obtained IP address and sends back to proxy server by proxy server; If the port numbers position 6660 that terminal is carried, then according to port numbers, proxy server determines that the IP address of the application server that the domain name i.gtimg.cn of request is corresponding is 10.185.20.211, after proxy server gets the IP address of application server, request msg is sent to the port numbers corresponding ports of the IP address determined and application server corresponding to port numbers, thus the connection setting up terminal and application server is to test.
Above-described embodiment, by proxy server being configured with the port numbers of proxy server, mapping relations between the IP address of application server and the domain name of application server, after proxy server receives the second mark of terminal transmission, the IP address of the application server corresponding to domain name in the first mark determined by proxy server according to the second port in the second mark, proxy server obtains mapping and obtains IP address, and the request msg of terminal being sent to address is in the application server of this IP address.Because there are the mapping relations between the IP address of application server and the port numbers of proxy server in proxy server, and the network environment that the port of proxy server is corresponding different, so can according to port numbers and the domain name lookup IP address to application server at proxy server, and the request msg of terminal is sent application server corresponding to this IP address, thus terminal can be connected to terminal according to the port numbers of the second port of terminal and the mark of address being used to indicate application server by proxy server will carry out in the network environment of testing, it is no matter the port numbers of the second multiple different port that a terminal sends, or the port numbers of the second identical or different port that multiple terminal sends, these terminals all can be connected in the network environment of terminal request by proxy server, if need handover network environment, terminal is only needed to change the port numbers of the second port in the second mark, without the need to changing the information on proxy server, therefore, solve in terminal as each network environment configures the higher technical problem of testing complex degree that the mapping relations between corresponding domain name and IP address cause, and then reach the technique effect reducing testing complex degree.
Preferably, receiving element comprises reception subelement, for receiving the request message for access application server that multiple terminal sends; Transmitting element comprises the second transmission subelement, and for being sent the request msg in the request message of multiple terminal transmission by multiple thread, wherein, each thread is for sending the request msg in the request message of a terminal transmission.
In order to ensure that terminal can access proxies, the IP address of proxy server is the IP address that terminal can be accessed, and that is terminal can pass through access to netwoks proxy server.
When proxy server receives the solicited message for access application server of multiple terminal transmission, proxy server can process by multiple thread the request msg of self terminal simultaneously, and each thread sends the request msg in the request message of the section of a gathering transmission.Because proxy server sends request data, not too large to the consumption of the internal memory of proxy server itself, therefore, the requirement of the request msg of simultaneously sending self terminal with multiple thread can be met.
By above-described embodiment, utilize multiple thread process to carry out the request msg of self terminal, the requirement that multiple terminal carries out test environment switching can be met, improve the efficiency that terminal carries out test environment switching.
Preferably, proxy server also comprises: second acquisition unit, and for after the request message for access application server that sends at proxy server receiving terminal, proxy server obtains the IP section that the IP address of terminal and proxy server allow terminal access; Judging unit, for judging whether the IP address of terminal is in proxy server and allows in the IP section of access; When judging that the IP address of terminal is in the described IP section of proxy server permission access, notice transmitting element performs operation request msg being sent to the first port on application server.
After the request message for access application server receiving terminal transmission, proxy server obtains the IP address of terminal and the IP section of proxy server permission terminal access, if asking the IP address of carrying out the terminal be connected with proxy server to be in proxy server allows in the IP section of terminal access, then request msg is forwarded to the first port on application server by proxy server.That is, before terminal access application server, the terminal outside the IP section allowing access application can be tackled, to avoid the malice of terminal to connect, thus ensure that the fail safe of proxy server and application server.
Embodiment 3
According to the embodiment of the present invention, additionally provide a kind of proxy server for implementing above-mentioned terminal test method, as shown in Figure 6, this proxy server mainly comprises processor 601, equipment interface 602, network interface 603, memory 604, wherein:
Equipment interface 602 is for connecting terminal, and network interface 603 is for connecting application server, and memory 604 performs the program code of above-mentioned terminal test method for storing.
Processor 601 is mainly used in performing following operation:
The request message for access application server that processor 601 sends for receiving terminal, wherein, request message comprises: the first mark and the second mark, and the first mark is used to indicate IP address and first port of application server, and the second mark is used to indicate the second port of proxy server; Proxy server obtains the first mark and the second mark from request message; And the request msg in request message to be sent to the first port on the application server that address is IP address by the second port indicated by the second mark by proxy server.
Processor 601 is also for be applied according to the first mark and the second mark the IP address of server under predetermined network and the port numbers of the first port, and wherein, second identifies the predetermined network be also used to indicate residing for application server; Request msg to be sent to the first port on the application server that address is IP address by the second port by proxy server.
Processor 601 also for obtaining and the first port numbers identifying IP address under corresponding predetermined network and the first port from the pre-configured mapping relations of the predetermined network indicated by the second mark.
Processor 601 also for search whether exist second mark instruction predetermined network under mapping relations, wherein, prestore by the mapping relations under a network or at least two heterogeneous networks in proxy server, mapping relations under each network comprise following one of at least: the mapping relations between the IP address of domain names and application server and port numbers, the mapping relations between the IP address of initial ip address and application server and port numbers; If find the mapping relations under the predetermined network indicated by the second mark, then search the port numbers of IP address under the domain names identifying with first and comprise or predetermined network corresponding to initial ip address and the first port in the mapping relations of proxy server under the predetermined network indicated by the second mark.
Processor 601 is also for receiving the request message for access application server that multiple terminal sends; The first port request msg in request message be sent on application server that address is IP address by the second port indicated by the second mark is comprised: proxy server sends the request msg in the request message that multiple terminal sends by multiple thread, wherein, each thread is for sending the request msg in the request message of a terminal transmission.
Processor 601 also for after the request message for access application server that sends at proxy server receiving terminal, obtains the IP address of terminal; Judge whether the IP address of terminal is in proxy server and allows in the IP section of access; And if the IP address of terminal is in the IP section of proxy server permission access, then proxy server performs operation request msg being sent to the first port on application server.
Alternatively, the concrete example in the present embodiment can with reference to the example described in above-described embodiment 1 and embodiment 2, and the present embodiment does not repeat them here.
Embodiment 4
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, above-mentioned storage medium may be used for the program code storing embodiment of the present invention terminal test method
Alternatively, in the present embodiment, above-mentioned storage medium can be arranged at least one network equipment of multiple network equipments of the network of wide area network, metropolitan area network or local area network (LAN).
Alternatively, in the present embodiment, storage medium is set to store the program code for performing following steps:
S1, the request message for access application server that proxy server receiving terminal sends, wherein, request message comprises: the first mark and the second mark, first mark is used to indicate IP address and first port of application server, and the second mark is used to indicate the second port of proxy server;
S2, proxy server obtains the first mark and the second mark from request message;
S3, the request msg in request message to be sent to the first port on the application server that address is IP address by the second port indicated by the second mark by proxy server.
Alternatively, in the present embodiment, above-mentioned storage medium can include but not limited to: USB flash disk, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
Alternatively, in the present embodiment, processor performs according to the program code that stored in storage medium: the first port that the request msg in request message to be sent on the application server that address is IP address by the second port indicated by the second mark by proxy server comprises: proxy server identifies according to the first mark and second be applied the IP address of server under predetermined network and the port numbers of the first port, wherein, second the predetermined network be also used to indicate residing for application server is identified; Request msg to be sent to the first port on the application server that address is IP address by the second port by proxy server.
Alternatively, in the present embodiment, processor performs according to the program code that stored in storage medium: proxy server comprises according to the be applied port numbers of the IP address of server under predetermined network and the first port of the first mark and the second mark: proxy server acquisition and first from the pre-configured mapping relations of the predetermined network indicated by the second mark identifies the port numbers of IP address under corresponding predetermined network and the first port.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium: the first mark comprises the domain names of application server or the initial ip address of application server, proxy server obtains from the pre-configured mapping relations of the predetermined network indicated by the second mark and the first port numbers identifying IP address under corresponding predetermined network and the first port comprises: whether proxy server is searched exists mapping relations under predetermined network that the second mark indicates, wherein, prestore by the mapping relations under a network or at least two heterogeneous networks in proxy server, mapping relations under each network comprise following one of at least: the mapping relations between the IP address of domain names and application server and port numbers, mapping relations between the IP address of initial ip address and application server and port numbers, if find the mapping relations under the predetermined network indicated by the second mark, then search the port numbers of IP address under the domain names identifying with first and comprise or predetermined network corresponding to initial ip address and the first port in the mapping relations of proxy server under the predetermined network indicated by the second mark.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium: the request message for access application server that proxy server receiving terminal sends comprises: proxy server receives the request message for access application server that multiple terminal sends; The first port that request msg in request message to be sent on the application server that address is IP address by the second port indicated by the second mark by proxy server comprises: proxy server sends the request msg in the request message that multiple terminal sends by multiple thread, wherein, each thread is for sending the request msg in the request message of a terminal transmission.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium: after the request message for access application server that proxy server receiving terminal sends, terminal test method also comprises: proxy server obtains the IP address of terminal; Proxy server judges whether the IP address of terminal is in proxy server and allows in the IP section of access; And if the IP address of terminal is in the IP section of proxy server permission access, then proxy server performs operation request msg being sent to the first port on application server.
Alternatively, the concrete example in the present embodiment can with reference to the example described in above-described embodiment 1 and embodiment 2, and the present embodiment does not repeat them here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
If the integrated unit in above-described embodiment using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in the storage medium that above computer can read.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in storage medium, comprises all or part of step of some instructions in order to make one or more computer equipment (can be personal computer, server or the network equipment etc.) perform method described in each embodiment of the present invention.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed client, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1. a terminal test method, is characterized in that, comprising:
The request message for access application server that proxy server receiving terminal sends, wherein, described request message comprises: the first mark and the second mark, described first mark is used to indicate IP address and first port of described application server, and described second mark is used to indicate the second port of described proxy server;
Described proxy server obtains described first mark and described second mark from described request message; And
Request msg in described request message to be sent to described first port on the described application server that address is described IP address by described second port indicated by described second mark by described proxy server.
2. terminal test method according to claim 1, it is characterized in that, described first port that the request msg in described request message to be sent on the described application server that address is described IP address by described second port indicated by described second mark by described proxy server comprises:
Described proxy server obtains the described IP address of described application server under predetermined network and the port numbers of described first port according to described first mark and described second mark, wherein, described second the described predetermined network be also used to indicate residing for described application server is identified;
Described request data to be sent to described first port on the described application server that address is described IP address by described second port by described proxy server.
3. terminal test method according to claim 2, is characterized in that, described proxy server identifies according to described first mark and described second port numbers obtaining the described IP address of described application server under predetermined network and described first port and comprises:
Described proxy server obtains and the described first port numbers identifying described IP address under corresponding described predetermined network and described first port from the pre-configured mapping relations of described predetermined network indicated by described second mark.
4. terminal test method according to claim 3, it is characterized in that, described first mark comprises the domain names of described application server or the initial ip address of described application server, and the port numbers that the acquisition and described first from the pre-configured mapping relations of described predetermined network indicated by described second mark of described proxy server identifies described IP address under corresponding described predetermined network and described first port comprises:
Described proxy server search whether exist described second mark instruction described predetermined network under mapping relations, wherein, prestore by the mapping relations under a network or at least two heterogeneous networks in described proxy server, mapping relations under each network comprise following one of at least: the mapping relations between the IP address of described domain names and described application server and port numbers, the mapping relations between the IP address of described initial ip address and described application server and port numbers;
If find the described mapping relations under the described predetermined network indicated by described second mark, then search the port numbers of IP address under the described domain names identifying with first and comprise or described predetermined network corresponding to described initial ip address and the first port in the described mapping relations of described proxy server under the described predetermined network indicated by described second mark.
5. terminal test method according to claim 1, is characterized in that,
The request message for access application server that described proxy server receiving terminal sends comprises: described proxy server receives the request message for access application server that multiple described terminal sends;
Described first port that request msg in described request message to be sent on the described application server that address is described IP address by described second port indicated by described second mark by described proxy server comprises: described proxy server sends the request msg in the request message of multiple described terminal transmission by multiple thread, wherein, thread described in each is for sending the request msg in the described request message of a described terminal transmission.
6. terminal test method according to claim 1, is characterized in that, after the request message for access application server that proxy server receiving terminal sends, described terminal test method also comprises:
Described proxy server obtains the IP address of described terminal;
Described proxy server judges whether the IP address of described terminal is in described proxy server and allows in the IP section of access; And
Allow in the described IP section of access if the IP address of described terminal is in described proxy server, then described proxy server performs operation described request data being sent to described first port on described application server.
7. a proxy server, is characterized in that, comprising:
Receiving element, for the request message for access application server that receiving terminal sends, wherein, described request message comprises: the first mark and the second mark, described first mark is used to indicate IP address and first port of described application server, and described second mark is used to indicate the second port of described proxy server;
First acquiring unit, for obtaining described first mark and described second mark from described request message; And
Transmitting element, for being sent to described first port on the described application server that address is described IP address by the request msg in described request message by described second port indicated by described second mark.
8. proxy server according to claim 7, is characterized in that, described transmitting element comprises:
Determine subelement, for obtaining the described IP address of described application server under predetermined network and the port numbers of described first port according to described first mark and the second mark, wherein, described second the described predetermined network be used to indicate residing for described application server is identified;
First sends subelement, for by described second port described request data being sent to described first port on the described application server that address is described IP address.
9. proxy server according to claim 8, is characterized in that, describedly determines that subelement comprises:
Acquisition module, for obtaining and the described first port numbers identifying described IP address under corresponding described predetermined network and described first port from the pre-configured mapping relations of described predetermined network indicated by described second mark.
10. proxy server according to claim 9, is characterized in that, described first mark comprises the domain names of described application server or the initial ip address of described application server, and described acquisition module comprises:
First searches submodule, for search whether exist described second mark instruction described predetermined network under mapping relations, wherein, prestore by the mapping relations under a network or at least two heterogeneous networks in described proxy server, mapping relations under each network comprise following one of at least: the mapping relations between the IP address of described domain names and described application server and port numbers, the mapping relations between the IP address of described initial ip address and described application server and port numbers; And
Second searches submodule, for when finding the described mapping relations under the described predetermined network indicated by described second mark, in the described mapping relations of described proxy server under the described predetermined network indicated by described second mark, search the port numbers of IP address under the described domain names identifying with first and comprise or described predetermined network corresponding to described initial ip address and the first port.
11. proxy servers according to claim 7, is characterized in that,
Described receiving element comprises: receive subelement, for receiving the request message for access application server that multiple described terminal sends;
Described transmitting element comprises: second sends subelement, for being sent the request msg in the request message of multiple described terminal transmission by multiple thread, wherein, thread described in each is for sending the request msg in the described request message of a described terminal transmission.
12. proxy servers according to claim 7, is characterized in that, described proxy server also comprises:
Second acquisition unit, for after the request message for access application server that sends at proxy server receiving terminal, described proxy server obtains the IP address of described terminal; And
Judging unit, for judging whether the IP address of described terminal is in described proxy server and allows in the IP section of access; When judging that the IP address of described terminal is in the described IP section of described proxy server permission access, notify that described transmitting element performs operation described request data being sent to described first port on described application server.
CN201410438024.5A 2014-08-29 2014-08-29 Terminal testing method and proxy server Active CN105376107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410438024.5A CN105376107B (en) 2014-08-29 2014-08-29 Terminal testing method and proxy server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410438024.5A CN105376107B (en) 2014-08-29 2014-08-29 Terminal testing method and proxy server

Publications (2)

Publication Number Publication Date
CN105376107A true CN105376107A (en) 2016-03-02
CN105376107B CN105376107B (en) 2020-02-28

Family

ID=55377934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410438024.5A Active CN105376107B (en) 2014-08-29 2014-08-29 Terminal testing method and proxy server

Country Status (1)

Country Link
CN (1) CN105376107B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953789A (en) * 2017-02-20 2017-07-14 广州启生信息技术有限公司 Look for the implementation method of system in a kind of programmable many dial-up routing outlets
CN107070931A (en) * 2017-04-21 2017-08-18 北京奇安信科技有限公司 Cloud application data upload/access method, system and cloud proxy server
CN107105033A (en) * 2017-04-21 2017-08-29 北京奇安信科技有限公司 Cloud application access method, cloud proxy server and cloud application access system
CN107948329A (en) * 2018-01-03 2018-04-20 湖南麓山云数据科技服务有限公司 A kind of cross-domain processing method and system
CN108153543A (en) * 2017-12-29 2018-06-12 北京酷我科技有限公司 A kind of method of server address switching
CN109194749A (en) * 2018-09-11 2019-01-11 福建天泉教育科技有限公司 Monitor method, the storage medium of network request
CN109525628A (en) * 2017-09-20 2019-03-26 北京国双科技有限公司 HTTP request adjustment method, device and system
CN109582583A (en) * 2018-12-14 2019-04-05 平安健康保险股份有限公司 Method for testing software, device, computer equipment and storage medium
CN109634858A (en) * 2018-12-07 2019-04-16 北京小米移动软件有限公司 File test method, device and computer readable storage medium
CN111131436A (en) * 2019-12-20 2020-05-08 广州品唯软件有限公司 Method and device for quickly searching proxy and readable storage medium
CN111225099A (en) * 2018-11-27 2020-06-02 Oppo(重庆)智能科技有限公司 Terminal test method, server, test equipment and storage medium
CN112261660A (en) * 2020-10-16 2021-01-22 深圳安软信创技术有限公司 Android mobile phone end application proxy access security control method
CN113676502A (en) * 2020-05-14 2021-11-19 协鑫集成科技股份有限公司 Application service access method, device and storage medium
CN113783713A (en) * 2020-08-04 2021-12-10 北京沃东天骏信息技术有限公司 Method, device and system for configuring proxy
CN114520780A (en) * 2022-01-28 2022-05-20 北京金堤科技有限公司 Access method and device for proxy server
CN115277119A (en) * 2022-07-12 2022-11-01 深圳市电子商务安全证书管理有限公司 Internal network access method, device, equipment and storage medium
CN112261660B (en) * 2020-10-16 2024-06-04 深圳安软信创技术有限公司 Android mobile phone end application proxy access security control method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102227115A (en) * 2011-06-13 2011-10-26 北京星网锐捷网络技术有限公司 Method and device for limiting user access
CN102591667A (en) * 2012-01-16 2012-07-18 深圳市同洲视讯传媒有限公司 Method and device for remote publishing application
CN103944942A (en) * 2013-01-22 2014-07-23 腾讯科技(深圳)有限公司 Multi-WEB environment data access method and device
CN104009880A (en) * 2013-02-27 2014-08-27 阿里巴巴集团控股有限公司 Web test method, proxy server and Web test device
US9246699B2 (en) * 2010-06-07 2016-01-26 Salesforce.Com, Inc. Method and system for testing multiple components of a multi-tenant, multi-domain, multi-tiered website

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9246699B2 (en) * 2010-06-07 2016-01-26 Salesforce.Com, Inc. Method and system for testing multiple components of a multi-tenant, multi-domain, multi-tiered website
CN102227115A (en) * 2011-06-13 2011-10-26 北京星网锐捷网络技术有限公司 Method and device for limiting user access
CN102591667A (en) * 2012-01-16 2012-07-18 深圳市同洲视讯传媒有限公司 Method and device for remote publishing application
CN103944942A (en) * 2013-01-22 2014-07-23 腾讯科技(深圳)有限公司 Multi-WEB environment data access method and device
CN104009880A (en) * 2013-02-27 2014-08-27 阿里巴巴集团控股有限公司 Web test method, proxy server and Web test device

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953789A (en) * 2017-02-20 2017-07-14 广州启生信息技术有限公司 Look for the implementation method of system in a kind of programmable many dial-up routing outlets
CN107105033B (en) * 2017-04-21 2020-08-18 北京奇安信科技有限公司 Cloud application access method, cloud proxy server and cloud application access system
CN107070931A (en) * 2017-04-21 2017-08-18 北京奇安信科技有限公司 Cloud application data upload/access method, system and cloud proxy server
CN107105033A (en) * 2017-04-21 2017-08-29 北京奇安信科技有限公司 Cloud application access method, cloud proxy server and cloud application access system
CN109525628A (en) * 2017-09-20 2019-03-26 北京国双科技有限公司 HTTP request adjustment method, device and system
CN109525628B (en) * 2017-09-20 2021-09-07 北京国双科技有限公司 HTTP request debugging method, device and system
CN108153543A (en) * 2017-12-29 2018-06-12 北京酷我科技有限公司 A kind of method of server address switching
CN108153543B (en) * 2017-12-29 2021-03-02 北京酷我科技有限公司 Server address switching method
CN107948329A (en) * 2018-01-03 2018-04-20 湖南麓山云数据科技服务有限公司 A kind of cross-domain processing method and system
CN109194749A (en) * 2018-09-11 2019-01-11 福建天泉教育科技有限公司 Monitor method, the storage medium of network request
CN109194749B (en) * 2018-09-11 2021-08-03 福建天泉教育科技有限公司 Method for monitoring network request and storage medium
CN111225099A (en) * 2018-11-27 2020-06-02 Oppo(重庆)智能科技有限公司 Terminal test method, server, test equipment and storage medium
CN109634858A (en) * 2018-12-07 2019-04-16 北京小米移动软件有限公司 File test method, device and computer readable storage medium
CN109582583A (en) * 2018-12-14 2019-04-05 平安健康保险股份有限公司 Method for testing software, device, computer equipment and storage medium
CN111131436A (en) * 2019-12-20 2020-05-08 广州品唯软件有限公司 Method and device for quickly searching proxy and readable storage medium
CN113676502A (en) * 2020-05-14 2021-11-19 协鑫集成科技股份有限公司 Application service access method, device and storage medium
CN113676502B (en) * 2020-05-14 2024-05-14 协鑫集成科技股份有限公司 Application service access method, device and storage medium
CN113783713A (en) * 2020-08-04 2021-12-10 北京沃东天骏信息技术有限公司 Method, device and system for configuring proxy
CN112261660A (en) * 2020-10-16 2021-01-22 深圳安软信创技术有限公司 Android mobile phone end application proxy access security control method
CN112261660B (en) * 2020-10-16 2024-06-04 深圳安软信创技术有限公司 Android mobile phone end application proxy access security control method
CN114520780A (en) * 2022-01-28 2022-05-20 北京金堤科技有限公司 Access method and device for proxy server
CN115277119A (en) * 2022-07-12 2022-11-01 深圳市电子商务安全证书管理有限公司 Internal network access method, device, equipment and storage medium
CN115277119B (en) * 2022-07-12 2024-02-09 深圳市电子商务安全证书管理有限公司 Access method, device, equipment and storage medium of internal network

Also Published As

Publication number Publication date
CN105376107B (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN105376107A (en) Terminal test method and proxy server
CN105391811B (en) domain name resolution method, access method of application server and terminal thereof
CN105430108B (en) Test environment access method and proxy server
US9467937B2 (en) System and method of locating wireless connection among a plurality of wireless connections
CN105546931A (en) Intelligent refrigerator netting-in method and system, intelligent refrigerator, intelligent terminal and server
CN105338554A (en) Networking method and system for intelligent household equipment, and ZigBee gateway
MX2014009070A (en) Characteristic information acquisition method, device and network equipment.
CN104270204A (en) Testing method and testing equipment for wireless communication module
GB2441062A (en) A method for discovering the device in the different wireless computer network
CN103957593A (en) Wireless network accessing method, device and system
JP2017531386A (en) Method and device for obtaining content of service information
CN103109517A (en) Double-stack terminal accessing service method, terminal and system
US20170289243A1 (en) Domain name resolution method and electronic device
CN106210155A (en) The method and apparatus connecting application server
CN103685176B (en) Terminal equipment, equipment management server and connection establishment method
CN109918392B (en) Structured query language positioning method, device, server and storage medium
CN107396423A (en) Method for network access and device, storage medium and electronic installation
CN103944942B (en) A kind of data access method and device of more WEB environments
CN113630479A (en) Domain name resolution method and related product
CN106488585A (en) Display control method and system in wireless connection realization
CN105511275A (en) Method and device for controlling intelligent electric appliance
CN111314394B (en) Resource publishing method, device, equipment and storage medium of Internet of things
KR20160130457A (en) Determination method and corresponding terminal, computer program product and storage medium
CN107222365A (en) Data processing method, device and server
CN106294702A (en) A kind of information query method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant