WO2013143403A1 - 一种访问网站的方法和*** - Google Patents

一种访问网站的方法和*** Download PDF

Info

Publication number
WO2013143403A1
WO2013143403A1 PCT/CN2013/072843 CN2013072843W WO2013143403A1 WO 2013143403 A1 WO2013143403 A1 WO 2013143403A1 CN 2013072843 W CN2013072843 W CN 2013072843W WO 2013143403 A1 WO2013143403 A1 WO 2013143403A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
domain name
request
server
target
Prior art date
Application number
PCT/CN2013/072843
Other languages
English (en)
French (fr)
Inventor
董斌雁
孙鹏
任寰
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Priority to US14/388,083 priority Critical patent/US9883002B2/en
Publication of WO2013143403A1 publication Critical patent/WO2013143403A1/zh

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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/563Data redirection of data network streams
    • 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]
    • 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/4552Lookup mechanisms between a plurality of directories; Synchronisation of directories, e.g. metadirectories
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/561Adding application-functional data or data for application control, e.g. adding metadata

Definitions

  • the present invention relates to the field of network technologies, and in particular, to a method and system for accessing a website. Background technique
  • the education network environment is more complicated. Some universities use CERNET access, and some universities use China Unicom, telecommunications, and mobile hybrid access. Due to restrictions in billing and the network itself, some universities have problems in accessing foreign websites.
  • the prior art solution is to set up a proxy server to deliver the browser's HTTP access request to the proxy server.
  • the proxy server is the server for the client and the client for the server. It is the intermediary between the actual client and the server.
  • the first is the web proxy server technology solution:
  • Web Proxy Server also known as online proxy server.
  • a web proxy server is a proxy server program that runs on a web page. It does not need any settings, and the input URL can be accessed by selecting a proxy server.
  • the web proxy server provides the client with a cache of web pages and files on the remote website, enabling the client to browse remote websites more quickly and securely. Some web proxy servers keep their daily updates, and access links are faster.
  • the principle of Web Proxy can be briefly summarized as: User Access - Web Proxy Server - Target Website - Return User.
  • the problem of setting the web page template and protocol usage of the web proxy server has the following disadvantages:
  • the web proxy server itself is a web page, there is a lot of content, so using a web proxy server consumes a lot of traffic, so the website providing the web proxy server is prone to run out of traffic or unstable; The proxy server will be slower than the normal internet.
  • each web proxy server website will advertise, and even more, the user will freeze the page after the user has been idle for a period of time. You must use the SRC to find the ad JavaScr i pt (script) (the s rc attribute is used to specify Picture location) can be solved.
  • the second type is a so-called transparent proxy server, that is, a proxy server, that is, a scheme in which the client directly accesses the target website through the proxy server.
  • the solution can be roughly described as follows: The client first establishes a connection with the proxy server, and then requests to establish a connection with the target server or obtain the specified resource of the target server according to the proxy server protocol used by the proxy server. This solution can solve the defects of the foregoing network proxy server.
  • the client uses the proxy server, and the client sends all local ht tp access requests to the proxy server, and the proxy server constructs a DNS (Domain Name System) request according to the ht tp access request. Query the IP of the target website, and then retrieve the content from the target website and return it to the client.
  • DNS Domain Name System
  • the present invention has been made in order to provide a method and system for accessing a website that overcomes the above problems or at least partially solves or alleviates the above problems.
  • a method for accessing a website including: constructing a first domain name query request according to a domain name in a webpage request of a client, and transmitting the request to a first domain name server; acquiring a first domain name server And the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address pool; and determining, according to the identifier IP address, a destination IP address corresponding to the domain name in the page request And replacing with the IP address of the proxy server; sending the webpage access request to the proxy server according to the IP address corresponding to the proxy server.
  • a method for accessing a website includes: receiving a first domain name query request sent by a client; constructing a second domain name query request according to the first domain name query request, and sending the second domain name query After obtaining the response of the second domain name server, parsing the target IP address corresponding to the response; the target IP address corresponding to the domain name requested by the webpage; Determining whether the IP address is in a predetermined IP address library; and determining an IP address according to the judgment result; the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address Address library; return the identified IP address to the client.
  • an apparatus for accessing a website including: a domain name reconfiguration module, configured to construct a first domain name query request according to a domain name in a webpage request of a client, and send the first domain name query request
  • the first domain name server is configured to obtain an identifier IP address returned by the first domain name server, and the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address pool;
  • a module configured to determine, according to the identifier IP address, a destination IP address corresponding to the domain name in the page request is replaced with an IP address of the proxy server; and sending the webpage access request to the proxy according to the IP address corresponding to the proxy server server.
  • an apparatus for accessing a website including: a domain name query request receiving module, configured to receive a first domain name query request sent by a client; and a domain name query request processing module, configured to a domain name query request constructs a second domain name query request, and sends the second domain name query request to the second domain name server; the domain name query request response processing module is configured to: after obtaining the second domain name server response, parse the target IP address corresponding to the response; The address corresponds to the domain name requested by the webpage; the target IP address judging module determines whether the IP address is in the predetermined IP address pool according to the predetermined IP address library; and generates an identification IP address according to the judgment result; the identifier IP address is used for Identifying whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address library; and returning a module, configured to return the identifier IP address to the client.
  • a computer program comprising computer readable code causing the server to perform any of claims 1-12 when run on a server The method of accessing the website.
  • a computer readable medium wherein the computer program according to claim 25 is stored.
  • the first domain name request is configured according to the domain name in the webpage request in the webpage request of the client, and the first domain name request is sent to the first domain name server, and the first domain name is The server determines whether the target IP address corresponding to the domain name is a predetermined IP address library, and notifies the client according to the determination result whether to replace the target IP corresponding to the domain name in the page request with the IP address of the proxy server.
  • the accessed page uses the proxy server, which reduces the load on the proxy server and improves the performance of the proxy server.
  • FIG. 1 is a schematic flowchart of a method for accessing a website according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for accessing a website corresponding to FIG. 1 according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an apparatus for accessing a website according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an apparatus for accessing a website corresponding to FIG. 3 according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of a system for accessing a website according to an embodiment of the present application
  • FIG. 6 is a block diagram schematically showing a server for executing a method according to the present invention
  • Figure 7 schematically illustrates a memory unit for holding or carrying program code that implements the method in accordance with the present invention.
  • Step 110 Construct a first domain name query request according to a domain name in a webpage request of a client, and send the request to the first domain name server. .
  • the first domain name server (first DNS server), and the proxy server may be set in advance.
  • the first domain name server is configured to obtain a first domain name query request sent by the client, that is, a target IP address corresponding to the domain name in the DNS query request.
  • a domain name server the principle of its work is generally as follows:
  • Step 1 Client A proposes a domain name resolution request and sends the request to the local domain name server.
  • Step 2 When the local domain name server receives the request, it first queries the local cache. If there is this record, the local domain name server directly returns the result of the query.
  • the third step if the local cache does not have the record, the local domain name server directly sends the request to the root domain name server, and then the root domain name server returns the primary domain name of the domain (the subdomain of the root) of the local domain name server. The address of the server.
  • Step 4 The local server sends a request to the domain name server returned in the previous step, and then accepts the requested server to query its own cache. If there is no such record, it returns the address of the related subordinate domain name server.
  • Step 5 Repeat step 4 until you find the correct record.
  • Step 6 The local domain name server saves the returned results to the cache for the next use and returns the results to client A.
  • the client A generally obtains the IP corresponding to the final domain name only from the first domain name server that receives the domain name query request of the client A.
  • the client itself usually sets the default local domain name server.
  • the client sends an HTTP request, it first queries the default local domain name server to obtain the IP address corresponding to the domain name in the HTTP request.
  • the application first intercepts the webpage request of the client, constructs a first domain name query request according to the domain name in the HTTP request of the client, and sends the first domain name query request to the first domain name server.
  • the optimal DNS IP can be quickly resolved, and the default DNS server is not in the education network. Resolve network latency problems caused by excessive DNS IP paths.
  • the client parses the domain name in the HTTP request, and constructs a DNS request based on the domain name to be sent to the first domain name server.
  • constructing the first domain name query request according to the domain name in the webpage request of the client, and sending the request to the first domain name server includes:
  • Step S111 hooking the system domain name query function by using a hook function
  • the Detours library provided by Microsoft can be used to implement Hook, that is, the system domain name query function getaddrinfo is hooked by a hook function.
  • the domain name query function getaddrinfo can be used for domain name resolution services, such as: Translating the corresponding IP address of www.***.com for network programs Connected.
  • the domain name query function getaddrinfo can also construct a DNS A or AAAA command according to the RFC1035 protocol, send it to the DNS server, and resolve the response returned by the DNS server to parse out the IP list.
  • the first IP address in the IP list is selected as the domain name. IP address.
  • the directional transmission of the DNS query request can be implemented through the hook domain name query function.
  • Step S112 constructing a first domain name query request by using a domain name query function for the domain name in the webpage request of the client;
  • the first domain name query request is constructed based on the IP address of the local client and the IP address of the first domain name server preset in the application, and in practice, the port structure of the first domain name server is also combined.
  • the first domain name query request is constructed based on the IP address of the local client and the IP address of the first domain name server preset in the application, and in practice, the port structure of the first domain name server is also combined. The first domain name query request.
  • the response is constructed by the IP address of the client and the IP address of the first domain name server, and the response is returned to the client.
  • FIG 2b an example of a DNS response is shown.
  • Step S113 Send the first domain name query request to the first domain name server. After the client domain name query function constructs the first domain name query request, the first domain name query request is sent to the first domain name server.
  • the method when the first domain name query request is sent to the first domain name server, the method includes: Step S11: Send the domain name query request to the first domain name server by using an asynchronous I/O mechanism.
  • some firewalls can disable other DNS servers except the DNS IP specified by the firewall. For example, because 80 ports are bound, the general firewall will mistakenly think of HTTP traffic, so you can break through similar rules.
  • the asynchronous I/O mechanism includes an I/O completion port mechanism. That is, the I/OCP mechanism is used to asynchronously send DNS query requests to the DNS server.
  • the Windows operating system provides asynchronous I/O mechanisms for asynchronous selection (WSAAsyncSelect), event selection (WSAEventSelect), overlapping I/O (Overlapped I/O), and completion port (Completl/On Port). Therefore, other mechanisms in the above asynchronous mechanism can also be used in this application.
  • This application preferably uses the I/O completion port mechanism, and the "complete port” mechanism is by far the most complex I/O mechanism. However, if an application needs to manage a large number of sockets at the same time, then this mechanism can be used to achieve optimal system performance.
  • Socket I/O For overlapping I/O: The release of Winsock2 makes Socket I/O and file I/O An interface. Socket I/O can be done by using the Win32 file manipulation functions ReadFile and WriteFile. Thus, the overlapping I/O mechanism and the completion port mechanism for normal file I/O are also applicable to Socket I/O. The advantage of this mechanism is that it can achieve better system performance, but the implementation is more complicated.
  • This mechanism is an asynchronous I/O mechanism provided by Winsock. With this mechanism, applications can receive network event notifications based on Windows messages on a single socket. The specific approach is to call the WSAAsyncSelect function after building a socket.
  • This mechanism is an asynchronous I/O mechanism provided by Winsock. It is similar to the asynchronous selection mechanism, allowing applications to receive event-based network event notifications on one or more sockets.
  • the application may further include: when the first domain name query request is sent to the first domain name server:
  • Step P111 Synchronize the domain name query request to the first domain name server.
  • Step 120 Obtain an identifier IP address returned by the first domain name server.
  • the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address pool.
  • the processing process of the first domain name server includes:
  • Step A1 receiving a first domain name query request sent by the client
  • the first domain name server when receiving the first domain name query request, may obtain a target IP address corresponding to the domain name in the client HTTP request according to the DNS query mechanism.
  • the first domain name server first obtains the first domain name query request sent by the client.
  • Step A2 constructing a second domain name query request according to the first domain name query request, and sending the request to the second domain name server;
  • the first domain name server generally does not have the function of querying the target IP address corresponding to the domain name, and needs to be forwarded to the second domain name server having the actual query function to query the target IP address corresponding to the domain name. 4 Query the IP address corresponding to the domain name according to the corresponding routing path.
  • constructing the second domain name query request according to the first domain name query request, and sending to the second domain name server includes:
  • Step A21 parsing the first domain name query request, obtaining the domain name requested by the webpage; after receiving the first domain name query request, the first domain name server parses the client from the first domain name query request according to the resolution protocol domain name.
  • Step A22 Construct a second domain name query request according to the domain name query protocol based on the domain name; Step A23: Send the second domain name query request to the second domain name server.
  • the preset first domain name server itself is generally not responsible for querying and resolving the target IP address corresponding to the domain name, but constructing a second domain name query request according to the domain name, and sending the request to the second domain name server,
  • the second domain name server obtains a response including the IP corresponding to the domain name.
  • the second domain name server is generally the domain name server where the first domain name server is located or specified and has a DNS query function.
  • the second domain name server may obtain the IP corresponding to the domain name according to the foregoing DNS query mechanism, and then generate a response and return it to the first domain name server.
  • the second domain name server can also be set as a domain name server with a DNS query function.
  • Step A3 After obtaining the response of the second domain name server, parsing the target IP address corresponding to the response; the target IP address corresponding to the domain name requested by the webpage;
  • the second server After the second server obtains the IP corresponding to the domain name, a response including the IP is generated, and then the first domain name server parses the response, and obtains an IP address corresponding to the domain name.
  • Step A4 combining the predetermined IP address pool, determining whether the IP address is in a predetermined IP address library; generating an identification IP address according to the judgment result; the identifier IP address is used to identify a target corresponding to the domain name in the webpage request Whether the IP address belongs to a predetermined IP address library.
  • the method when generating the identifier IP address, the method includes:
  • Step A31 Perform a matching calculation with the predetermined IP address pool based on the target IP address.
  • Step A32 if it is in the predetermined IP address library, return an identifier IP indicating that the target IP address belongs to a predetermined IP address library. Address to the client;
  • Step A33 If not in the predetermined IP address pool, return an identifier IP address indicating that the target IP address does not belong to the predetermined IP address library to the client.
  • the first domain name server of the present application After obtaining the IP address corresponding to the domain name in the client HTTP request, the first domain name server of the present application combines the predetermined IP address database to determine, and then generates an identification IP address based on the judgment result and returns the client.
  • the target IP address corresponding to the domain name is identified by using an identifier IP address. For example, if the target IP address corresponding to the domain name is a domestic IP address, and the IP address is 0.0.0.0, the destination IP address corresponding to the domain name is a domestic IP address.
  • the application may also identify in other ways whether the IP address of the domain name is a Chinese IP address segment, which is not limited in this application.
  • the IP address pool is a Chinese IP address segment
  • the target IP address is returned to the client as the identifier IP address.
  • the method includes:
  • Step A3 If the target IP address belongs to a Chinese IP address segment, return an identifier IP address indicating that the IP address is a Chinese IP address segment to the client;
  • the first domain name server determines that the target IP address corresponding to the domain name is a Chinese IP address segment
  • a response including an IP address of 0.0.0.0 is returned to the client. It is also possible to return responses to other specified forms including the identification IP address to the client.
  • Step A4 If the target IP address does not belong to the Chinese IP address segment, the IP address is returned to the client as the identifier IP address.
  • Step 130 Determine, according to the identifier IP address, replacing the target IP address corresponding to the domain name in the page request with the IP address of the proxy server; and sending the webpage access request to the proxy server according to the IP address corresponding to the proxy server.
  • the client After receiving the response including the identifier IP address returned by the first domain name server, the client analyzes the identifier IP address of the response, and determines whether it belongs to the predetermined IP address pool according to the form of the identifier IP address.
  • the target IP address corresponding to the domain name in the client page request belongs to the predetermined IP address library; when the target IP address corresponding to the domain name in the client page request belongs to the predetermined IP address library, the target corresponding to the domain name in the client page request is retained. IP address; when the target IP address corresponding to the domain name in the client page request does not belong to the predetermined IP address library, the destination IP address corresponding to the domain name in the client page request is replaced with the IP address of the proxy server. In this way, the client can access the website outside the predetermined IP address library through the proxy.
  • the determining according to the identifier IP address includes:
  • Step S131 when the identifier IP address indicates that the target IP address does not belong to the Chinese IP address segment, replace the target IP address corresponding to the domain name in the page request with the IP address of the proxy server; Step S131, when the identifier IP address If the target IP address belongs to the Chinese IP address segment, the target IP address corresponding to the domain name in the page request is reserved.
  • the IP address is generally determined according to the client and the first domain name server.
  • the definition of the form of the address is judged. For example, in the foregoing example, if the identifier IP address parsed into the response is 0.0.0.0, the client can determine that the target IP address corresponding to the domain name is a Chinese IP address segment; If the IP address is not 0.0.0.0, then the destination IP address corresponding to the domain name is determined to be an address outside the Chinese IP address segment. The address segment where the client is located belongs to the Chinese IP address segment.
  • the target IP address of the page request is replaced with the IP address of the proxy server, that is, the page request is originally the target IP address corresponding to the domain name in the access page request. At this time, the page request accesses the IP address of the proxy server.
  • the above replacement is not performed, and the webpage request is accessed according to the target IP address requested by the page. That is, the page request directly accesses the target IP address corresponding to the domain name according to the page request.
  • the target IP address of the page request is replaced by the domain name query function with the IP address of the proxy server.
  • Step 140 Send a webpage access request corresponding to the foreign IP address to the proxy server according to the IP address corresponding to the proxy server.
  • the client can access the page request of the predetermined IP address library and forward it to the proxy server for access.
  • the method includes:
  • Step C1 adding a verification protocol to the webpage request of the client
  • Step C2 When the proxy server receives the webpage request, verify, according to the verification protocol, whether the client has access to the proxy server.
  • the client when the client sends a page request to the proxy server, according to the agreement with the proxy server, the protocol is verified in the request to ensure the security of the content requested by the page.
  • Step 210 Receive a first domain name query request sent by a client;
  • Step 220 Construct a second domain name query request according to the first domain name query request, and send the request to the second domain name server.
  • Step 230 After obtaining the response of the second domain name server, parse the target IP address corresponding to the response; the target IP address corresponds to the domain name requested by the webpage;
  • Step 240 Determine, according to the predetermined IP address library, whether the IP address is in a predetermined IP address library, and generate an identification IP address according to the determination result; the identifier IP address is used to identify the webpage. Whether the target IP address corresponding to the domain name in the request belongs to a predetermined IP address library;
  • Step 250 Return the identified IP address to the client.
  • constructing the second domain name query request according to the first domain name query request, and sending the message to the second domain name server includes:
  • Step L1 parsing the first domain name query request, obtaining the domain name requested by the webpage; Step L2, constructing a second domain name query request according to the domain name query protocol based on the domain name; Step L3, sending the second domain name query request To the second domain name server.
  • the method when generating the identifier IP address, the method includes:
  • Step M1 performing a matching calculation with the predetermined IP address library based on the target IP address;
  • Step M2 if in the predetermined IP address library, returning an identifier IP indicating that the target IP address belongs to a predetermined IP address library Address to the client;
  • Step M3 if not in the predetermined IP address pool, return an identification IP address indicating that the target IP address does not belong to the predetermined IP address library to the client.
  • the target IP address is returned to the client as the identifier IP address.
  • FIG. 3 it is a schematic structural diagram of an apparatus for accessing a website according to the present application, including: a client 410, where the client includes:
  • the domain name reconfiguration module 411 is configured to construct a first domain name query request according to the domain name in the webpage request of the client, and send the first domain name query request to the first domain name server;
  • the address obtaining module 412 is configured to obtain an identifier IP address returned by the first domain name server, where the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address pool;
  • the determining module 413 is configured to: according to the identifier IP address, determine, by replacing the target IP address corresponding to the domain name in the page request with the IP address of the proxy server; and sending the webpage access request according to the IP address corresponding to the proxy server To the proxy server.
  • the domain name reconstruction module includes:
  • a request construction submodule configured to construct a first domain name query request by using a domain name query function for a domain name in a webpage request of the client;
  • a request sending submodule configured to send the first domain name query request to the first domain name server.
  • the method includes: sending the domain name query request to the first domain name server by using an asynchronous I/O mechanism.
  • the asynchronous I/O mechanism includes an I/O completion port mechanism.
  • the predetermined IP address library is a Chinese IP address segment.
  • the determining module includes:
  • a first determining sub-module configured to: when the identifier IP address indicates that the target IP address does not belong to a Chinese IP address segment, replace the target IP address corresponding to the domain name in the page request with the IP address of the proxy server;
  • a second determining sub-module configured to: when the identifier IP address indicates that the target IP address belongs to a Chinese IP address segment, retain a target IP address corresponding to the domain name in the page request.
  • the method when the webpage access request is sent to the proxy server according to the IP address corresponding to the proxy server, the method includes:
  • a security setting module configured to add a verification protocol to the webpage request of the client; when the proxy server receives the webpage request, verify, according to the verification protocol, whether the client has access to the Proxy server.
  • determining, according to the identifier IP address, that the target IP address corresponding to the domain name in the page request is replaced by the IP address of the proxy server includes:
  • the destination IP address corresponding to the domain name in the page request is replaced by the domain name query function with the IP address of the proxy server.
  • the proxy server is in an education network.
  • FIG. 4 it is a schematic structural diagram of an apparatus for accessing a website according to the present application, including: a first domain name server 510, where the domain name server includes:
  • the domain name query request receiving module 511 is configured to receive a first domain name query request sent by the client; the domain name query request processing module 512 is configured to construct a second domain name query request according to the first domain name query request, and send the second domain name query request Server
  • the domain name query request response processing module 513 is configured to: after obtaining the response of the second domain name server, parse the target IP address corresponding to the response; the target IP address corresponds to the domain name requested by the webpage; the target IP address determining module 514, in combination with the predetermined
  • the IP address library is configured to determine whether the IP address is in a predetermined IP address library; and the identification IP address is generated according to the judgment result; the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined The IP address library; a return module 515, configured to return the identifier IP address to the client.
  • the domain name query request processing module includes: a parsing sub-module, configured to parse the first domain name query request, obtain the domain name requested by the webpage; and construct a sub-module, configured to construct a second domain name query request according to the domain name query protocol based on the domain name;
  • the domain name query request response processing module includes:
  • a matching calculation module configured to perform a matching calculation with the predetermined IP address pool based on the target IP address
  • a first identifier IP address returning module configured to return, if in the predetermined IP address pool, an identifier IP address indicating that the target IP address belongs to a predetermined IP address pool to the client;
  • a second identifier IP address returning module configured to return an identifier IP address indicating that the target IP address does not belong to the predetermined IP address pool to the client if not in the predetermined IP address pool.
  • the second identifier IP address returning module is configured to: if not in the Chinese IP address segment, return the target IP address as an identifier IP address to the client. .
  • FIG. 5 a schematic structural diagram of a system for accessing a website according to the present application is shown, including: a client 610, a first domain name server 620, and a proxy server 630;
  • Client 610 the client includes:
  • the domain name reconfiguration module 611 is configured to construct a first domain name query request according to the domain name in the webpage request of the client, and send the first domain name query request to the first domain name server;
  • the address obtaining module 612 is configured to obtain an identifier IP address returned by the first domain name server, where the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address pool;
  • the determining module 613 is configured to determine, according to the identifier IP address, that the target IP address corresponding to the domain name in the page request is replaced with the IP address of the proxy server 630; and the webpage access is performed according to the IP address corresponding to the proxy server 630.
  • the request is sent to the proxy server 630;
  • the first domain name server 620 includes:
  • the domain name query request receiving module 621 is configured to receive a first domain name query request sent by the client; the domain name query request processing module 622 is configured to construct a second domain name query request according to the first domain name query request, and send the second domain name query request Server
  • the domain name query request response processing module 623 is configured to: after obtaining the response of the second domain name server, parse the target IP address corresponding to the response; the target IP address corresponds to the domain name requested by the webpage; the target IP address determining module 624, combined with the predetermined IP address library, determining whether the IP address is In the predetermined IP address library, the identifier IP address is generated according to the judgment result; the identifier IP address is used to identify whether the target IP address corresponding to the domain name in the webpage request belongs to a predetermined IP address library; and the returning module 625 is used to Return the identified IP address to the client.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the means for accessing a website in accordance with an embodiment of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • an application server conventionally includes a processor 610 and a computer program product or computer readable medium in the form of a memory 620.
  • the memory 620 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 620 has a memory space 630 for program code 631 for performing any of the method steps described above.
  • storage space 630 for program code may include various program code 631 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 620 in the server of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 63, ie, code that can be read by a processor, such as 610, which, when executed by the server, causes the server to perform various steps in the methods described above. Step.
  • an embodiment or “one or more embodiments” as used herein means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least one embodiment of the invention. Moreover, it is noted that the examples of the words “in one embodiment” herein are not necessarily all referring to the same embodiment.
  • any reference signs placed between parentheses shall not be construed as a limitation.
  • the word “comprising” does not exclude the presence of the elements or steps that are not in the claims.
  • the word “a” or “an” preceding a component does not exclude the presence of a plurality of such elements.
  • the invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item.
  • the use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Library & Information Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种访问网站的方法和装置,涉及网络技术领域。所述方法包括:根据客户端的网页请求中的域名构造第一域名查询请求,并将所述请求发送至第一域名服务器;获取第一域名服务器返回的标识IP地址;所述标识IP地址用于标识所述网页请求中域名对应的目标IP地址是否属于预定IP地址库;根据所述标识IP地址判断出将页面请求中域名对应的目标IP地址替换为代理服务器的IP地址;则根据所述代理服务器对应的IP地址,将所述网页访问请求发送至代理服务器。对于客户端可以通过自身直接访问的网页请求,则不用通过代理服务器访问,而客户端需要通过代理服务器访问的页面才采用代理服务器,降低了代理服务器的负载,提高了代理服务器的性能。

Description

一种访问网站的方法和***
技术领域
本发明涉及网络技术领域, 特别是涉及一种访问网站的方法和***。 背景技术
教育网环境比较复杂, 有的高校是全部釆用 CERNET接入, 有的高校釆 用联通、 电信、 移动混合接入方式。 由于计费和网络本身方面的限制, 部分 高校存在不能访问国外网站问题。 现有技术方案是搭建代理服务器, 将浏览 器的 HTTP访问请求投递给代理服务器。代理服务器对客户端来说是服务器, 对服务器端来说是客户端, 在实际的客户端和服务器端做中介。
现有技术中, 存在两种代理服务器方法:
第一种是, 网页代理服务器技术方案:
网页代理服务器英文全称是 Web Proxy Server ,又称为在线代理服务器。 网页代理服务器是一种在网页上运行的代理服务器程序, 其不用任何设置, 输入网址选择好代理服务器便可以访问。 网页代理服务器给客户端提供远程 网站上的网页和文件的高速緩存,使客户端可以更加快速安全的浏览远程网 站。 一些网页代理服务器网站保持每天更新, ***速度也是比较快的。 网页代理服务器(Web Proxy)原理可以简单的概述为:用户访问 -网页代理服 务器 -目标网站 -返回用户。但^^于网页代理服务器的网页模板和协议使用 等设置问题, 其存在以下缺点:
1 ) 因为网页代理服务器本身就是一个网页, 其中存在很多内容, 所以 使用网页代理服务器会消耗很大的流量, 所以提供网页代理服务器的网站很 容易出现流量用完或不稳定的状况; 另外使用网页代理服务器的速度会比正 常的上网慢。
2 )基本上各网页代理服务器网站都会刊登广告, 更甚者会在用户闲置 一段时间后出现冻结页面的广告, 必须使用找出该广告 JavaScr i pt (脚本) 的 SRC ( s rc属性用来指定图片位置) 才能解决。
3 ) 由于网页代理服务器釆用的协议设置和模板的限制, 在通过网页代 理服务器访问其他网站时, 访问较高级的如 AJAX可能不会正常, 比如补充 内容、 发表意见、 交付投票等项目可能会出现问题, 另外, 使用网页代理服 务器时会有样式无法显示或显示异常等状况。
第二种, 是所谓透明代理服务器, 即通过代理服务器, 即客户端通过代 理服务器直接访问目标网站的方案。 本方案大致可描述为: 客户端首先与代 理服务器建立连接, 接着根据代理服务器所使用的代理服务器协议, 请求对 目标服务器建立连接、 或者获得目标服务器的指定资源。 本方案可以解决前 述网络代理服务器的缺陷。
但是, 该方案中, 一旦客户端使用代理服务器, 客户端会将本地所有 的 ht tp访问请求发送给代理服务器,代理服务器在根据 ht tp访问请求构建 DNS (域名***, Doma in Name Sys tem )请求, 查询目标网站的 IP, 然后从 目标网站获取相应内容返回至用户端, 如此, 由于所有 ht tp请求全部投递 给代理服务器, 而导致代理服务器负载过大, 降低代理服务器性能。 即现有 技术中, 如果客户端的 IP属于预定 IP地址库, 而该客户端又不能直接访问 预定 IP地址库外的网站时, 若客户端釆用代理服务器访问 IP地址库外的网 站, 那么现有技术中, 一旦客户端釆用代理, 则客户端所有的 HTTP访问请 求均会通过代理服务器转发和接收, 由于所有 ht tp请求全部投递给代理服 务器, 而导致代理服务器负载过大, 降低代理服务器性能。 发明内容
鉴于上述问题, 提出了本发明以便提供一种克服上述问题或者至少 部分地解决或者减緩上述问题的访问网站的方法和***。
根据本发明的一个方面, 提供了一种访问网站的方法, 包括: 根据客 户端的网页请求中的域名构造第一域名查询请求, 并将所述请求发送至第一 域名服务器; 获取第一域名服务器返回的标识 IP地址; 所述标识 IP地址用 于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库; 根 据所述标识 IP地址判断出将页面请求中域名对应的目标 IP地址替换为代理 服务器的 IP地址; 则根据所述代理服务器对应的 IP地址, 将所述网页访问 请求发送至代理服务器。
根据本发明的另一个方面, 提供了一种访问网站的方法, 包括接收客 户端发送的第一域名查询请求; 根据所述第一域名查询请求构造第二域名查 询请求, 并发送至第二域名服务器; 获得第二域名服务器响应后, 解析所述 响应对应的目标 IP地址; 所述目标 IP地址对应所述网页请求的域名; 结合 预定 IP地址库, 判断所述 IP地址是否在预定 IP地址库内; 根据判断结果, 生成标识 IP地址; 所述标识 IP地址用于标识所述网页请求中域名对应的目 标 IP地址是否属于预定 IP地址库; 将所述标识 IP地址返回至客户端。
根据本发明的一个方面, 提供了一种访问网站的装置, 包括: 域名重 构模块, 用于根据客户端的网页请求中的域名构造第一域名查询请求, 并将 所述第一域名查询请求发送至第一域名服务器; 地址获取模块, 用于获取第 一域名服务器返回的标识 IP地址; 所述标识 IP地址用于标识所述网页请求 中域名对应的目标 IP地址是否属于预定 IP地址库; 判断模块, 用于根据所 述标识 IP地址判断出将页面请求中域名对应的目标 IP地址替换为代理服务 器的 IP地址; 则根据所述代理服务器对应的 IP地址, 将所述网页访问请求 发送至代理服务器。
根据本发明的另一方面, 提供了一种访问网站的装置, 包括: 域名查 询请求接收模块, 用于接收客户端发送的第一域名查询请求; 域名查询请求 处理模块, 用于根据所述第一域名查询请求构造第二域名查询请求, 并发送 至第二域名服务器; 域名查询请求响应处理模块, 用于获得第二域名服务器 响应后, 解析所述响应对应的目标 IP地址; 所述目标 IP地址对应所述网页 请求的域名; 目标 IP地址判断模块, 结合预定 IP地址库, 判断所述 IP地址 是否在预定 IP地址库内; 根据判断结果, 生成标识 IP地址; 所述标识 IP地 址用于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库; 返回模块, 用于将所述标识 IP地址返回至客户端。
根据本发明的又一个方面, 提供了一种计算机程序, 其包括计算机 可读代码, 当所述计算机可读代码在服务器上运行时, 导致所述服务器 执行根据权利要求 1-12中的任一个所述的访问网站的方法。
根据本发明的再一个方面, 提供了一种计算机可读介质, 其中存储 了如权利要求 25所述的计算机程序。
本发明的有益效果为:
本申请在客户端中, 对于客户端的网页请求, 根据客户端的网页请求中 网页请求中的域名构造第一域名请求, 将所述第一域名请求发送至第一域名 服务器, 通过所述第一域名服务器判断所述域名对应的目标 IP地址是否为 预定 IP地址库, 根据判断结果通知客户端决定是否将页面请求中域名对应 的目标 IP替换为代理服务器的 IP。 如此, 对于客户端可以通过自身直接访 问的网页请求, 则不用通过代理服务器访问, 而客户端需要通过代理服务器 访问的页面才釆用代理服务器, 降低了代理服务器的负载, 提高了代理服务 器的性能。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的 技术手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上述 和其它目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施 方式。 附图说明
通过阅读下文优选实施方式的详细描述, 各种其他的优点和益处对 于本领域普通技术人员将变得清楚明了。 附图仅用于示出优选实施方式 的目的, 而并不认为是对本发明的限制。 而且在整个附图中, 用相同的 参考符号表示相同的部件。 在附图中:
图 1是依据本申请的一个实施例的访问网站的方法的流程示意图; 图 2是依据本申请的一个实施例的对应于图 1的一种访问网站的方法的 流程示意图;
图 3是依据本申请的一个实施例的一种访问网站的装置的结构示意图; 图 4是依据本申请的一个实施例的对应于图 3的一种访问网站的装置的 结构示意图;
图 5是依据本申请的一个实施例的一种访问网站的***的结构示意图; 图 6 示意性地示出了用于执行根据本发明的方法的服务器的框图; 以及
图 7 示意性地示出了用于保持或者携带实现根据本发明的方法的程 序代码的存储单元。 具体实施例
下面结合附图和具体的实施方式对本发明作进一步的描述。
参照图 1 , 示出了本申请一种访问网站的方法的流程示意图, 包括: 步骤 110, 根据客户端的网页请求中的域名构造第一域名查询请求, 并 将所述请求发送至第一域名服务器。
在本申请中, 可预先设置第一域名服务器(第一 DNS服务器) , 和代 理服务器。其中,第一域名服务器用于获取客户端发送的第一域名查询请求, 即 DNS查询请求中域名对应的目标 IP地址。 对于域名服务器, 其工作的原理一般如下:
第一步: 客户机 A提出域名解析请求,并将该请求发送给本地的域名服 务器。
第二步: 当本地的域名服务器收到请求后,就先查询本地的緩存,如果有 该纪录项,则本地的域名服务器就直接把查询的结果返回。
第三步:如果本地的緩存中没有该纪录,则本地域名服务器就直接把请求 发给根域名服务器,然后根域名服务器再返回给本地域名服务器一个所查询 域 (根的子域)的主域名服务器的地址。
第四步:本地服务器再向上一步返回的域名服务器发送请求,然后接受请 求的服务器查询自己的緩存,如果没有该纪录,则返回相关的下级的域名服务 器的地址。
第五步: 重复第四步,直到找到正确的纪录。
第六步: 本地域名服务器把返回的结果保存到緩存,以备下一次使用,同 时还将结果返回给客户机 A。
在上述过程中, 客户机 A—般只从第一个接收客户机 A的域名查询请 求的域名服务器获取最终域名对应的 IP。
在实际中, 客户端本身一般会设置默认的本地域名服务器, 当客户端出 现 HTTP请求时, 首先从默认的本地域名服务器开始查询获取 HTTP请求中 域名对应的 IP。 而本申请在客户端出现 HTTP请求时, 首先拦截客户端的网 页请求, 根据客户端的 HTTP请求中的域名自行构造第一域名查询请求, 并 将所述第一域名查询请求发送至第一域名服务器。
那么对于本申请, 如果对于教育网的客户端, 当所述第一域名服务器设 置在教育网中时, 可快速解析最优 DNS IP, 而避免了因为默认 DNS服务器 不在教育网内等情况导致的解析 DNS IP路径过长而导致的网络延迟问题。
本申请对于客户端的 HTTP请求 ,客户端对 HTTP请求中的域名进行解 析, 基于所述域名构造 DNS请求发送至第一域名服务器中。
优选的, 根据客户端的网页请求中的域名构造第一域名查询请求, 并将 所述请求发送至第一域名服务器时包括:
步骤 S111 , 通过钩子函数钩取***域名查询函数;
本申请中, 可釆用微软提供的 Detours 库实现 Hook, 即通过钩子函数 钩取***域名查询函数 getaddrinfo。 域名查询函数 getaddrinfo可用于域名解 析服务的, 如: 将 www.***.com翻译对应的 IP地址, 以便网络程序进行 连接。 域名查询函数 getaddrinfo还可根据 RFC1035协议, 构造 DNS A或 AAAA命令, 发给 DNS服务器, 并解析 DNS服务器返回的 response,解析出 IP列表, 一般选择 IP列表中第一个 IP地址作为所述域名对应的 IP地址。
本申请在***进行默认域名解析服务时,通过 hook 域名查询函数,可 实现 DNS查询请求的定向发送。
步骤 S112, 针对客户端的网页请求中的域名, 通过域名查询函数, 构 造第一域名查询请求;
在本申请中, hook 了 getaddrinfo函数之后, 基于本地客户端的 IP地址 和本申请预设的第一域名服务器的 IP地址构造第一域名查询请求, 在实际 中还会结合第一域名服务器的端口构造第一域名查询请求。
相应的当第一域名服务器获取到客户端 HTTP请求中域名对应的 IP后, 会以客户端的 IP地址和第一域名服务器的 IP地址构造响应, 并将响应返回 给客户端。 参照图 2b, 其示出了 DNS响应的示例。
步骤 S113 , 将所述第一域名查询请求发送至所述第一域名服务器。 在客户端 hook域名查询函数, 构造出上述的第一域名查询请求后, 会 将所述第一域名查询请求发送至第一域名服务器。
优选的, 将所述第一域名查询请求发送至所述第一域名服务器时包括: 步骤 S11 , 将所述域名查询请求通过异步 I/O机制发送至第一域名服务 器。
通过异步并发绑定多端口(53,80,8000等), 可以使一些防火墙禁用除防 火墙指定的 DNS IP外的其他 DNS服务器。 比如因为绑定了 80端口, 一般 防火墙会误认为是 HTTP流量, 所以可以突破类似的规则。
进一步优选的, 所述的异步 I/O机制包括 I/O完成端口机制。 即釆用 I/0CP机制异步并发发送 DNS查询请求给 DNS服务器。
在实际中, Windows操作***提供了异步选择(WSAAsyncSelect ) 、 事件选择( WSAEventSelect ) 、 重叠 I/O ( Overlapped I/O )和完成端口 ( Completl/On Port)共等异步发送的 I/O机制,所以本申请中还可釆用上述异 步机制中的其他机制。
本申请优选釆用 I/O完成端口机制, "完成端口"机制是迄今为止最为复 杂的一种 I/O机制。 然而, 假若一个应用程序同时需要管理为数众多的套接 字, 那么釆用这种机制, 可以达到最佳的***性能。
对于重叠 I/O来说: Winsock2的发布使得 Socket I/O有了和文件 I/O统 一的接口。 可以通过使用 Win32文件操纵函数 ReadFile和 WriteFile来进行 Socket I/O。这样,用于普通文件 I/O的重叠 I/O机制和完成端口机制对 Socket I/O也适用了。 本机制的优点是可以达到更佳的***性能, 但是实现较为复 杂。
对于异步选择来说: 该机制是 Winsock提供的异步 I/O机制。 利用这个 机制, 应用程序可在一个套接字上, 接收以 Windows消息为基础的网络事 件通知。 具体的做法是在建好一个套接字后, 调用 WSAAsyncSelect函数。
对于事件选择来说: 该机制是 Winsock提供的异步 I/O机制。 它与异步 选择机制类似, 允许应用程序在一个或多个套接字上, 接收以事件为基础的 网络事件通知。
另外, 本申请在所述第一域名查询请求发送至所述第一域名服务器时还 可包括:
步骤 P111 , 将所述域名查询请求同步发送至第一域名服务器。
步骤 120, 获获取第一域名服务器返回的标识 IP地址; 所述标识 IP地 址用于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库。
在本申请中,在客户端将所收第一域名查询请求发送至第一域名服务器 后, 第一域名服务器的处理过程包括:
步骤 A1 , 接收客户端发送的第一域名查询请求;
根据前述介绍, 第一域名服务器在接收到所述第一域名查询请求时, 可 根据 DNS查询机制获取所述客户端 HTTP请求中域名对应的目标 IP地址。
第一域名服务器首先获取客户端发送的第一域名查询请求。
步骤 A2, 根据所述第一域名查询请求构造第二域名查询请求, 并发送 至第二域名服务器;
在本申请中, 第一域名服务器一般不具备查询域名对应的目标 IP地址 的功能, 需要转发至具有实际查询功能的第二域名服务器查询所述域名对应 的目标 IP地址。 4艮据相应的路由路径查询到所述域名对应的 IP地址。
优选的, 根据所述第一域名查询请求构造第二域名查询请求, 并发送至 第二域名服务器时包括:
步骤 A21 , 解析第一域名查询请求, 获的所述网页请求的域名; 第一域名服务器接收到所述第一域名查询请求后, 根据解析协议, 从所 述第一域名查询请求中解析客户端的域名。
步骤 A22, 基于所述域名, 按域名查询协议构造第二域名查询请求; 步骤 A23 , 将所述第二域名查询请求发送至第二域名服务器。
在本申请中,预置的第一域名服务器本身一般不负责查询解析所述域名 对应的目标 IP地址, 而是根据所述域名构造第二域名查询请求, 并发送至 第二域名服务器, 通过第二域名服务器获取包括域名对应的 IP的响应。 其 中第二域名服务器一般为第一域名服务器所在的或者指定的真正具有 DNS 查询功能的域名服务器。 所述第二域名服务器可根据前述 DNS查询机制获 取域名对应的 IP, 然后生成响应返回给第一域名服务器。
当然, 也可将所述第二域名服务器设置为具有 DNS查询功能的域名服 务器。
步骤 A3 , 获得第二域名服务器响应后, 解析所述响应对应的目标 IP地 址; 所述目标 IP地址对应所述网页请求的域名;
第二服务器得到对应所述域名的 IP后, 会生成包括该 IP的响应返回, 然后第一域名服务器会解析所述响应, 从中获取所述域名对应的 IP地址。
步骤 A4, 结合预定 IP地址库, 判断所述 IP地址是否在预定 IP地址库 内; 才艮据判断结果, 生成标识 IP地址; 所述标识 IP地址用于标识所述网页 请求中域名对应的目标 IP地址是否属于预定 IP地址库。
优选的, 据判断结果, 生成标识 IP地址时包括:
步骤 A31 ,基于所述目标 IP地址,与所述预定 IP地址库进行匹配计算; 步骤 A32, 如果在所述预定 IP地址库内, 则返回表示所述目标 IP地址 属于预定 IP地址库的标识 IP地址至客户端;
步骤 A33 , 如果不在所述预定 IP地址库内, 则返回表示所述目标 IP地 址不属于预定 IP地址库的标识 IP地址至客户端。
本申请的第一域名服务器在得到客户端 HTTP请求中域名对应的 IP地 址后, 会结合预定 IP地址库进行判断, 然后基于判断结果生成标识 IP地址 返回客户端。
基于该 IP地址,查找中国 IP地址段库,判断所述 IP地址是否在预定 IP 地址库内, 然后针对判断结果, 釆用不同的标识 IP地址对所述 IP地址进行 标识, 表示该 IP地址是否为预定 IP地址库。 因为, 基于 DNS解析协议, 需 要 IP地址形式构造的响应一般才能被解析, 所以釆用标识 IP地址的形式对 所述域名对应的目标 IP地址进行标识。 比如如果所述域名对应的目标 IP地 址为国内 IP, 以 0.0.0.0为标识 IP地址,表示所述域名对应的目标 IP地址为 国内 IP。 当然, 本申请也可以其他方式标识所述域名的 IP地址是否为中国 IP地 址段, 本申请不对其加以限制。
进一步的, 所述 IP地址库为中国 IP地址段时,如果不在中国 IP地址段 内, 则将所述目标 IP地址作为标识 IP地址返回至客户端。
即进一步, 据判断结果, 生成标识 IP地址时, 包括:
步骤 A3 , 如果所述目标 IP地址属于中国 IP地址段, 则返回表示所述 IP地址为中国 IP地址段的标识 IP地址至客户端;
比如, 当第一域名服务器判断所述域名对应的目标 IP地址为中国 IP地 址段时, 则返回包括 0.0.0.0的 IP地址的响应给客户端。 也可以返回其他规 定形式的包括标识 IP地址的响应给客户端。
步骤 A4, 果所述目标 IP地址不属于中国 IP地址段, 将所述 IP地址作 为标识 IP地址返回至客户端。
如果不在, 则直接返回所述域名对应的目标 IP地址的响应给客户端。 步骤 130,根据所述标识 IP地址判断出将页面请求中域名对应的目标 IP 地址替换为代理服务器的 IP地址; 则根据所述代理服务器对应的 IP地址, 将所述网页访问请求发送至代理服务器。
客户端在接收到第一域名服务器返回的包括标识 IP地址的响应后, 解 析响应的标识 IP地址, 根据所述标识 IP地址的形式判断其是否属于预定 IP 地址库。
在本申请中, 如果客户端的 IP地址属于预定 IP地址库; 当所述客户端 页面请求中域名对应的目标 IP地址属于所述预定 IP地址库时, 则保留客户 端页面请求中域名对应的目标 IP地址; 当所述客户端页面请求中域名对应 的目标 IP地址不属于所述预定 IP地址库, 则将客户端页面请求中域名对应 的目标 IP地址替换为代理服务器的 IP地址。 如此, 可使客户端访问所述预 定 IP地址库外的网站时, 可通过代理访问。
其中, 当所述预定地址库为所述预定 IP地址库为中国 IP地址段, 根据 所述标识 IP地址进行判断时包括:
步骤 S131 , 当所述标识 IP地址表示所述目标 IP地址不属于中国 IP地 址段, 将页面请求中域名对应的目标 IP地址替换为代理服务器的 IP地址; 步骤 S 131 , 当所述标识 IP地址表示所述目标 IP地址属于中国 IP地址 段, 则保留页面请求中域名对应的目标 IP地址。
其中, 判断时, 一般是根据客户端与第一域名服务器对所述标识 IP地 址的形式的定义判断的, 比如前述例子中, 解析到响应中的标识 IP地址为 0.0.0.0,那么客户端即可判断所述域名对应的目标 IP地址为中国 IP地址段; 如果所述标识 IP地址为非 0.0.0.0, 那么即可判断所述域名对应的目标 IP地 址为中国 IP地址段外地址。 其中, 客户端所在地址段属于中国 IP地址段。
当判断所述域名对应的目标 IP地址为中国 IP地址段外地址时, 则将页 面请求的目标 IP地址替换为代理服务器的 IP地址, 即页面请求原本是访问 页面请求中域名对应的目标 IP地址, 而此时页面请求就访问代理服务器的 IP地址。
另外当判断所述域名对应的目标 IP地址为中国 IP地址段时, 不进行上 述替换, 所述网页请求按页面请求的目标 IP地址进行访问。 即页面请求按 页面请求直接访问其中的域名对应的目标 IP地址。
优选的, 通过所述域名查询函数将页面请求的目标 IP地址替换为代理 服务器的 IP地址。
步骤 140, 根据所述代理服务器对应的 IP地址, 将对应所述国外的 IP 地址的网页访问请求发送至代理服务器。
在进行前述替换后, 对于客户端访问预定 IP地址库的页面请求, 就可 转发至代理服务器进行访问。
另外, 优选的, 根据所述代理服务器对应的 IP地址, 将对应所述国外 的 IP地址的网页访问请求发送至代理服务器时包括:
步骤 C1 , 在客户端的所述网页请求中添加校验协议;
步骤 C2, 当所述代理服务器接收到所述网页请求时, 根据所述校验协 议校验所述客户端是否有权访问所述代理服务器。
即在本申请中, 对于客户端发送页面请求到代理服务器时, 根据与代 理服务器的约定, 在请求中校验协议, 保证所述页面请求内容的安全。
参照图 2, 其示出了本申请一种访问网站的方法的流程示意图, 包括: 步骤 210, 接收客户端发送的第一域名查询请求;
步骤 220, 根据所述第一域名查询请求构造第二域名查询请求, 并发送 至第二域名服务器;
步骤 230, 获得第二域名服务器响应后, 解析所述响应对应的目标 IP地 址; 所述目标 IP地址对应所述网页请求的域名;
步骤 240, 结合预定 IP地址库, 判断所述 IP地址是否在预定 IP地址库 内; 才艮据判断结果, 生成标识 IP地址; 所述标识 IP地址用于标识所述网页 请求中域名对应的目标 IP地址是否属于预定 IP地址库;
步骤 250 , 将所述标识 IP地址返回至客户端。
优选的, 根据所述第一域名查询请求构造第二域名查询请求, 并发送至 第二域名服务器包括:
步骤 L1 , 解析第一域名查询请求, 获的所述网页请求的域名; 步骤 L2, 基于所述域名, 按域名查询协议构造第二域名查询请求; 步骤 L3 , 将所述第二域名查询请求发送至第二域名服务器。
优选的, 据判断结果, 生成标识 IP地址时包括:
步骤 Ml , 基于所述目标 IP地址, 与所述预定 IP地址库进行匹配计算; 步骤 M2, 如果在所述预定 IP地址库内, 则返回表示所述目标 IP地址 属于预定 IP地址库的标识 IP地址至客户端;
步骤 M3 , 如果不在所述预定 IP地址库内, 则返回表示所述目标 IP地 址不属于预定 IP地址库的标识 IP地址至客户端。
进一步, 优选的, 所述 IP地址库为中国 IP地址段时, 如果不在中国 IP 地址段内, 则将所述目标 IP地址作为标识 IP地址返回至客户端。 本方法于 前述方法相对应, 在前述步骤中已经详述, 在此不再赘述。
参照图 3 , 其示出了本申请一种访问网站的装置的结构示意图, 包括: 客户端 410, 所述客户端包括:
域名重构模块 411 , 用于根据客户端的网页请求中的域名构造第一域名 查询请求, 并将所述第一域名查询请求发送至第一域名服务器;
地址获取模块 412, 用于获取第一域名服务器返回的标识 IP地址; 所述 标识 IP地址用于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库;
判断模块 413 ,用于根据所述标识 IP地址判断出将页面请求中域名对应 的目标 IP地址替换为代理服务器的 IP地址; 则根据所述代理服务器对应的 IP地址, 将所述网页访问请求发送至代理服务器。
优选的, 所述域名重构模块包括:
钩取子模块, 用于通过钩子函数钩取***域名查询函数;
请求构造子模块, 用于针对客户端的网页请求中的域名, 通过域名查询 函数, 构造第一域名查询请求;
请求发送子模块, 用于将所述第一域名查询请求发送至所述第一域名服 务器。 优选的, 将所述域名查询请求发送至所述第一域名服务器时包括: 将所述域名查询请求通过异步 I/O机制发送至第一域名服务器。
优选的, 所述的异步 I/O机制包括 I/O完成端口机制。
优选的, 所述预定 IP地址库为中国 IP地址段。
优选的, 所述判断模块包括:
第一判断子模块, 用于当所述标识 IP地址表示所述目标 IP地址不属于 中国 IP地址段, 将页面请求中域名对应的目标 IP地址替换为代理服务器的 IP地址;
第二判断子模块, 用于当所述标识 IP地址表示所述目标 IP地址属于中 国 IP地址段, 则保留页面请求中域名对应的目标 IP地址。
优选的, 其中则根据所述代理服务器对应的 IP地址, 将所述网页访问 请求发送至代理服务器时包括:
安全设置模块, 用于在客户端的所述网页请求中添加校验协议; 当所述代理服务器接收到所述网页请求时,根据所述校验协议校验所述 客户端是否有权访问所述代理服务器。
优选的, 根据所述标识 IP地址判断出将页面请求中域名对应的目标 IP 地址替换为代理服务器的 IP地址时包括:
通过所述域名查询函数将页面请求中域名对应的目标 IP地址替换为代 理服务器的 IP地址。
优选的, 所述代理服务器在教育网内。
参照图 4, 其示出了本申请一种访问网站的装置结构示意图, 包括: 第一域名服务器 510, 所述域名服务器包括:
域名查询请求接收模块 511 ,用于接收客户端发送的第一域名查询请求; 域名查询请求处理模块 512, 用于根据所述第一域名查询请求构造第二 域名查询请求, 并发送至第二域名服务器;
域名查询请求响应处理模块 513 , 用于获得第二域名服务器响应后, 解 析所述响应对应的目标 IP地址;所述目标 IP地址对应所述网页请求的域名; 目标 IP地址判断模块 514, 结合预定 IP地址库, 判断所述 IP地址是否 在预定 IP地址库内; 才艮据判断结果, 生成标识 IP地址; 所述标识 IP地址用 于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库; 返回模块 515 , 用于将所述标识 IP地址返回至客户端。
优选的, 所述域名查询请求处理模块包括: 解析子模块, 用于解析第一域名查询请求, 获的所述网页请求的域名; 构造子模块, 用于基于所述域名, 按域名查询协议构造第二域名查询请 求;
发送子模块, 用于将所述第二域名查询请求发送至第二域名服务器。 优选的, 所述域名查询请求响应处理模块包括:
匹配计算模块, 用于基于所述目标 IP地址, 与所述预定 IP地址库进行 匹配计算;
第一标识 IP地址返回模块, 用于如果在所述预定 IP地址库内, 则返回 表示所述目标 IP地址属于预定 IP地址库的标识 IP地址至客户端;
第二标识 IP地址返回模块, 用于如果不在所述预定 IP地址库内, 则返 回表示所述目标 IP地址不属于预定 IP地址库的标识 IP地址至客户端。
优选的, 所述 IP地址库为中国 IP地址段时, 所述第二标识 IP地址返回 模块用于,如果不在中国 IP地址段内, 则将所述目标 IP地址作为标识 IP地 址返回至客户端。
参照图 5, 其示出了本申请一种访问网站***结构示意图, 包括: 客户端 610, 第一域名服务器 620, 和代理服务器 630;
客户端 610, 所述客户端包括:
域名重构模块 611 , 用于根据客户端的网页请求中的域名构造第一域名 查询请求, 并将所述第一域名查询请求发送至第一域名服务器;
地址获取模块 612, 用于获取第一域名服务器返回的标识 IP地址; 所述 标识 IP地址用于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库;
判断模块 613 ,用于根据所述标识 IP地址判断出将页面请求中域名对应 的目标 IP地址替换为代理服务器 630的 IP地址;则根据所述代理服务器 630 对应的 IP地址, 将所述网页访问请求发送至代理服务器 630;
所述第一域名服务器 620包括:
域名查询请求接收模块 621 ,用于接收客户端发送的第一域名查询请求; 域名查询请求处理模块 622, 用于根据所述第一域名查询请求构造第二 域名查询请求, 并发送至第二域名服务器;
域名查询请求响应处理模块 623 , 用于获得第二域名服务器响应后, 解 析所述响应对应的目标 IP地址;所述目标 IP地址对应所述网页请求的域名; 目标 IP地址判断模块 624 , 结合预定 IP地址库, 判断所述 IP地址是否 在预定 IP地址库内; 才艮据判断结果, 生成标识 IP地址; 所述标识 IP地址用 于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库; 返回模块 625 , 用于将所述标识 IP地址返回至客户端。
对于***实施例而言, 由于其与方法实施例基本相似, 所以描述的比较 简单, 相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均釆用递进的方式描述,每个实施例重点说明 的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见 即可。
本发明的各个部件实施例可以以硬件实现, 或者以在一个或者多个 处理器上运行的软件模块实现, 或者以它们的组合实现。 本领域的技术 人员应当理解, 可以在实践中使用微处理器或者数字信号处理器 (DSP ) 来实现根据本发明实施例的访问网站的装置中的一些或者全部部件的一 些或者全部功能。 本发明还可以实现为用于执行这里所描述的方法的一 部分或者全部的设备或者装置程序 (例如, 计算机程序和计算机程序产 品) 。 这样的实现本发明的程序可以存储在计算机可读介质上, 或者可 以具有一个或者多个信号的形式。 这样的信号可以从因特网网站上下载 得到, 或者在载体信号上提供, 或者以任何其他形式提供。 例如应用服务器。 该服务器传统上包括处理器 610和以存储器 620形式 的计算机程序产品或者计算机可读介质。 存储器 620 可以是诸如闪存、 EEPROM (电可擦除可编程只读存储器 ) 、 EPROM、 硬盘或者 ROM之 类的电子存储器。 存储器 620 具有用于执行上述方法中的任何方法步骤 的程序代码 631的存储空间 630。 例如, 用于程序代码的存储空间 630可 以包括分别用于实现上面的方法中的各种步骤的各个程序代码 631。这些 程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个 或者多个计算机程序产品中。 这些计算机程序产品包括诸如硬盘, 紧致 盘 (CD ) 、 存储卡或者软盘之类的程序代码载体。 这样的计算机程序产 品通常为如参考图 7 所述的便携式或者固定存储单元。 该存储单元可以 具有与图 6的服务器中的存储器 620类似布置的存储段、 存储空间等。 程序代码可以例如以适当形式进行压缩。 通常, 存储单元包括计算机可 读代码 63Γ , 即可以由例如诸如 610之类的处理器读取的代码, 这些代 码当由服务器运行时, 导致该服务器执行上面所描述的方法中的各个步 骤。
本文中所称的 "一个实施例"、 "实施例"或者"一个或者多个实施例" 意味着, 结合实施例描述的特定特征、 结构或者特性包括在本发明的至 少一个实施例中。 此外, 请注意, 这里"在一个实施例中"的词语例子不一 定全指同一个实施例。
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本发明的实施例可以在没有这些具体细节的情况下被实践。 在一些实例 中, 并未详细示出公知的方法、 结构和技术, 以便不模糊对本说明书的 理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限 制, 并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计 出替换实施例。 在权利要求中, 不应将位于括号之间的任何参考符号构 造成对权利要求的限制。单词"包含"不排除存在未列在权利要求中的元件 或步骤。 位于元件之前的单词 "一"或"一个"不排除存在多个这样的元件。 本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计 算机来实现。 在列举了若干装置的单元权利要求中, 这些装置中的若干 个可以是通过同一个硬件项来具体体现。 单词第一、 第二、 以及第三等 的使用不表示任何顺序。 可将这些单词解释为名称。
此外, 还应当注意, 本说明书中使用的语言主要是为了可读性和教 导的目的而选择的, 而不是为了解释或者限定本发明的主题而选择的。 因此, 在不偏离所附权利要求书的范围和精神的情况下, 对于本技术领 域的普通技术人员来说许多修改和变更都是显而易见的。 对于本发明的 范围, 对本发明所做的公开是说明性的, 而非限制性的, 本发明的范围 由所附权利要求书限定。

Claims

权 利 要 求
1、 一种访问网站的方法, 其包括:
根据客户端的网页请求中的域名构造第一域名查询请求, 并将所述请求 发送至第一域名服务器;
获取第一域名服务器返回的标识 IP地址; 所述标识 IP地址用于标识所 述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库;
根据所述标识 IP地址判断出将页面请求中域名对应的目标 IP地址替换 为代理服务器的 IP地址; 则根据所述代理服务器对应的 IP地址, 将所述网 页访问请求发送至代理服务器。
2、 根据权利要求 1所述的方法, 其中, 根据客户端的网页请求中的域 名构造第一域名查询请求, 并将所述请求发送至第一域名服务器时包括: 通过钩子函数钩取***域名查询函数;
针对客户端的网页请求中的域名, 通过域名查询函数, 构造第一域名查 询请求;
将所述第一域名查询请求发送至所述第一域名服务器。
3、 根据权利要求 1所述的方法, 其中, 将所述第一域名查询请求发送 至所述第一域名服务器时包括:
将所述域名查询请求通过异步 I/O机制发送至第一域名服务器。
4、 根据权利要求 3所述的方法, 其中:
所述的异步 I/O机制包括 I/O完成端口机制。
5、 根据权利要求 1所述的方法, 其中:
所述预定 IP地址库为中国 IP地址段。
6、 根据权利要求 5所述的方法, 其中, 根据所述标识 IP地址进行判断 时包括:
当所述标识 IP地址表示所述目标 IP地址不属于中国 IP地址段,将页面 请求中域名对应的目标 IP地址替换为代理服务器的 IP地址;
当所述标识 IP地址表示所述目标 IP地址属于中国 IP地址段,则保留页 面请求中域名对应的目标 IP地址。
7、 根据权利要求 1所述的方法, 其中, 则根据所述代理服务器对应的
IP地址, 将所述网页访问请求发送至代理服务器时包括:
在客户端的所述网页请求中添加校验协议; 当所述代理服务器接收到所述网页请求时,根据所述校验协议校验所述 客户端是否有权访问所述代理服务器。
8、 根据权利要求 2所述的方法, 其中, 根据所述标识 IP地址判断出将 页面请求中域名对应的目标 IP地址替换为代理服务器的 IP地址时包括: 通过所述域名查询函数将页面请求中域名对应的目标 IP地址替换为代 理服务器的 IP地址。
9、 一种访问网站的方法, 其包括:
接收客户端发送的第一域名查询请求;
根据所述第一域名查询请求构造第二域名查询请求, 并发送至第二域名 服务器;
获得第二域名服务器响应后, 解析所述响应对应的目标 IP地址; 所述 目标 IP地址对应所述网页请求的域名;
结合预定 IP地址库, 判断所述 IP地址是否在预定 IP地址库内; 根据判 断结果, 生成标识 IP地址; 所述标识 IP地址用于标识所述网页请求中域名 对应的目标 IP地址是否属于预定 IP地址库;
将所述标识 IP地址返回至客户端。
10、 根据权利要求 9所述的方法, 其中, 根据所述第一域名查询请求构 造第二域名查询请求, 并发送至第二域名服务器包括:
解析第一域名查询请求, 获的所述网页请求的域名;
基于所述域名, 按域名查询协议构造第二域名查询请求;
将所述第二域名查询请求发送至第二域名服务器。
11、 根据权利要求 9所述的方法, 其中, 据判断结果, 生成标识 IP地 址时包括:
基于所述目标 IP地址, 与所述预定 IP地址库进行匹配计算;
如果在所述预定 IP地址库内, 则返回表示所述目标 IP地址属于预定 IP 地址库的标识 IP地址至客户端;
如果不在所述预定 IP地址库内, 则返回表示所述目标 IP地址不属于预 定 IP地址库的标识 IP地址至客户端。
12、 根据权利要求 11所述的方法, 其中:
所述 IP地址库为中国 IP地址段时,如果不在中国 IP地址段内, 则将所 述目标 IP地址作为标识 IP地址返回至客户端。
13、 一种访问网站的装置, 其包括: 域名重构模块, 用于根据客户端的网页请求中的域名构造第一域名查询 请求, 并将所述第一域名查询请求发送至第一域名服务器;
地址获取模块, 用于获取第一域名服务器返回的标识 IP地址; 所述标 识 IP地址用于标识所述网页请求中域名对应的目标 IP地址是否属于预定 IP 地址库;
判断模块, 用于根据所述标识 IP地址判断出将页面请求中域名对应的 目标 IP地址替换为代理服务器的 IP地址; 则根据所述代理服务器对应的 IP 地址, 将所述网页访问请求发送至代理服务器。
14、 根据权利要求 13所述的装置, 其中, 所述域名重构模块包括: 钩取子模块, 用于通过钩子函数钩取***域名查询函数;
请求构造子模块, 用于针对客户端的网页请求中的域名, 通过域名查询 函数, 构造第一域名查询请求;
请求发送子模块, 用于将所述第一域名查询请求发送至所述第一域名服 务器。
15、 根据权利要求 13所述的装置, 其中, 将所述域名查询请求发送至 所述第一域名服务器时包括:
将所述域名查询请求通过异步 I/O机制发送至第一域名服务器。
16、 根据权利要求 15所述的装置, 其中:
所述的异步 I/O机制包括 I/O完成端口机制。
17、 根据权利要求 13所述的装置, 其中:
所述预定 IP地址库为中国 IP地址段。
18、 根据权利要求 17所述的装置, 其中, 所述判断模块包括: 第一判断子模块, 用于当所述标识 IP地址表示所述目标 IP地址不属于 中国 IP地址段, 将页面请求中域名对应的目标 IP地址替换为代理服务器的 IP地址;
第二判断子模块, 用于当所述标识 IP地址表示所述目标 IP地址属于中 国 IP地址段, 则保留页面请求中域名对应的目标 IP地址。
19、 根据权利要求 13所述的装置, 其中则根据所述代理服务器对应的 IP地址, 将所述网页访问请求发送至代理服务器时包括:
安全设置模块, 用于在客户端的所述网页请求中添加校验协议; 当所述代理服务器接收到所述网页请求时,根据所述校验协议校验所述 客户端是否有权访问所述代理服务器。
20、 根据权利要求 14所述的装置, 其中, 根据所述标识 IP地址判断出 将页面请求中域名对应的目标 IP地址替换为代理服务器的 IP地址时包括: 通过所述域名查询函数将页面请求中域名对应的目标 IP地址替换为代 理服务器的 IP地址。
21、 一种访问网站的装置, 其包括:
域名查询请求接收模块, 用于接收客户端发送的第一域名查询请求; 域名查询请求处理模块, 用于根据所述第一域名查询请求构造第二域名 查询请求, 并发送至第二域名服务器;
域名查询请求响应处理模块, 用于获得第二域名服务器响应后, 解析所 述响应对应的目标 IP地址; 所述目标 IP地址对应所述网页请求的域名; 目标 IP地址判断模块, 结合预定 IP地址库, 判断所述 IP地址是否在预 定 IP地址库内; 居判断结果, 生成标识 IP地址; 所述标识 IP地址用于标 识所述网页请求中域名对应的目标 IP地址是否属于预定 IP地址库;
返回模块, 用于将所述标识 IP地址返回至客户端。
22、 根据权利要求 21所述的装置, 其中, 所述域名查询请求处理模块 包括:
解析子模块, 用于解析第一域名查询请求, 获的所述网页请求的域名; 构造子模块, 用于基于所述域名, 按域名查询协议构造第二域名查询请 求;
发送子模块, 用于将所述第二域名查询请求发送至第二域名服务器。
23、 根据权利要求 21所述的装置, 其中, 所述域名查询请求响应处理 模块包括:
匹配计算模块, 用于基于所述目标 IP地址, 与所述预定 IP地址库进行 匹配计算;
第一标识 IP地址返回模块, 用于如果在所述预定 IP地址库内, 则返回 表示所述目标 IP地址属于预定 IP地址库的标识 IP地址至客户端;
第二标识 IP地址返回模块, 用于如果不在所述预定 IP地址库内, 则返 回表示所述目标 IP地址不属于预定 IP地址库的标识 IP地址至客户端。
24、 根据权利要求 23所述的装置, 其中:
所述 IP地址库为中国 IP地址段时,所述第二标识 IP地址返回模块用于, 如果不在中国 IP地址段内,则将所述目标 IP地址作为标识 IP地址返回至客 户端。
25、 一种计算机程序, 包括计算机可读代码, 当所述计算机可读代 码在服务器上运行时, 导致所述服务器执行根据权利要求 1-12中的任一 个所述的访问网站的方法。
26、 一种计算机可读介质, 其中存储了如权利要求 25所述的计算机 程序。
PCT/CN2013/072843 2012-03-31 2013-03-19 一种访问网站的方法和*** WO2013143403A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/388,083 US9883002B2 (en) 2012-03-31 2013-03-19 Method and system for accessing website

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210093093.8A CN102647482B (zh) 2012-03-31 2012-03-31 一种访问网站的方法和***
CN201210093093.8 2012-03-31

Publications (1)

Publication Number Publication Date
WO2013143403A1 true WO2013143403A1 (zh) 2013-10-03

Family

ID=46660055

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/072843 WO2013143403A1 (zh) 2012-03-31 2013-03-19 一种访问网站的方法和***

Country Status (3)

Country Link
US (1) US9883002B2 (zh)
CN (2) CN104901943A (zh)
WO (1) WO2013143403A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411819A (zh) * 2015-07-30 2017-02-15 阿里巴巴集团控股有限公司 一种识别代理互联网协议地址的方法及装置
CN112650802A (zh) * 2020-12-22 2021-04-13 浪潮云信息技术股份公司 政务数据的对接方法和装置
WO2022057000A1 (zh) * 2020-09-16 2022-03-24 厦门网宿有限公司 一种数据代理方法、***及代理服务器
CN114760267A (zh) * 2022-04-08 2022-07-15 ***通信集团陕西有限公司 域名封堵方法、装置、设备、介质及程序产品

Families Citing this family (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104901943A (zh) * 2012-03-31 2015-09-09 北京奇虎科技有限公司 一种访问网站的方法和***
CN102855334B (zh) * 2012-09-29 2016-07-06 北京奇虎科技有限公司 一种浏览器及其获取dns解析数据的方法
CN103037029B (zh) * 2012-12-10 2014-10-01 中国科学院计算机网络信息中心 基于绑定注册的域名whois查询方法和服务***
CN103973506B (zh) * 2013-01-30 2016-10-12 腾讯科技(深圳)有限公司 一种域名校验方法、装置及***
CN103338278A (zh) * 2013-07-15 2013-10-02 星云融创(北京)信息技术有限公司 一种网页浏览加速方法及装置
CN103347089A (zh) * 2013-07-16 2013-10-09 星云融创(北京)信息技术有限公司 一种对网站动态资源和静态资源分离加速的方法及装置
CN104580540B (zh) * 2013-10-09 2018-11-23 腾讯科技(深圳)有限公司 网站访问的实现方法和装置
CN104933045B (zh) * 2014-03-17 2019-08-09 腾讯科技(深圳)有限公司 网络信息浏览方法及网络信息浏览装置
CN104509066B (zh) * 2014-06-05 2017-10-27 胡汉强 一种访问网络的方法及网络设备、管理服务器
CN104010051B (zh) * 2014-06-05 2017-12-08 胡汉强 一种访问网络的方法及管理服务器
CN104735174B (zh) * 2015-03-30 2018-04-13 北京奇艺世纪科技有限公司 一种http透明代理的实现方法及装置
WO2017142799A2 (en) * 2016-02-15 2017-08-24 Michael Wood System and method for blocking persistent malware
CN105915639B (zh) * 2016-06-06 2020-08-04 腾讯科技(深圳)有限公司 页面访问方法及装置
CN106598881B (zh) * 2016-12-20 2020-10-09 北京小米移动软件有限公司 页面处理方法及装置
CN107682465A (zh) * 2017-06-24 2018-02-09 平安科技(深圳)有限公司 域名解析装置、方法及计算机可读存储介质
CN109246164A (zh) * 2017-07-10 2019-01-18 中兴通讯股份有限公司 一种基于云虚拟化网络的访问方法、装置及***
CN107562460A (zh) * 2017-09-05 2018-01-09 合肥爱吾宠科技有限公司 网站制作方法
CN108156220B (zh) * 2017-12-04 2021-12-03 北京小米移动软件有限公司 通信方法及装置
CN109981803B (zh) * 2017-12-27 2022-04-29 中兴通讯股份有限公司 业务请求处理方法及装置
CN108769278B (zh) * 2018-04-11 2021-08-10 北京中科闻歌科技股份有限公司 一种社交媒体账号管理方法及***
CN109088764B (zh) * 2018-08-15 2022-04-22 郑州悉知信息科技股份有限公司 访问请求处理方法及相关设备
CN109005118A (zh) * 2018-08-21 2018-12-14 中国平安人寿保险股份有限公司 查找cdn源站地址的方法、装置、计算机设备和存储介质
CN109617977B (zh) * 2018-12-24 2021-12-03 绿盟科技集团股份有限公司 一种网页请求处理方法及装置
CN109729187B (zh) * 2019-01-09 2022-08-30 广州视源电子科技股份有限公司 一种代理通信方法、***、装置及存储介质
WO2020199029A1 (zh) * 2019-03-29 2020-10-08 华为技术有限公司 一种数据处理方法及其装置
JP7309418B2 (ja) * 2019-03-29 2023-07-18 キヤノン株式会社 通信装置、通信装置の制御方法及びプログラム
CN110113440B (zh) * 2019-04-15 2022-06-03 北京奇艺世纪科技有限公司 一种请求响应方法、装置及终端
CN112019584B (zh) * 2019-05-31 2022-05-31 阿里巴巴集团控股有限公司 资源访问控制方法、装置及计算机***
CN110602048B (zh) * 2019-08-14 2022-06-03 中国平安财产保险股份有限公司 防止域名劫持的方法、装置及计算机设备
CN112583780B (zh) * 2019-09-30 2023-04-07 北京国双科技有限公司 使用代理ip访问网站数据的方法、装置、***和设备
CN110851753B (zh) * 2019-11-07 2023-09-26 亿企赢网络科技有限公司 一种网站的访问方法、装置、设备及存储介质
CN111083196B (zh) * 2019-11-14 2022-07-12 北京无限光场科技有限公司 信息转发方法、装置和电子设备
CN111092863B (zh) * 2019-11-29 2022-12-23 视联动力信息技术股份有限公司 访问互联网网站的方法、客户端、服务器、设备及介质
CN111082977B (zh) * 2019-11-29 2023-04-07 北京金山云网络技术有限公司 Ip地址的获取方法、装置和终端设备
CN111031026A (zh) * 2019-12-09 2020-04-17 杭州安恒信息技术股份有限公司 一种dga恶意软件感染主机检测方法
CN112995046B (zh) * 2019-12-12 2023-05-26 上海云盾信息技术有限公司 一种内容分发网络流量管理方法及设备
CN111131436B (zh) * 2019-12-20 2022-08-30 广州品唯软件有限公司 快速查找代理方法、装置和可读存储介质
CN112104744B (zh) * 2020-03-30 2022-09-09 厦门网宿有限公司 流量代理方法、服务器及存储介质
CN111641701B (zh) * 2020-05-25 2023-07-14 深信服科技股份有限公司 一种数据保护的方法及装置、设备、存储介质
CN113239301B (zh) * 2021-04-22 2023-02-07 维沃移动通信(杭州)有限公司 页面加载请求方法、装置和电子设备
CN113438336B (zh) * 2021-06-24 2022-07-08 平安科技(深圳)有限公司 网络请求方法、装置、设备和存储介质
CN113992749B (zh) * 2021-10-08 2024-05-14 浪潮云信息技术股份公司 一种基于go语言的http反向代理方法及***
CN114726616A (zh) * 2022-04-07 2022-07-08 京东科技信息技术有限公司 一种网站访问请求的处理方法及装置
CN116186457B (zh) * 2023-04-21 2024-02-06 京东科技信息技术有限公司 网页访问和网页开发的方法、装置、电子设备及介质
CN117938942B (zh) * 2024-03-20 2024-05-28 中国科学院空天信息创新研究院 服务注册发现方法、装置、设备、介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741902A (zh) * 2009-11-24 2010-06-16 候万春 向互联网终端提供快速访问互联网服务器的***和方法
CN101764855A (zh) * 2009-12-30 2010-06-30 福建星网锐捷网络有限公司 一种提供域名解析服务的方法、装置及***
JP2010183242A (ja) * 2009-02-04 2010-08-19 Kddi Corp 通信装置およびdnsプロキシサーバ
CN102647482A (zh) * 2012-03-31 2012-08-22 奇智软件(北京)有限公司 一种访问网站的方法和***

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11110324A (ja) * 1997-10-07 1999-04-23 Hitachi Ltd 代理サーバ選択装置および代理サーバ
US6405340B1 (en) * 1999-07-02 2002-06-11 Ericsson Inc. Flexible method of error protection in communications systems
US7770188B2 (en) * 2006-04-20 2010-08-03 Microsoft Corporation Winsock APIs
JP2008311939A (ja) * 2007-06-14 2008-12-25 Ricoh Co Ltd ネットワーク通信機器
EP2253124B1 (en) * 2008-03-20 2016-03-16 Telefonaktiebolaget LM Ericsson (publ) Method and apparatus for communication of data packets between local networks
CN101610294A (zh) * 2009-07-15 2009-12-23 浪潮电子信息产业股份有限公司 一种利用智能dns提高网站访问速度的方法
CN102025793A (zh) * 2010-01-22 2011-04-20 ***通信集团北京有限公司 一种ip网络中的域名解析方法、***及dns服务器
CN102143141B (zh) * 2010-01-29 2013-11-27 国基电子(上海)有限公司 线缆调制解调器及其自动获取国家代码的方法
JP2011175394A (ja) * 2010-02-24 2011-09-08 Fujifilm Corp シングル・サインオン・システムを構成するウェブ・サーバならびにその動作制御方法およびその動作制御プログラム
CN102215228A (zh) * 2011-05-31 2011-10-12 北京亿赞普网络技术有限公司 一种基于电信级网络平台的Web服务独立用户识别方法
US9231903B2 (en) * 2011-12-30 2016-01-05 Time Warner Cable Enterprises Llc System and method for resolving a DNS request using metadata

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010183242A (ja) * 2009-02-04 2010-08-19 Kddi Corp 通信装置およびdnsプロキシサーバ
CN101741902A (zh) * 2009-11-24 2010-06-16 候万春 向互联网终端提供快速访问互联网服务器的***和方法
CN101764855A (zh) * 2009-12-30 2010-06-30 福建星网锐捷网络有限公司 一种提供域名解析服务的方法、装置及***
CN102647482A (zh) * 2012-03-31 2012-08-22 奇智软件(北京)有限公司 一种访问网站的方法和***

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411819A (zh) * 2015-07-30 2017-02-15 阿里巴巴集团控股有限公司 一种识别代理互联网协议地址的方法及装置
WO2022057000A1 (zh) * 2020-09-16 2022-03-24 厦门网宿有限公司 一种数据代理方法、***及代理服务器
CN112650802A (zh) * 2020-12-22 2021-04-13 浪潮云信息技术股份公司 政务数据的对接方法和装置
CN114760267A (zh) * 2022-04-08 2022-07-15 ***通信集团陕西有限公司 域名封堵方法、装置、设备、介质及程序产品
CN114760267B (zh) * 2022-04-08 2024-03-19 ***通信集团陕西有限公司 域名封堵方法、装置、设备、介质及程序产品

Also Published As

Publication number Publication date
CN104901943A (zh) 2015-09-09
US9883002B2 (en) 2018-01-30
CN102647482B (zh) 2015-05-06
CN102647482A (zh) 2012-08-22
US20150237158A1 (en) 2015-08-20

Similar Documents

Publication Publication Date Title
WO2013143403A1 (zh) 一种访问网站的方法和***
US8321503B2 (en) Context-specific network resource addressing model for distributed services
JP6514699B2 (ja) リソースへの繰返しアクセスについてリソースオーナーから認可を要求する要求のバッチ処理の、サードパーティによる実行の容易化
US9413750B2 (en) Facilitating single sign-on (SSO) across multiple browser instance
US8341239B2 (en) Method and system for providing runtime vulnerability defense for cross domain interactions
US8200696B2 (en) Presenting multiple possible selectable domain names from a URL entry
WO2017114206A1 (zh) 短链接处理方法、装置及短链接服务器
WO2016101635A1 (zh) 一种同步登录状态的方法、装置、设备和计算机存储介质
CN107103233B (zh) 用于基于动态域的隔离的技术
US20130269042A1 (en) Optimizing security seals on web pages
US9058490B1 (en) Systems and methods for providing a secure uniform resource locator (URL) shortening service
WO2014048241A1 (zh) 一种浏览器及其进行域名解析的方法
US8484373B2 (en) System and method for redirecting a request for a non-canonical web page
WO2012034518A1 (zh) 一种提供包含网页地址的消息的方法和***
JP2017513151A (ja) プライベートクラウド接続装置クラスタアーキテクチャ
JP2019530089A (ja) ウェブページとネイティブアプリケーションの間の通信を実現する方法及び装置並びに電子装置
EP2633667A2 (en) System and method for on the fly protocol conversion in obtaining policy enforcement information
WO2015003556A1 (zh) 获取一个主域名相关联的二级域名信息的设备和方法
US20140325089A1 (en) Method, terminal, server and system for page jump
CN103888540A (zh) 登录信息同步方法、被同步和同步网络服务器
US20170264666A1 (en) Method and associated server for providing user-friendly operation
WO2013120315A1 (zh) 域名信息的处理方法、无线路由器和客户端
WO2018081963A1 (zh) 一种dns解析方法、装置及网络***
JP2016517078A (ja) ドメイン名サーバが自然言語クエリを処理しコンテキストを決定することを可能にするシステムおよび方法
CN114301872B (zh) 基于域名的访问方法及装置、电子设备、存储介质

Legal Events

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

Ref document number: 13767779

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14388083

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13767779

Country of ref document: EP

Kind code of ref document: A1