CN108712492A - A kind of HTTP redirection method, apparatus, routing device and computer storage media - Google Patents

A kind of HTTP redirection method, apparatus, routing device and computer storage media Download PDF

Info

Publication number
CN108712492A
CN108712492A CN201810475748.5A CN201810475748A CN108712492A CN 108712492 A CN108712492 A CN 108712492A CN 201810475748 A CN201810475748 A CN 201810475748A CN 108712492 A CN108712492 A CN 108712492A
Authority
CN
China
Prior art keywords
browser
address
domain name
outer net
http
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810475748.5A
Other languages
Chinese (zh)
Inventor
高静波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810475748.5A priority Critical patent/CN108712492A/en
Publication of CN108712492A publication Critical patent/CN108712492A/en
Priority to PCT/CN2019/083604 priority patent/WO2019218845A1/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Abstract

The present invention proposes a kind of HTTP redirection method, apparatus, routing device and computer storage media, this method:The connection status of detection and internet in real time;In the state of not connected internet, the outer net domain name based on browse request parsing returns to a virtual address corresponding with the outer net domain name to the browser;When the browser, which is based on the virtual address, initiates access request, the access request is redirected on setting webpage.After accessing wireless routing device by Wi-Fi or other modes present invention is generally directed to terminal user, solve the problems, such as to be encountered by the influence of browser rs cache mechanism during surfing the Internet using browser.The present invention by way of detecting wireless routing device and internet connection status in real time in time carry out it is corresponding handle, avoid various the problem of causing due to browser rs cache, promote the online experience of user.

Description

A kind of HTTP redirection method, apparatus, routing device and computer storage media
Technical field
The present invention relates to network technique field more particularly to a kind of HTTP (HyperText Transfer Protocol, Hypertext transfer protocol) reorientation method, device, routing device and computer storage media.
Background technology
Browser rs cache (Browser Caching) is to accelerate browsing to save the resource of network, and browser is in user The document of most recently requested mistake is stored on disk, when visitor asks this page again, browser can be from this Local disk shows document, can thus accelerate the reading of the page.The use that the caching of browser is quick-witted in some cases can Enough reduce the delay of network, hence it is evident that the opening speed for accelerating the page allows user to reach better experience.But the mechanism is also simultaneously It is perfect in every way, some negative effects are on the other hand also brought along, user is caused to have to that by clearing up caching browser could be allowed Restore normal work.If our online are relatively more, many online traces and caching records can be left, if cache information mistake It is more, our online quality can be influenced, our online experience is influenced.And user opens up because caching is had read sometimes The page of mistake is shown.
Invention content
The technical problem to be solved by the present invention is to provide a kind of HTTP redirection method, apparatus, routing device and calculating Machine storage medium overcomes the problems, such as and avoids the online experience for promoting user since browser rs cache causes.
The technical solution adopted by the present invention is the HTTP redirection method, including:
The connection status of detection and internet in real time;
In the state of not connected internet, the outer net domain name based on browse request parsing is returned to the browser One virtual address corresponding with the outer net domain name;
When the browser, which is based on the virtual address, initiates access request, the access request is redirected to and is set Determine on webpage.
Further, described when the browser is based on virtual address initiation access request, the access is asked It asks and is redirected on setting webpage, including:
When receiving the access request that the browser is initiated based on the virtual address, uses and hold with the browser The mode of hand establishes connection;
After establishing successful connection, monitored using operating system nucleus and intercept that the browser sends out for setting When the HTTP access request messages of port, the HTTP access requests by the browser for setting port jump to setting net On page.
It is further, described to jump to the browser on setting webpage for the HTTP access requests of setting port, Including:
The http response message that the setting web page address information is carried by being returned to the browser, to make It states browser and jumps to the access setting webpage.
Further, the method further includes:
It is stored in the outer net domain name of the browse request parsing in the state of not connected internet;
In the state of having connected internet, the outer net domain name based on preservation provides corresponding to the browser True address after parsing redirects so that the browser is redirected based on the true address.
Further, the method further includes:
During providing the true address to the browser, for the outer net domain name of parsing failure, provides and set Determine the operation of parsing again of number.
Further, the outer net domain name for parsing failure provides the parsing operation of setting number, including:
Legitimacy detection is carried out to the outer net domain name of parsing failure, the outer net domain name detected by legitimacy is provided Set the operation of parsing again of number.
Further, the method further includes:
In the state of connecting internet, the outer net domain name of preservation, the virtual address and described true are established Correspondence between address;
When the virtual address of the browser based on caching initiates access request, institute is provided to the browser The corresponding true address of virtual address is stated, is redirected so that the browser is redirected based on the true address.
The present invention also provides a kind of HTTP redirection devices, including:
Networking detection module, for detecting the connection status with internet in real time;
Failed cluster processing module, the outer domain in the state of not connected internet, being parsed based on browse request Name returns to a virtual address corresponding with the outer net domain name to the browser;When the browser is based on described virtual When access request is initiated in address, the access request is redirected on setting webpage.
Further, the failed cluster processing module, is used for:
When receiving the access request that the browser is initiated based on the virtual address, uses and hold with the browser The mode of hand establishes connection;
After establishing successful connection, monitored using operating system nucleus and intercept that the browser sends out for setting When the HTTP access request messages of port, the HTTP access requests by the browser for setting port jump to setting net On page.
Further, the failed cluster processing module, is specifically used for:
The http response message that the setting web page address information is carried by being returned to the browser, to make It states browser and jumps to the access setting webpage.
Further, the failed cluster processing module is additionally operable to be stored in the browsing in the state of not connected internet The outer net domain name of device request analysis;
Described device further includes:
Networking processing module, in the state of having connected internet, the outer net domain name based on preservation is to described Browser provides the true address after corresponding parsing, so that the browser redirects jump based on the true address Turn.
Further, the networking processing module, is additionally operable to:
During providing the true address to the browser, for the outer net domain name of parsing failure, provides and set Determine the operation of parsing again of number.
Further, the networking processing module, is specifically used for:
Legitimacy detection is carried out to the outer net domain name of parsing failure, the outer net domain name detected by legitimacy is provided Set the operation of parsing again of number.
Further, the networking processing module, is additionally operable to:
In the state of connecting internet, the outer net domain name of preservation, the virtual address and described true are established Correspondence between address;
When the virtual address of the browser based on caching initiates communication request, institute is provided to the browser The corresponding true address of virtual address is stated, is redirected so that the browser is redirected based on the true address.
The present invention also provides a kind of wireless routing devices, including:
Communication module, for carrying out communication interaction with user side browser;
Memory, for being stored with HTTP redirection program;And
Processor, for executing the step of HTTP redirection program is to realize above-mentioned HTTP redirection method.
The present invention also provides a kind of computer storage media, it is stored with computer program on the computer storage media, The computer program realizes the step of above-mentioned HTTP redirection method when being executed by processor.
Using above-mentioned technical proposal, the present invention at least has following advantages:
HTTP redirection method, apparatus, routing device and computer storage media of the present invention, mainly for terminal After user accesses wireless routing device by Wi-Fi or other modes, solve to be browsed during surfing the Internet using browser The problem of influence of device caching mechanism encounters.The present invention by detecting wireless routing device and internet connection status in real time Mode is handled accordingly in time, avoids various the problem of causing due to browser rs cache, promotes the upper dictyosome of user It tests.
Description of the drawings
Fig. 1 is the HTTP redirection method flow diagram of first embodiment of the invention;
Fig. 2 is the HTTP redirection method flow diagram of second embodiment of the invention;
Fig. 3 is the HTTP redirection device composed structure schematic diagram of third embodiment of the invention;
Fig. 4 is the HTTP redirection device composed structure schematic diagram of fourth embodiment of the invention;
Fig. 5 is the HTTP redirection flow diagram of sixth embodiment of the invention.
Specific implementation mode
Further to illustrate the present invention to reach the technological means and effect that predetermined purpose is taken, below in conjunction with attached Figure and preferred embodiment, the present invention is described in detail as after.
First embodiment of the invention, a kind of HTTP redirection method are applied to wireless routing device, should as shown in Fig. 1 Method includes step in detail below:
Step S101 detects the connection status with internet in real time;The step for will pass through the entire of the embodiment of the present invention During HTTP redirection.
Step S102, in the state of not connected internet, the outer net domain name based on browse request parsing is to described clear Device of looking at returns to a virtual address corresponding with the outer net domain name;
Step S103, when the browser, which is based on the virtual address, initiates access request, by the access request weight It is directed on setting webpage.
Specifically, step S103 includes:
A1:When receiving the access request that the browser is initiated based on the virtual address, used with the browser The mode shaken hands establishes connection;
A2:After establishing successful connection, monitored using operating system nucleus and intercept that the browser sends out for setting When the HTTP access request messages of fixed end mouthful, the HTTP access requests by the browser for setting port jump to setting On webpage.
For example, the hook functions of the kernel kernels of (SuSE) Linux OS can be utilized, which to monitor, intercepts and captures end in step A2 Mouth is 80 HTTP GET request messages.
In addition, in the state of not connected internet and when the corresponding webpage of browser back-call outer net domain name, root According to existing caching mechanism, the access request that browser can be initiated according to the respective virtual address cached, at this point, directly adopting It is connect with being established with the mode that browser is shaken hands.
Optionally, the HTTP access requests by the browser for setting port in step A2 jump to setting net On page, including:
The http response message that the setting web page address information is carried by being returned to the browser, to make It states browser and jumps to the access setting webpage.
Such as it is specifically that the setting web page address information is filled in into the Location in 302 response messages of HTTP In field, it can be achieved with the browser jumping to the corresponding URL of the access setting webpage.The setting web page address is believed Breath can be gateway address information.
Innovation of the embodiment of the present invention introduces virtual address during routing forwarding, not connected in wireless routing device In the case of internet, when wireless routing device receives access request of the browser client based on virtual address, wireless routing Equipment replaces the corresponding server of the virtual address to be communicated with browser client as the agency of the server, browses Device user is considered that server corresponding with this virtual address communicates, and is communicated with wireless routing device actually.Nothing Line router is that browser is all redirected to a unified setting webpage such as net for the access of outer net domain name at this time The page of pass allows user to know the state of its failed cluster immediately, without being based on having cached in existing browser rs cache mechanism The page of presentation of information confused, promote the online experience of user.
Second embodiment of the invention, the present embodiment is roughly the same with the method and step of first embodiment, and difference lies in this The HTTP redirection method of inventive embodiments further includes the processing step about networking state.
The HTTP redirection method of the embodiment of the present invention is applied to wireless routing device, as shown in Fig. 2, this method includes Step in detail below:
Step S101 detects the connection status with internet in real time;The step for will pass through the entire of the embodiment of the present invention During HTTP redirection.
Step S102, in the state of not connected internet, the outer net domain name based on browse request parsing is to described clear Device of looking at returns to a virtual address corresponding with the outer net domain name;
Step S103, when the browser, which is based on the virtual address, initiates access request, by the access request weight It is directed on setting webpage.The particular content of step S101~S103 is shown in first embodiment.
Step S104 is stored in the outer net domain name of the browse request parsing in the state of not connected internet;
Step S105, in the state of having connected internet, the outer net domain name based on preservation is carried to the browser For the true address after corresponding parsing, redirected so that the browser is redirected based on the true address.
Specifically, in the state that user is not exited using browser, wireless routing device is by being not connected with the shape of internet State is transformed into the state of connection internet, at this point, the connection status with internet is still being detected in wireless routing device side in real time, Once it was found that connection internet, then parse to having preserved browse request in the state of not connected internet in time All outer net domain names parsed one by one, parsed particular by dns server is issued, will parsing obtain it is true Address returns to browser, so that browser accesses based on true address to obtain correct webpage information.
Optionally, in a kind of realization method of optimization of the embodiment of the present invention, the method further includes:
During providing the true address to the browser, for the outer net domain name of parsing failure, provides and set Determine the operation of parsing again of number.Do so after being directed to networking because network signal is weak and DNS server low-responses etc. because The case where element causes some outer net domain name mapping to fail increases the acquisition probability of true address, meets the upper of user as far as possible Net demand.
Further, the outer net domain name for parsing failure provides the parsing operation of setting number, including:
Legitimacy detection is carried out to the outer net domain name of parsing failure, the outer net domain name detected by legitimacy is provided Set the operation of parsing again of number.For example, legal outer net domain name establishes a white list, is filled by the white list Illegal outer net domain name, limited Internet resources can be occupied to avoid some illegal outer net domain names for forbidding access by doing so.
Optionally, in the realization method of another optimization of the embodiment of the present invention, the method further includes:
In the state of connecting internet, the outer net domain name of preservation, the virtual address and described true are established Correspondence between address;
When the virtual address of the browser based on caching initiates access request, institute is provided to the browser The corresponding true address of virtual address is stated, is redirected so that the browser is redirected based on the true address.
The another kind optimization the adaptable scene of realization method be:It is mutual that connection is at when being opened for browser When the corresponding webpage of virtual address described in the state and back-call of networking, due to user be cached with to be accessed it is outer The corresponding virtual address of domain name can directly be sent out using the virtual address according to existing browser using the mechanism of caching Access request is played, access request redirection is jumped to setting net by wireless routing device no longer as when failed cluster at this time Page, but described access request redirection is jumped into the corresponding webpage of true address.
The it is proposed virtual address and the one-to-one scheme of true address of innovation of the embodiment of the present invention, accomplish to monitor in real time The internet behavior of user is to obtain true address, under the influence of browser rs cache mechanism, letter of the user in the network coverage When number intensity less stable, or toggle inside and outside signal cover it is mobile in the case of, could be used that family accesses The page is smoothly opened when outer net.
Third embodiment of the invention, it is corresponding with first embodiment that a kind of HTTP redirection device is provided, it is applied to wireless Routing device, as shown in figure 3, described device, further includes consisting of part:
1) state detection module 100, for detecting the connection status with internet in real time;The execution time of this module During the entire HTTP redirection that will pass through the embodiment of the present invention.
2) failed cluster processing module 200, in the state of not connected internet, being parsed based on browse request Outer net domain name returns to a virtual address corresponding with the outer net domain name to the browser;When the browser is based on institute When stating virtual address initiation access request, the access request is redirected on setting webpage.
Specifically, failed cluster processing module 200, is used for:
When receiving the access request that the browser is initiated based on the virtual address, uses and hold with the browser The mode of hand establishes connection;
After establishing successful connection, monitored using operating system nucleus and intercept that the browser sends out for setting When the HTTP access request messages of port, the HTTP access requests by the browser for setting port jump to setting net On page.
The HTTP that port is 80 is intercepted and captured for example, being monitored using the hook functions of the kernel kernels of (SuSE) Linux OS GET request message.
In addition, in the state of not connected internet and when browser back-call outer net domain name, according to existing slow Deposit mechanism, the access request that browser can be initiated according to the corresponding virtual address cached, at this point, directly with browsing Device establishes connection by the way of shaking hands.
Optionally, the failed cluster processing module, is specifically used for:
The http response message that the setting web page address information is carried by being returned to the browser, to make It states browser and jumps to the access setting webpage.
Such as it is specifically that the setting web page address information is filled in into the Location in 302 response messages of HTTP In field, it can be achieved with the browser jumping to the corresponding URL of the access setting webpage.
The embodiment of the present invention is when wireless routing device is not connected with internet, and wireless routing device receives browser When access request of the user based on virtual address, wireless routing device replaces the corresponding server of the virtual address i.e. as should The agency of server communicates with browser client, browser client be considered server corresponding with this virtual address into Row communication, is communicated with wireless routing device actually.Wireless router is at this time browser for outer net domain name The page for being all redirected to a unified setting webpage such as gateway is accessed, user is allowed to know the state of its failed cluster immediately, Without being confused by the page based on the presentation of information cached in existing browser rs cache mechanism, the online of user is promoted Experience.
Fourth embodiment of the invention, the present embodiment is corresponding with second embodiment to provide a kind of HTTP redirection device, should The composition of device is roughly the same with 3rd embodiment, and difference lies in the HTTP reorientation methods of the embodiment of the present invention further include closing In the processing module of networking state.
The HTTP redirection device of the embodiment of the present invention is applied to wireless routing device, as shown in figure 4, described device, Including consisting of part:
1) state detection module 100, for detecting the connection status with internet in real time;The execution time of this module During the entire HTTP redirection that will pass through the embodiment of the present invention.
2) failed cluster processing module 200, in the state of not connected internet, being parsed based on browse request Outer net domain name returns to a virtual address corresponding with the outer net domain name to the browser;When the browser is based on institute When stating virtual address initiation access request, the access request is redirected on setting webpage.100 He of state detection module The above-mentioned function particular content of failed cluster processing module 200 is referring to 3rd embodiment.
In embodiments of the present invention, failed cluster processing module 200 is additionally operable to be stored in the state of not connected internet The outer net domain name of the browse request parsing;
3) networking processing module 300, in the state of having connected internet, the outer net domain name based on preservation The true address after corresponding parsing is provided to the browser, so that the browser carries out weight based on the true address Orientation redirects.
In embodiments of the present invention, in the state that user is not exited using browser, wireless routing device is by being not connected with The state of internet is transformed into the state of connection internet, at this point, the state detection module 100 of wireless routing device side still exists The connection status of detection and internet in real time, once find connection internet, then in time to having preserved in not connected internet In the state of all outer net domain names of browse request parsing parsed one by one, particular by issuing DNS (Domain Name System, domain name system) server is parsed, and the true address that parsing obtains is returned to browsing Device, so that browser accesses based on true address to obtain correct webpage information.
Optionally, in a kind of realization method of optimization of the embodiment of the present invention, networking processing module 300 is additionally operable to:
During providing the true address to the browser, for the outer net domain name of parsing failure, provides and set Determine the operation of parsing again of number.Do so after being directed to networking because network signal is weak and DNS server low-responses etc. because The case where element causes some outer net domain name mapping to fail increases the acquisition probability of true address, meets the upper of user as far as possible Net demand.
Further, networking processing module 300, is specifically used for:
Legitimacy detection is carried out to the outer net domain name of parsing failure, the outer net domain name detected by legitimacy is provided Set the operation of parsing again of number.For example, legal outer net domain name establishes a white list, is filled by the white list Illegal outer net domain name, limited Internet resources can be occupied to avoid some illegal outer net domain names for forbidding access by doing so.
Optionally, in the realization method of another optimization of the embodiment of the present invention, networking processing module 300 is also used In:
In the state of connecting internet, the outer net domain name of preservation, the virtual address and described true are established Correspondence between address;
When the virtual address of the browser based on caching initiates communication request, institute is provided to the browser The corresponding true address of virtual address is stated, is redirected so that the browser is redirected based on the true address.
The another kind optimization the adaptable scene of realization method be:It is mutual that connection is at when being opened for browser When the corresponding webpage of virtual address described in the state and back-call of networking, due to user be cached with to be accessed it is outer The corresponding virtual address of domain name can directly be sent out using the virtual address according to existing browser using the mechanism of caching Access request is played, access request redirection is jumped to setting net by wireless routing device no longer as when failed cluster at this time Page, but described access request redirection is jumped into the corresponding webpage of true address.
Fifth embodiment of the invention, a kind of wireless router, including memory, processor and it is stored in the memory Computer program that is upper and can running on the processor, the computer program realize the when being executed by the processor The step of HTTP redirection method described in one or two embodiments.
Sixth embodiment of the invention, the present embodiment are on the basis of the above embodiments, a sheet to be introduced in conjunction with attached drawing 5 The application example of invention.
Existing technology is easy to be influenced by browser rs cache, and user is caused to be beaten during accessing outer net The page is not opened, or opens the scene of the wrong page.Specifically, under the influence of existing browser rs cache, work as not closing In the case of preceding browser, browser can cache the IP address, after the networking state switching of wireless routing device, successive field Name access request will not quickly retransmit DNS request, but directly initiate TCP (Transmission with the IP of the caching Control Protocol, transmission control protocol) three-way handshake, the page being susceptible in this way before resting on can not open The phenomenon that correct page.
The embodiment of the present invention can overcome the problems, such as above-mentioned, monitor the internet behavior of user in real time and start corresponding Iptables routing forwarding rules so that for wireless routing device whether in the state of failed cluster or networking, access is wireless The user of routing device will not be influenced using the browser access page by browser rs cache.Using the embodiment of the present invention Technical solution after, the internet behavior of user is monitored by wireless routing device dynamic, is not only restricted to the influence of browser rs cache, The user of access wireless routing device can access the correct page, promote user experience.
As shown in figure 5, the flow that the present embodiment HTTP redirection executes, as follows:
Step S1:Wireless routing device detects this equipment networking state, and routing forwarding rule are initialized according to networking state Then, add or delete corresponding redirection forward rule.If failed cluster thens follow the steps S2, step S3, step S4, this portion Divide the technical solution under the not connected interconnection net state corresponding to first embodiment.If networking thens follow the steps S5, step S6, Step S7, this part correspond to the technical solution of second embodiment having connected under interconnection net state.
Step S2:Routing rule is initialized if current wireless routing device failed cluster, removes the routing added when networking Forward rule is redirected, according to the state of current wireless routing device failed cluster, notice kernel opens HTTP redirection gateway work( Can, and the HTTP request message redirecting that all purposes port is 80 ports is arrived into gateway address, it is step S3 simulation completion TCP three-way handshake is laid the groundwork.Three-way handshake between subsequent terminal side browser and virtual ip address is browser and nothing actually Interaction between line routing device, because only that after shaking hands successfully, browser can just issue the GET request message of HTTP, just The GET request message of the HTTP of intercepting and capturing is handled in step S4.
Step S3:Whether monitoring currently receives the DNS request that browser is directed to outer net domain name, and one is returned if receiving The virtual ip address that dynamic random generates, if directly carrying out TCP three-way handshake when browser is sent based on virtual ip address.
Step S4:The HTTP GET that destination interface is 80 are intercepted and captured by the hook Hook Functions of (SuSE) Linux OS kernel Request message, by the way of the conditional code of feedback HTTP 302, simulation dns server sets up the response of a HTTP 302 Gateway address is filled into location field so that browser is jumped to again in the URL of gateway by message.
Step S5:Routing rule is initialized if current wireless routing equipment networking, is redirected before networking is removed after networking To the rule of gateway address.
Step S6:(SuSE) Linux OS kernel is notified to close HTTP redirection gateway function according to networking state, and will All messages that the hook Hook Functions of (SuSE) Linux OS kernel obtain are let pass, without any processing.
Step S7:Wireless routing device resolves to the outer net domain name that browser access before networking is crossed corresponding true successively Real IP address, outer net domain name, virtual ip address, real IP address just have unique correspondence at this time.If there are outer domains Name parsing failure then preferably traverses the domain name of these parsing failures, legitimacy detection is first carried out, for legal Domain name gives the chance of DNS name resolution three times, the acquisition of the guarantee real IP address of bigger probability again.Finally addition is virtual Redirection of router forward rule under the corresponding real IP address of IP address prevents because the influence of browser rs cache can not be just Often open user's page to be accessed.
In embodiments of the present invention, (SuSE) Linux OS provides the work(that powerful routing forwarding and data flow are intercepted and captured Can, the message technology of HTTP is intercepted and captured with hook in conjunction with solving the problems, such as that the caching of browser DNS causes with routing forwarding, Redirecting agreement and realize corresponding redirection function by redirection of router forward rule and HTTP.
In the state of wireless routing device failed cluster, corresponding redirection forward rule is added, is forced all purposes Port is that the HTTP request of 80 ports is redirected to gateway, simulates the TCP three-way handshakes of all HTTP requests.If in Shipping Options Page When inputting some outer net domain name in interior address field, wireless routing device finds that network disconnects at this time, will return to one virtually IP address is to browser, and this virtual ip address is that dynamic random generates, corresponding to each outer net domain name of browser access Virtual ip address it is different, but be private network IP address.Browser server corresponding with this virtual ip address is led to It is reliable, it is that browser and wireless routing device are communicated, after completing TCP three-way handshake, in (SuSE) Linux OS kernel Face hangs a hook Hook Function, for monitoring the request message for intercepting and capturing HTTP, and using the conditional code of feedback HTTP 302 Mode so that the browser is redirected on the gateway page.
After wireless routing device networking, each domain name accessed before networking is resolved into the website successively and is corresponded to really IP address, outer net domain name, virtual ip address, real IP address just have unique correspondence at this time.It adds again simultaneously corresponding Redirection forward rule, the HTTP request for accessing virtual ip address is redirected to real IP address.And monitor solution in real time If analysis is as a result, because the factors such as network signal intensity and DNS server low-responses lead to some in wireless routing device after networking Outer net domain name fails to obtain true IP address, and carrying out dns resolution again to domain name in addition at this time obtains real IP address, Corresponding redirection forward rule is added, ensures that the HTTP request for accessing virtual ip address is redirected to real IP address.Ensure When the user of access wireless routing device can toggle under wireless routing device unconnected state and networking state, as long as Do not close current browser, so that it may not influenced by browser rs cache IP;It will not quickly be re-initiated in browser new In the case of DNS request, browser still can correctly show user's outer web page to be accessed.
Seventh embodiment of the invention, what is stored and executed in the computer storage media of the present embodiment asks weight to HTTP The flow of orientation with first or two embodiment it is identical.In Project Realization, the present embodiment can add required general hard by software The mode of part platform is realized, naturally it is also possible to which by hardware, but the former is more preferably embodiment in many cases.It is based on Such understanding, the flow that HTTP request of the invention redirects can embody in form of a computer software product, should Computer software product is stored in a computer storage media (such as ROM/RAM, magnetic disc, CD), including some instructions are used So that the HTTP request that an equipment (can be the network equipments such as wireless router) executes the embodiment of the present invention redirects Flow.
By the explanation of specific implementation mode, the technological means that predetermined purpose is taken should can be reached to the present invention And effect be able to more deeply and it is specific understand, however appended diagram is only to provide reference and description and is used, and is not used for pair The present invention limits.

Claims (16)

1. a kind of hypertext transfer protocol HTTP redirection method, which is characterized in that including:
The connection status of detection and internet in real time;
In the state of not connected internet, the outer net domain name based on browse request parsing to the browser return one with The corresponding virtual address of the outer net domain name;
When the browser, which is based on the virtual address, initiates access request, the access request is redirected to setting webpage On.
2. HTTP redirection method according to claim 1, which is characterized in that described when the browser is based on the void When access request is initiated in quasi- address, the access request is redirected on setting webpage, including:
When receiving the access request that the browser is initiated based on the virtual address, with the browser using the side shaken hands Formula establishes connection;
After establishing successful connection, monitored using operating system nucleus and intercept that the browser sends out for setting port When HTTP access request messages, the browser is jumped to for the HTTP access requests of setting port on setting webpage.
3. HTTP redirection method according to claim 2, which is characterized in that described that the browser is directed to setting end The HTTP access requests of mouth jump on setting webpage, including:
The http response message that the setting web page address information is carried by being returned to the browser, to make the browsing Device, which jumps to, accesses the setting webpage.
4. HTTP redirection method according to claim 1, which is characterized in that the method further includes:
It is stored in the outer net domain name of the browse request parsing in the state of not connected internet;
In the state of having connected internet, after the outer net domain name based on preservation provides corresponding parsing to the browser True address, redirected so that the browser is redirected based on the true address.
5. HTTP redirection method according to claim 4, which is characterized in that the method further includes:
During providing the true address to the browser, for the outer net domain name of parsing failure, setting time is provided Several operations of parsing again.
6. HTTP redirection method according to claim 5, which is characterized in that the outer domain for parsing failure Name provides the parsing operation of setting number, including:
Legitimacy detection is carried out to the outer net domain name of parsing failure, setting time is provided for the outer net domain name detected by legitimacy Several operations of parsing again.
7. HTTP redirection method according to claim 4, which is characterized in that the method further includes:
In the state of connecting internet, the outer net domain name, the virtual address and the true address of preservation are established Between correspondence;
When the virtual address of the browser based on caching initiates access request, provided to the browser described virtual The corresponding true address in address redirects so that the browser is redirected based on the true address.
8. a kind of HTTP redirection device, which is characterized in that including:
Networking detection module, for detecting the connection status with internet in real time;
Failed cluster processing module, in the state of not connected internet, the outer net domain name based on browse request parsing to The browser returns to a virtual address corresponding with the outer net domain name;When the browser is sent out based on the virtual address When playing access request, the access request is redirected on setting webpage.
9. HTTP redirection device according to claim 8, which is characterized in that the failed cluster processing module is used for:
When receiving the access request that the browser is initiated based on the virtual address, with the browser using the side shaken hands Formula establishes connection;
After establishing successful connection, monitored using operating system nucleus and intercept that the browser sends out for setting port When HTTP access request messages, the browser is jumped to for the HTTP access requests of setting port on setting webpage.
10. HTTP redirection device according to claim 9, which is characterized in that the failed cluster processing module is specific to use In:
The http response message that the setting web page address information is carried by being returned to the browser, to make the browsing Device, which jumps to, accesses the setting webpage.
11. HTTP redirection device according to claim 8, which is characterized in that the failed cluster processing module is additionally operable to It is stored in the outer net domain name of the browse request parsing in the state of not connected internet;
Described device further includes:
Networking processing module, in the state of having connected internet, the outer net domain name based on preservation is to the browsing Device provides the true address after corresponding parsing, is redirected so that the browser is redirected based on the true address.
12. HTTP redirection device according to claim 11, which is characterized in that the networking processing module is additionally operable to:
During providing the true address to the browser, for the outer net domain name of parsing failure, setting time is provided Several operations of parsing again.
13. HTTP redirection device according to claim 12, which is characterized in that the networking processing module is specific to use In:
Legitimacy detection is carried out to the outer net domain name of parsing failure, setting time is provided for the outer net domain name detected by legitimacy Several operations of parsing again.
14. HTTP redirection device according to claim 11, which is characterized in that the networking processing module is additionally operable to:
In the state of connecting internet, the outer net domain name, the virtual address and the true address of preservation are established Between correspondence;
When the virtual address of the browser based on caching initiates communication request, provided to the browser described virtual The corresponding true address in address redirects so that the browser is redirected based on the true address.
15. a kind of wireless routing device, including:
Communication module, for carrying out communication interaction with user side browser;
Memory, for being stored with HTTP redirection program;And
Processor, for executing the HTTP redirection program to realize the HTTP weights as described in any one of claim 1 to 7 The step of orientation method.
16. a kind of computer storage media, computer program, the computer program are stored on the computer storage media The step of HTTP redirection method as described in any one of claim 1 to 7 is realized when being executed by processor.
CN201810475748.5A 2018-05-17 2018-05-17 A kind of HTTP redirection method, apparatus, routing device and computer storage media Pending CN108712492A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810475748.5A CN108712492A (en) 2018-05-17 2018-05-17 A kind of HTTP redirection method, apparatus, routing device and computer storage media
PCT/CN2019/083604 WO2019218845A1 (en) 2018-05-17 2019-04-22 Hypertext transfer protocol redirecting method, device, routing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810475748.5A CN108712492A (en) 2018-05-17 2018-05-17 A kind of HTTP redirection method, apparatus, routing device and computer storage media

Publications (1)

Publication Number Publication Date
CN108712492A true CN108712492A (en) 2018-10-26

Family

ID=63868287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810475748.5A Pending CN108712492A (en) 2018-05-17 2018-05-17 A kind of HTTP redirection method, apparatus, routing device and computer storage media

Country Status (2)

Country Link
CN (1) CN108712492A (en)
WO (1) WO2019218845A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495600A (en) * 2018-11-19 2019-03-19 北京知道创宇信息技术有限公司 Website access method, device and readable storage medium storing program for executing
WO2019218845A1 (en) * 2018-05-17 2019-11-21 中兴通讯股份有限公司 Hypertext transfer protocol redirecting method, device, routing device and storage medium
CN113613274A (en) * 2021-09-01 2021-11-05 四川九州电子科技股份有限公司 Intelligent access configuration method based on Mesh networking
CN115118775A (en) * 2022-06-21 2022-09-27 杭州迪普科技股份有限公司 Method and device for processing browser access request and electronic equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111770168B (en) * 2020-06-28 2023-01-24 杭州迪普科技股份有限公司 Webpage redirection protection method and device and electronic equipment
CN114884730B (en) * 2022-05-07 2023-12-29 深信服科技股份有限公司 Request detection method, device, equipment and readable storage medium
CN115277837B (en) * 2022-07-22 2023-04-25 杭州迪普科技股份有限公司 Agent-based redirection method and device
CN115378905B (en) * 2022-07-22 2023-11-14 北京华顺信安科技有限公司 Domain name collection method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070289004A1 (en) * 2002-08-28 2007-12-13 International Business Machines Corporation Authenticated and communicating verifiable authorization between disparate network domains
CN101478387A (en) * 2008-12-31 2009-07-08 成都市华为赛门铁克科技有限公司 Defense method, apparatus and system for hyper text transmission protocol attack
CN101741769A (en) * 2008-11-25 2010-06-16 华为终端有限公司 Redirection method for gateway and webpage
US20120226819A1 (en) * 2011-03-02 2012-09-06 Dany Sylvain Local advertisement insertion through web request redirection
CN104243506A (en) * 2013-06-06 2014-12-24 中兴通讯股份有限公司 Browser redirection method and device
CN105592175A (en) * 2014-10-24 2016-05-18 中兴通讯股份有限公司 Method and apparatus for redirection to web page

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338072A (en) * 2015-10-20 2016-02-17 上海斐讯数据通信技术有限公司 HTTP (hyper text transport protocol) redirecting method and routing equipment
US10735954B2 (en) * 2016-09-02 2020-08-04 Blackberry Limited Method and device for facilitating authentication over a wireless network
CN108712492A (en) * 2018-05-17 2018-10-26 中兴通讯股份有限公司 A kind of HTTP redirection method, apparatus, routing device and computer storage media

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070289004A1 (en) * 2002-08-28 2007-12-13 International Business Machines Corporation Authenticated and communicating verifiable authorization between disparate network domains
CN101741769A (en) * 2008-11-25 2010-06-16 华为终端有限公司 Redirection method for gateway and webpage
CN101478387A (en) * 2008-12-31 2009-07-08 成都市华为赛门铁克科技有限公司 Defense method, apparatus and system for hyper text transmission protocol attack
US20120226819A1 (en) * 2011-03-02 2012-09-06 Dany Sylvain Local advertisement insertion through web request redirection
CN104243506A (en) * 2013-06-06 2014-12-24 中兴通讯股份有限公司 Browser redirection method and device
CN105592175A (en) * 2014-10-24 2016-05-18 中兴通讯股份有限公司 Method and apparatus for redirection to web page

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019218845A1 (en) * 2018-05-17 2019-11-21 中兴通讯股份有限公司 Hypertext transfer protocol redirecting method, device, routing device and storage medium
CN109495600A (en) * 2018-11-19 2019-03-19 北京知道创宇信息技术有限公司 Website access method, device and readable storage medium storing program for executing
CN109495600B (en) * 2018-11-19 2022-04-29 北京知道创宇信息技术股份有限公司 Website access method and device and readable storage medium
CN113613274A (en) * 2021-09-01 2021-11-05 四川九州电子科技股份有限公司 Intelligent access configuration method based on Mesh networking
CN113613274B (en) * 2021-09-01 2023-08-18 四川九州电子科技股份有限公司 Intelligent access configuration method based on Mesh networking
CN115118775A (en) * 2022-06-21 2022-09-27 杭州迪普科技股份有限公司 Method and device for processing browser access request and electronic equipment
CN115118775B (en) * 2022-06-21 2023-04-25 杭州迪普科技股份有限公司 Browser access request processing method and device and electronic equipment

Also Published As

Publication number Publication date
WO2019218845A1 (en) 2019-11-21

Similar Documents

Publication Publication Date Title
CN108712492A (en) A kind of HTTP redirection method, apparatus, routing device and computer storage media
US9444718B2 (en) Distributed platform test network
US20200007494A1 (en) Incompatible network gateway provisioned through dns
US9009222B2 (en) Verifying the transfer of a data file
CN104580192B (en) The treating method and apparatus of the network access request of application program
CN102790808B (en) A kind of domain name analytic method and system, a kind of client
CN109067914A (en) Proxy Method, device, equipment and the storage medium of Web service
Nasr et al. The waterfall of liberty: Decoy routing circumvention that resists routing attacks
US20070299965A1 (en) Management of client perceived page view response time
CN104468363B (en) Page reorientation method, routing device, terminal device and system
CN105743670B (en) Access control method, system and access point
Rhodes et al. Foundations of Python network programming
CN108270882A (en) The analysis method and device of domain name, storage medium, electronic device
CN108183975A (en) A kind of method and system of domain name mapping
Wee et al. Client-side load balancer using cloud
CN107273186A (en) Access method, physical host and the virtual machine of virtual machine server
CN107613037A (en) A kind of domain name reorientation method and system
US20130054817A1 (en) Disaggregated server load balancing
CN108667947B (en) A kind of method and device for the length reducing DNS response message
CN107181779A (en) Processing method, the device and system of access request
Bajpai et al. A longitudinal view of dual-stacked websites—failures, latency and happy eyeballs
RU2005141487A (en) RESTRICTED RESOURCES METHOD
CN114666245A (en) IPv6 single stack support degree determining method of B/S system and related equipment
CN110995763B (en) Data processing method and device, electronic equipment and computer storage medium
CN108769086A (en) A kind of method and apparatus for detecting man-in-the-middle attack by user equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181026