WO2016184349A1 - 一种域名解析方法、装置及系统 - Google Patents
一种域名解析方法、装置及系统 Download PDFInfo
- Publication number
- WO2016184349A1 WO2016184349A1 PCT/CN2016/081950 CN2016081950W WO2016184349A1 WO 2016184349 A1 WO2016184349 A1 WO 2016184349A1 CN 2016081950 W CN2016081950 W CN 2016081950W WO 2016184349 A1 WO2016184349 A1 WO 2016184349A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- domain name
- address
- name resolution
- specific webpage
- mapping relationship
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2514—Translation of Internet protocol [IP] addresses between local and global IP addresses
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/256—NAT traversal
- H04L61/2575—NAT traversal using address mapping retrieval, e.g. simple traversal of user datagram protocol through session traversal utilities for NAT [STUN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
Definitions
- the present application relates to the field of Internet technologies, and in particular, to a domain name resolution method, apparatus, and electronic device.
- the application also relates to a method, device and electronic device for connecting to a server, and a domain name resolution system.
- the application also relates to a network proxy method, device and electronic device.
- Domain name resolution refers to pointing a domain name to a website space IP address, so that people can easily access a website through a registered domain name.
- the IP address is the digital address of the site identified on the network.
- the domain name is used instead of the IP address to identify the site address.
- Domain name resolution is the process of converting domain names to IP addresses.
- the method includes two steps: 1) obtaining an IP address according to the webpage address; 2) making a request to the designated server according to the IP address.
- the common method for obtaining an IP address according to the webpage address is: when the client user enters a web address that needs to be logged in in the browser, the client operating system automatically searches for the corresponding IP address from the Hosts domain name resolution file once found. The client operating system will immediately send the request to the IP address to open the corresponding webpage; if not found, the client operating system will submit the webpage address to the DNS domain name resolution server, and the DNS domain name resolution server will analyze the IP address. Upon receiving the IP address returned by the DNS domain name resolution server, the client operating system directly sends the request to the IP address to open the corresponding webpage.
- Hosts file is a system file with no extension, which can be opened with a tool such as Notepad. Its function is to establish an association "database" with some commonly used URL domain names and their corresponding IP addresses.
- a traditional Hosts file format looks like this:
- the first column is the IP address
- the second column is the host name (domain name), indicating that if the current system has HTTP access
- domain name domain name
- the present invention provides a domain name resolution method, device, and electronic device, so as to solve the problem that the different ports or paths under the same domain name cannot be mapped to different servers through the Hosts file in the prior art.
- the application further provides a method, device and electronic device for connecting to a server, and a domain name resolution system.
- the application also relates to a network proxy method, device and electronic device.
- the application provides a domain name resolution method, including:
- the domain name includes a protocol name and a host name, and at least one of a service port address and a webpage path.
- the mapping relationship between the preset IP address and the domain name includes a mapping relationship between multiple IP addresses corresponding to the same domain name, a mapping relationship between one IP address and one domain name, or multiple IP addresses corresponding to multiple domain names. Mapping relations.
- the searching using the specific webpage address as a retrieval basis, searching in a mapping relationship between a preset IP address and a domain name, and acquiring an IP address corresponding to the specific webpage address, including:
- the IP address of the current mapping relationship is used as an IP address corresponding to the specific webpage address
- the step of traversing the mapping relationship included in the mapping relationship set between the IP address and the domain name is returned, and determining whether the domain name of the next mapping relationship is a substring of the specific webpage address Until all the mapping relationships in the mapping relationship set between the IP address and the domain name are traversed.
- each component element of the domain name in the current mapping relationship is separately stored, and the component elements of the domain name include a protocol name and a host name, and at least one of a service port address and a webpage path; and the current mapping relationship is determined.
- the domain name is a substring of the specific web page address, including:
- it also includes:
- the obtained IP address corresponding to the specific webpage address is sent back to the client.
- searching after searching, using the specific webpage address as a retrieval basis, searching in a mapping relationship set between a preset IP address and a domain name, and acquiring an IP address corresponding to the specific webpage address, include:
- the obtaining the mapping relationship between the IP address and the domain name is as follows:
- the configuration file that stores the mapping relationship between the IP address and the domain name is obtained, and the mapping relationship between the IP address and the domain name is obtained.
- the method before the receiving the domain name resolution request corresponding to the specific webpage address sent by the client, the method further includes:
- the device of the preset domain name resolution device is configured to receive a domain name resolution request corresponding to a specific webpage address sent by the client, and perform an IP address resolution on the specific webpage address.
- the preset domain name resolution device runs on the client.
- the method before the receiving the domain name resolution request corresponding to the specific webpage address sent by the client, the method further includes:
- the preset domain name resolution device is a component of a proxy server.
- mapping relationship between the IP address and the domain name is stored in the mapping relationship configuration file.
- the application further provides a domain name resolution device, including:
- a receiving unit configured to receive a domain name resolution request sent by the client and corresponding to a specific webpage address
- a parsing unit configured to parse the domain name resolution request, and obtain the specific webpage address
- the searching unit is configured to perform a search in the mapping relationship between the preset IP address and the domain name by using the specific webpage address as a retrieval basis, and acquire an IP address corresponding to the specific webpage address.
- the searching unit includes:
- a traversing determination subunit configured to traverse each mapping relationship included in the mapping relationship set between the IP address and the domain name, and determine whether the domain name of the current mapping relationship is a substring of the specific webpage address;
- each component element of the domain name in the current mapping relationship is separately stored, and the component elements of the domain name include a protocol name and a host name, and at least one of a service port address and a webpage path;
- the traversal judgment subunit include:
- a determining subunit configured to determine whether the domain name of the current mapping relationship is a substring of the specific webpage address
- the determining subunit includes:
- a splicing subunit configured to splicing each component element of the domain name into a string
- the first determining subunit is configured to determine whether the spliced string is a substring of the specific webpage address.
- it also includes:
- a loopback unit configured to send back the obtained IP address corresponding to the specific webpage address to the client.
- it also includes:
- An obtaining unit configured to acquire a mapping relationship between the IP address and a domain name.
- it also includes:
- the startup unit is configured to start a preset domain name resolution device, where the preset domain name resolution device is configured to receive a domain name resolution request corresponding to a specific webpage address sent by the client, and perform an IP address on the specific webpage address. Analytical device.
- it also includes:
- a configuration unit configured to configure the preset domain name resolution device to perform IP address resolution on a specific webpage address corresponding to the domain name resolution request sent by the client.
- it also includes:
- a setting unit configured to set a mapping relationship between the IP address and the domain name.
- an electronic device including:
- a memory for storing a domain name resolution device, the domain name resolution device being executed by the processor, comprising the steps of: receiving a domain name resolution request corresponding to a specific webpage address sent by a client; parsing the domain name resolution request, and acquiring the a specific webpage address; searching for the specific webpage address as a search basis, searching in a set of mapping relationship between the preset IP address and the domain name, and acquiring an IP address corresponding to the specific webpage address.
- the application also provides a method for connecting to a server, including:
- the socket connection is initiated to the IP address corresponding to the specific webpage address
- the preset domain name resolution device refers to a device for performing IP address resolution on a specific webpage address according to a mapping relationship between a preset IP address and a domain name; and mapping between the IP address and the domain name.
- the domain name in the middle includes the protocol name and the host name, and at least one of the service port address and the web page path.
- it also includes:
- the domain name resolution request is sent to the preset DNS domain name resolution server, and the predetermined DNS domain name resolution server is requested to perform IP address resolution on the specific webpage address;
- the socket connection is initiated to the IP address corresponding to the specific webpage address. Pick up.
- the method before the sending the domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device, the method further includes:
- the preset domain name resolution device is activated.
- the preset domain name resolution device refers to a device for receiving a domain name resolution request corresponding to a specific webpage address sent by a client, and performing IP address resolution on a specific webpage address. .
- the preset domain name resolution device runs on the client.
- the method before the sending the domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device, the method further includes:
- the preset domain name resolution device is a component of a proxy server.
- the application further provides an apparatus for connecting to a server, including:
- a first sending unit configured to send a domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device, and request the domain name resolution device to perform IP address resolution on the specific webpage address;
- a first receiving unit configured to receive a response sent by the preset domain name resolution device
- a first determining unit configured to determine, according to the response sent back by the preset domain name resolution device, whether the preset domain name resolution device acquires an IP address corresponding to the specific webpage address
- the first connecting unit is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- it also includes:
- the second sending unit is configured to send the domain name resolution request to the preset DNS domain name resolution server, if the result of the determination is negative, requesting the preset DNS domain name resolution server to perform IP address resolution on the specific webpage address ;
- a second receiving unit configured to receive a response sent by the preset DNS domain name resolution server
- a second determining unit configured to determine, according to the response sent by the preset DNS domain name resolution server, whether the preset DNS domain name resolution server obtains an IP address corresponding to the specific webpage address;
- the second connecting unit is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- it also includes:
- a startup unit configured to start the preset domain name resolution device, where the preset domain name resolution device is configured to receive a domain name resolution request corresponding to a specific webpage address sent by the client, and perform a domain name resolution request A device for IP address resolution.
- it also includes:
- a configuration unit configured to configure the preset domain name resolution device to perform IP address resolution on a specific webpage address corresponding to the domain name resolution request sent by the client.
- an electronic device including:
- a memory for storing a browser, the browser being executed by the processor, comprising: sending a domain name resolution request corresponding to a specific webpage address to a preset domain name resolution device, requesting the domain name resolution device to Determining, by the specific webpage address, the IP address resolution; receiving the response sent by the preset domain name resolution device; determining, according to the response sent by the preset domain name resolution device, whether the preset domain name resolution device acquires the specific The IP address corresponding to the webpage address; if the judgment result is yes, the socket connection is initiated to the IP address corresponding to the specific webpage address; wherein the preset domain name resolution device refers to a type The device for performing IP address resolution on a specific webpage address according to a mapping relationship between a preset IP address and a domain name; the domain name in the mapping relationship between the IP address and the domain name includes a protocol name and a host name, and a service port address And at least one of the webpage paths.
- the present application further provides a domain name resolution system, comprising: the domain name resolution device according to any one of the preceding claims; and the device for connecting to the server according to any one of the above.
- the application also provides a network proxy method, including:
- it also includes:
- the domain name resolution request corresponding to the specific webpage address is sent to the preset DNS domain name resolution server, and the predetermined DNS domain name resolution server is requested to perform an IP address on the specific webpage address.
- the method before the receiving the connection request sent by the client corresponding to the specific webpage address, the method further includes:
- the network proxy device refers to a connection request for receiving a specific webpage address sent by a client, and initiates a socket to a server corresponding to the specific webpage address.
- Word connected device refers to a connection request for receiving a specific webpage address sent by a client, and initiates a socket to a server corresponding to the specific webpage address.
- the network proxy device runs on the client.
- the method before the receiving the connection request sent by the client corresponding to the specific webpage address, the method further includes:
- the network proxy device adopts a proxy server.
- the method further includes:
- the domain name includes a protocol name and a host name, and at least one of a service port address and a webpage path.
- the searching using the specific webpage address as a retrieval basis, searching in a mapping relationship between a preset IP address and a domain name, and acquiring an IP address corresponding to the specific webpage address, including:
- the IP address of the current mapping relationship is used as an IP address corresponding to the specific webpage address
- the step of traversing the mapping relationship included in the mapping relationship set between the IP address and the domain name is returned, and determining whether the domain name of the next mapping relationship is a substring of the specific webpage address Until all the mapping relationships in the mapping relationship set between the IP address and the domain name are traversed.
- searching after searching, using the specific webpage address as a retrieval basis, searching in a mapping relationship set between a preset IP address and a domain name, and acquiring an IP address corresponding to the specific webpage address, include:
- mapping relationship between the IP address and the domain name is stored in the mapping relationship configuration file.
- the application further provides a network proxy device, including:
- Receiving a request unit configured to receive a connection request sent by the client corresponding to a specific webpage address
- a first domain name resolving unit configured to perform a search in a mapping relationship between a preset IP address and a domain name by using the specific webpage address in the connection request as a retrieval basis, and obtain the specific webpage address Corresponding IP address;
- a first determining unit configured to determine whether an IP address corresponding to the specific webpage address is obtained
- the first connecting unit is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- it also includes:
- a sending unit configured to send a domain name resolution request corresponding to the specific webpage address to the preset DNS domain name resolution server, and request the preset DNS domain name resolution server to perform the domain name resolution on the specific webpage address.
- Receiving a response unit configured to receive a response sent by the preset DNS domain name resolution server
- a second determining unit configured to determine, according to the response sent by the preset DNS domain name resolution server, whether the preset DNS domain name resolution server obtains an IP address corresponding to the specific webpage address;
- the second connecting unit is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- it also includes:
- a startup unit configured to start a network proxy device that executes the network proxy method; the network proxy device refers to a connection request for receiving a corresponding specific webpage address sent by a client, and corresponding to the specific webpage address
- the server initiates a socket connection device.
- it also includes:
- a configuration unit configured to configure the network proxy device to proxy a connection request sent by the client.
- it also includes:
- a setting unit configured to set a mapping relationship between the IP address and the domain name.
- the first domain name resolution unit includes:
- a determining subunit configured to traverse each mapping relationship included in the mapping relationship set between the IP address and the domain name, and determine whether the domain name of the current mapping relationship is a substring of the specific webpage address;
- the IP address of the current mapping relationship is used as a The IP address corresponding to the specific webpage address;
- it also includes:
- An obtaining unit configured to acquire a mapping relationship between the IP address and a domain name.
- an electronic device including:
- a memory configured to store a network proxy device, when the network proxy device is executed by the processor, comprising: receiving a connection request sent by a client corresponding to a specific webpage address; and using the specific webpage in the connection request
- the address is a search basis, and the search is performed in a set of mapping relationship between the preset IP address and the domain name, and an IP address corresponding to the specific webpage address is obtained; and whether the IP corresponding to the specific webpage address is obtained is determined. Address; if the result of the above determination is yes, a socket connection is initiated to the IP address corresponding to the specific webpage address.
- the domain name resolution method the method for connecting to the server, the network proxy method, and the corresponding device, the electronic device, and the system provided by the present application, by parsing the domain name resolution request corresponding to the specific webpage address sent by the received client, and obtaining the specific webpage address, And searching for a specific webpage address, searching in a set of mapping relationship between the preset IP address and the domain name, and obtaining an IP address corresponding to the specific webpage address, so that the client browser can set the webpage file when opening the webpage file Different ports or paths under the same domain name can be accessed to the specified machine to improve the user experience.
- FIG. 1 is a flowchart of an embodiment of a domain name resolution method of the present application
- FIG. 2 is a specific flowchart of a preparation phase of an embodiment of a domain name resolution method of the present application
- step S105 of the embodiment of the domain name resolution method of the present application
- FIG. 4 is a specific flowchart of determining, by the embodiment of the domain name resolution method of the present application, whether a domain name of a current mapping relationship is a substring of the specific webpage address;
- FIG. 5 is a schematic diagram of an embodiment of a domain name resolution apparatus of the present application.
- FIG. 6 is a specific schematic diagram of the retrieval unit 105 of the domain name resolution device embodiment of the present application.
- FIG. 7 is a specific schematic diagram of an embodiment of a domain name resolution apparatus of the present application.
- FIG. 8 is a schematic diagram of an embodiment of an electronic device of the present application.
- FIG. 9 is a flow chart of an embodiment of a method of connecting a server of the present application.
- FIG. 10 is a specific flowchart of an embodiment of a method for connecting a server according to the present application.
- FIG. 11 is a specific flowchart of a preparation phase of a method embodiment of a connection server according to the present application.
- connection server 12 is a schematic diagram of an apparatus embodiment of a connection server of the present application.
- connection server 13 is a detailed schematic diagram of an apparatus embodiment of a connection server according to the present application.
- FIG. 14 is still another specific schematic diagram of an apparatus embodiment of a connection server according to the present application.
- 15 is a schematic diagram of still another embodiment of an electronic device of the present application.
- 16 is a schematic diagram of an embodiment of a domain name resolution system of the present application.
- 17 is a flow chart of an embodiment of a network proxy method of the present application.
- 20 is a schematic diagram of an embodiment of a network proxy device of the present application.
- 21 is a detailed schematic diagram of an embodiment of a network proxy device of the present application.
- 22 is still another specific schematic diagram of an embodiment of a network proxy device of the present application.
- FIG. 23 is a schematic diagram of still another embodiment of an electronic device of the present application.
- a domain name parsing method, apparatus and electronic device a method, device and electronic device for connecting a server, a domain name resolution system, and a network proxy method, device and electronic device are provided. Detailed description will be made one by one in the following embodiments.
- the basic idea of the domain name parsing method provided by the present application is: performing a domain name parsing device capable of performing query and retrieval in a mapping relationship between a preset IP address and a domain name, and performing IP address parsing on a specific webpage address input by the client, Thereby obtaining the IP address of a specific webpage address.
- FIG. 1 is a flowchart of an embodiment of a domain name resolution method of the present application. The method includes the following steps:
- Step S101 Receive a domain name resolution request corresponding to a specific webpage address sent by the client.
- the client described in the embodiment of the present application includes, but is not limited to, a mobile communication device, that is, a mobile phone or a smart phone, and a terminal device such as a personal computer, a PAD, or an iPad.
- the user located at the client can send a domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device by inputting a specific webpage address in the address bar of the browser.
- the Uniform Resource Locator is a compact representation of the location and access methods of resources available on the Internet and is the address of standard resources on the Internet. Every file on the Internet has a unique URL that contains information indicating the location of the file and how the browser should handle it.
- the standard format of the Uniform Resource Locator is as follows: Protocol Type: Server Address (with port number if necessary) / Path / File Name, for example, a typical Uniform Resource Locator looks like this: http://www.1688 .com:80/search/index.jsp?
- FIG. 2 is a specific flowchart of a preparation phase of an embodiment of the domain name resolution method of the present application. Specifically, before the receiving the domain name resolution request corresponding to the specific webpage address sent by the client, the method further includes:
- Step S201 Start a preset domain name resolution device.
- the domain name resolution method provided by the embodiment of the present application is implemented by a domain name resolution device.
- the domain name resolution device in the embodiment of the present application refers to a device for receiving a domain name resolution request corresponding to a specific webpage address sent by a client, and performing IP address resolution on a specific webpage address. Therefore, to perform the domain name resolution method provided by the embodiment of the present application, the domain name resolution device is first started. After the domain name resolution device is started, the domain name resolution request sent by the client is waited for.
- the domain name resolution device in the embodiment of the present application can be run on a client that sends a domain name resolution request, and can also be run in other networked terminal devices, including a computer system providing domain name resolution services or other types of network terminals. For example: a network terminal such as a gateway or a router.
- the domain name resolution device can directly return the parsing result to the client, and the client directly initiates a socket connection to the obtained IP address; and the domain name resolution device can also be used as a proxy server (Proxy Server).
- the component enables the domain name resolution device to directly return the analysis result to the proxy server, and the proxy server initiates a socket connection to the acquired IP address.
- the preset domain name resolution device is used as an integral part of the proxy server, wherein the domain name resolution device is specifically responsible for receiving the domain name resolution request corresponding to the specific webpage address sent by the client, and performing IP on the specific webpage address. Address resolution, and after obtaining the IP address returned by the domain name resolution device, the proxy server initiates a socket connection to the obtained IP address. Therefore, in this embodiment, the operation of starting the preset domain name resolution device is the operation of starting the proxy server.
- the processing procedure of the proxy server for the connection request sent by the client includes the following steps: 1) the proxy server receives the corresponding specific network address sent by the client. The original connection request; 2) the proxy server changes the request to the domain name resolution request, and sends the domain name resolution request to the domain name resolution device; 3) the domain name resolution device responds to the domain name resolution request to obtain the IP address corresponding to the specific webpage address, And returning the parsing result to the proxy server; 4) the proxy server initiates a socket connection to the obtained IP address; 5) the proxy server returns the content of the received specific webpage address to the client browser.
- the method further includes:
- Step S203 Configure the preset domain name resolution device to perform IP address resolution on the specific webpage address corresponding to the domain name resolution request sent by the client.
- the default domain name resolution process is: the client operating system reads the Hosts domain name resolution file locally, and queries the Hosts file for the IP address corresponding to the specific webpage address in the request. The address, if present, returns the found IP address to the client; if not, the domain name resolution request is sent to the DNS domain name resolution server, and if the DNS domain name resolution server finds the IP address corresponding to the specific webpage address in the request , then return the found IP address to the client.
- the domain name resolution request sent by the client is received by the specific preset domain name resolution device, and the IP address resolution is performed on the specific webpage address. To do this, you need to pre-configure the domain name resolution device to receive the domain name resolution request sent by the client instead of reading the default Hosts domain name resolution file.
- the preset domain name resolution device is used as an integral part of the proxy server. Therefore, the preset domain name resolution device is configured to be responsible for resolving the operation of the IP address, that is, configuring the operation of the specified proxy server. Specifically, the proxy server including the domain name resolution device can be set in the tool menu of the client browser.
- the domain name resolution method provided by the embodiment of the present application is based on a mapping relationship between a preset IP address and a domain name. Therefore, before the starting the preset domain name resolution device, the method further includes:
- Step S200 Set a mapping relationship between the IP address and the domain name.
- the domain name resolution method provided in the embodiment of the present application can solve the problem that the existing Hosts domain name resolution file format does not support ports and paths.
- the mapping relationship between the IP address and the domain name in the embodiment of the present application includes the mapping relationship between multiple IP addresses corresponding to the same domain name, the mapping relationship between one IP address and one domain name, or the mapping relationship between multiple IP addresses corresponding to multiple domain names.
- the domain name can be combined with the service port address or the webpage path, so that different service port addresses or webpage paths under the same domain name can correspond to different IP addresses, thereby achieving different under the same domain name. Services can point to different IP addresses or different servers.
- the mapping relationship between the IP address and the domain name may be stored in various storage formats according to specific application requirements, such as a text format and a database format.
- the configuration file may be read into the memory when the domain name resolution device is started, so as to improve the efficiency of the query matching; when the data table format is used to store the
- the mapping between the IP address and the domain name is received, when the domain name resolution request is received, the webpage address in the request is used as a search basis, and the data table is searched to obtain the corresponding IP address.
- the various storage formats described above are only variations of the specific implementations, and do not depart from the core of the present application, and are therefore within the scope of the present application.
- the mapping relationship between the IP address and the domain name is stored in a configuration file in a text format.
- the configuration file includes two columns, separated by tabs, the first column is the IP address of the server, and the second column is the domain name that can include the host name, port, and path as described in the embodiment of the present application.
- the configuration file is written as follows:
- the configuration file is read into the memory and forms a data structure as shown in Table 1:
- mapping of ports that are not specified is automatically set to port 80.
- mapping between the IP address and the domain name can support the port and the path, so that different ports or paths under the same domain name can be mapped to different servers.
- Step S103 Parse the domain name resolution request to obtain the specific webpage address.
- Step S105 Searching in the mapping relationship between the preset IP address and the domain name by using the specific webpage address as a retrieval basis, and acquiring an IP address corresponding to the specific webpage address.
- step S105 where the specific webpage address in the domain name resolution request is used as a search basis, and the search is performed in a mapping relationship between the preset IP address and the domain name, and the specific webpage address is obtained.
- the corresponding IP address To implement step S105, first, a mapping relationship set between the IP address and the domain name needs to be acquired.
- the manner of obtaining the mapping relationship between the IP address and the domain name and the mapping relationship are saved.
- the storage method is related, and different storage methods acquire mapping relationships in different ways.
- the mapping relationship between the IP address and the domain name is stored in a text format
- the configuration file may be read when the domain name resolution device is started, and the mapping relationship is read into the memory to query the matching in step S105;
- the table format stores the mapping relationship between the IP address and the domain name
- the web page address in the request is used as a search basis in step S105, and the data table is searched in real time to obtain a corresponding IP address.
- the mapping relationship between the IP address and the domain name is stored in a configuration file in a text format, and the mapping relationship between the IP address and the domain name is obtained by adopting the following manner: reading storage
- the configuration file of the mapping relationship between the IP address and the domain name acquires a mapping relationship between the IP address and the domain name.
- FIG. 3 is a specific flowchart of step S105 of the embodiment of the domain name resolution method of the present application.
- the searching using the specific webpage address as a retrieval basis, searching in a mapping relationship between a preset IP address and a domain name, and acquiring an IP address corresponding to the specific webpage address, includes:
- Step S1051 traverse each mapping relationship included in the mapping relationship set between the IP address and the domain name, and determine whether the domain name of the current mapping relationship is a substring of the specific webpage address.
- each mapping relationship included in the mapping relationship between the specific webpage address and the IP address and the domain name is matched one by one to find an IP address corresponding to the specific webpage address.
- a specific web page address is a uniform resource locator, which may include a port, a path, a file name, or a query parameter in addition to the protocol type and host name.
- the domain name in the mapping relationship between the IP address and the domain name usually includes the protocol type and the host name, and the port and/or the path. Therefore, when performing the matching query, it is not simple to determine whether the domain name in the mapping relationship is the same as the specific webpage address. Instead, determine whether the domain name of the mapping relationship is a substring of a specific web page address.
- FIG. 4 is a specific flowchart of determining whether a domain name of a current mapping relationship is a sub-string of the specific webpage address according to an embodiment of the domain name resolution method of the present application. Specifically, the determining whether the domain name of the current mapping relationship is a substring of the specific webpage address includes:
- Step S401 splicing the constituent elements of the domain name into a character string.
- Step S403 Determine whether the spliced character string is a substring of the specific webpage address.
- the mapping relationship between the IP address and the domain name is stored in the configuration file.
- the mapping relationship between each IP address and the domain name in the configuration file is pre-read and stored in the memory, and the various constituent elements of the domain name are separately stored, as shown in Table 1 above.
- the various constituent elements of the domain name are spliced through step S401, thereby obtaining the domain name corresponding to the IP address as a whole. And determining, by step S403, whether the spliced character string is a sub-string of the specific webpage address, thereby realizing whether the domain name of the current mapping relationship is a sub-string of the specific webpage address.
- Step S1052 If the result of the determination is YES, the IP address of the current mapping relationship is used as an IP address corresponding to the specific webpage address.
- Step S1053 If the result of the determination is no, returning to the step of traversing each mapping relationship included in the mapping relationship set between the IP address and the domain name, and determining whether the domain name of the next mapping relationship is the specific webpage address. The substring is traversed until all the mapping relationships in the mapping relationship between the IP address and the domain name are traversed.
- the domain name of the current mapping relationship is determined to be a sub-string of the specific webpage address, corresponding to step S1052, and the traversal operation ends; otherwise, the judging step is determined in step S1051.
- the domain name of the current mapping relationship is not a substring of a specific webpage address, and corresponds to step S1053.
- step S1053 returns the step of traversing the mapping relationship included in the mapping relationship set between the IP address and the domain name, that is, step S1051, continue to determine Whether the domain name of the next mapping relationship is a substring of the specific webpage address until all the mapping relationships in the mapping relationship set between the IP address and the domain name are traversed.
- the method further includes: returning, to the client, the obtained IP address corresponding to the specific webpage address.
- step S101 after the domain name resolution processing is completed through steps S101, S103, and S105, the result of the domain name resolution is sent back to the client that sends the domain name resolution request. If an IP address corresponding to a specific webpage address is found, the returned result is the obtained IP address, and the client will initiate a socket connection to the IP address. If the IP address corresponding to the specific webpage address is not found, the returned result is empty, indicating that the mapping relationship is not defined in the mapping relationship between the IP address and the domain name, and the client obtains the actual value through the DNS domain name resolution server. IP address and initiate a socket connection to the IP address.
- a domain name resolution method is provided.
- the present application further provides a domain name resolution device.
- the device corresponds to an embodiment of the above method.
- FIG. 5 is a schematic diagram of an embodiment of a domain name resolution apparatus of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative.
- the receiving unit 101 is configured to receive a domain name resolution request sent by the client and corresponding to a specific webpage address;
- the parsing unit 103 is configured to parse the domain name resolution request, and obtain the specific webpage address;
- the searching unit 105 is configured to perform a search in the mapping relationship between the preset IP address and the domain name by using the specific webpage address as a retrieval basis, and acquire an IP address corresponding to the specific webpage address.
- FIG. 6 is a specific schematic diagram of the retrieval unit 105 of the domain name resolution device embodiment of the present application.
- the searching unit 105 includes:
- the traversing determination sub-unit 1051 is configured to traverse each mapping relationship included in the mapping relationship set between the IP address and the domain name, and determine whether the domain name of the current mapping relationship is a sub-string of the specific webpage address;
- the setting subunit 1053 is configured to: if the determination result is yes, use the IP address of the current mapping relationship as an IP address corresponding to the specific webpage address;
- each component element of the domain name in the current mapping relationship is separately stored, and the component elements of the domain name include a protocol name and a host name, and at least one of a service port address and a webpage path;
- the traversal judgment subunit 1051 includes:
- a determining subunit configured to determine whether the domain name of the current mapping relationship is a substring of the specific webpage address
- the determining subunit includes:
- a splicing subunit configured to splicing each component element of the domain name into a string
- the first determining subunit is configured to determine whether the spliced string is a substring of the specific webpage address.
- FIG. 7 is a specific schematic diagram of an embodiment of a domain name resolution apparatus of the present application.
- it also includes:
- the loopback unit 209 is configured to send back the obtained IP address corresponding to the specific webpage address to the client.
- it also includes:
- the obtaining unit 201 is configured to obtain a mapping relationship between the IP address and the domain name.
- it also includes:
- the startup unit 202 is configured to start a preset domain name resolution device.
- the preset domain name resolution device refers to a domain name resolution request for receiving a specific webpage address sent by the client, and performing IP address on the specific webpage address. Device for address resolution.
- it also includes:
- the configuration unit 203 is configured to configure the preset domain name resolution device to perform IP address resolution on a specific webpage address corresponding to the domain name resolution request sent by the client.
- it also includes:
- the setting unit 204 is configured to set a mapping relationship between the IP address and the domain name.
- the embodiment of the present application further provides an electronic device, as shown in FIG. 8, the electronic device includes: a display 801; a processor 802; and a memory 803, configured to store a domain name resolution device, where the domain name resolution device is
- the method includes the following steps: receiving a domain name resolution request corresponding to a specific webpage address sent by the client; parsing the domain name resolution request, acquiring the specific webpage address; using the specific webpage address as a retrieval basis, Searching is performed in a set of mapping relationships between the preset IP address and the domain name, and obtaining an IP address corresponding to the specific webpage address.
- An electronic device as a networked device, includes a computer system or other type of network terminal that provides a domain name resolution service.
- a computer system providing a domain name resolution service including a personal computer, a terminal device such as a PAD, an iPad, and a mobile communication device, that is, a so-called mobile phone or a smart phone.
- Other types of network terminals include network terminals such as gateways or routers.
- FIG. 9 is a flowchart of an embodiment of a method for connecting a server according to the present application. The parts of the embodiment that are identical to the content of the first embodiment are not described again. Please refer to the corresponding part in the first embodiment.
- a method for connecting to a server provided by the present application includes:
- Step S901 Send a domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device, and request the domain name resolution device to perform IP address resolution on the specific webpage address.
- a specific webpage address is input in the address bar of the client browser, and then a domain name resolution request corresponding to the specific webpage address is sent to the preset domain name resolution apparatus.
- the domain name resolution device in the embodiment of the present application is responsible for performing IP address resolution on a specific webpage address according to the domain name resolution request.
- the preset domain name resolution device refers to a device for performing IP address resolution on a specific webpage address according to a mapping relationship between a preset IP address and a domain name; between the IP address and the domain name
- the domain name in the mapping relationship includes a protocol name and a host name, and at least one of a service port address and a web page path. Therefore, to perform the method for connecting to the server provided by the embodiment of the present application, the domain name resolution device is first started, and after the domain name resolution device is started, the domain name resolution request sent by the client is waited for.
- the domain name resolution device can run on the client that sends the domain name resolution request, and can also run on other networked terminal devices, including a computer system providing domain name resolution service or other types of network terminals, such as a network such as a gateway or a router. terminal.
- Step S903 Receive a response sent back by the preset domain name resolution device.
- the domain name resolution result is sent back to the domain name resolution request.
- the response sent by the domain name resolution device in the embodiment of the present application includes two results: 1) if the domain name resolution device finds an IP address corresponding to a specific webpage address, the returned response result is the obtained IP address, and the client will The socket connection is initiated to the IP address; 2) if the domain name resolution device does not find the IP address corresponding to the specific webpage address, the returned response result is empty, indicating that the mapping is not defined by the domain name resolution device, and the client The endpoint will obtain the actual IP address through the DNS domain name resolution server, and then initiate a socket connection to the IP address returned by the DNS domain name resolution server.
- Step S905 Determine, according to the response sent back by the preset domain name resolution device, whether the preset domain name resolution device acquires an IP address corresponding to the specific webpage address.
- Step S907 If the result of the above determination is yes, initiate a socket connection to the IP address corresponding to the specific webpage address.
- step S905 it is determined whether the preset domain name resolution device obtains an IP address corresponding to the specific webpage address. If the domain name resolution device finds the IP address corresponding to the specific webpage address, the returned result is the obtained IP address, and the client A socket connection will be initiated for this IP address.
- FIG. 10 is a specific flowchart of an embodiment of a method for connecting a server according to the present application. Specifically, it also includes:
- Step S1001 If the result of the determination is no, the domain name resolution request is sent to the preset DNS domain name resolution server, and the predetermined DNS domain name resolution server is requested to perform IP address resolution on the specific webpage address.
- step S905 it is determined whether the preset domain name resolution device obtains an IP address corresponding to the specific webpage address. If the IP address corresponding to the specific webpage address is not found, the returned result is empty, indicating that the mapping relationship is not defined. The client will obtain the actual IP address through the DNS domain name resolution server, and then initiate a socket connection to the IP address returned by the DNS domain name resolution server.
- Step S1003 Receive a response sent back by the preset DNS domain name resolution server.
- Step S1005 Determine, according to the response sent by the preset DNS domain name resolution server, whether the preset DNS domain name resolution server acquires an IP address corresponding to the specific webpage address.
- Step S1007 If the result of the above determination is yes, initiate a socket connection to the IP address corresponding to the specific webpage address.
- Step S1003, step S1005, and step S1007 are in one-to-one correspondence with the foregoing steps S903, S905, and S907.
- the only difference is that the device that returns the domain name resolution result is a DNS domain name resolution server, and the details are not described herein again.
- FIG. 11 It is a specific flowchart of a preparation phase of a method embodiment of connecting to a server provided by the present application. Specifically, before the sending the domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device, the method further includes:
- Step S1101 Start the preset domain name resolution device.
- the method for connecting to a server provided by the embodiment of the present application relies on a preset domain name resolution device to process a domain name resolution request of a client. Therefore, to perform the method provided by the embodiment of the present application, the preset domain name resolution device is first started. After the preset domain name resolution device is started, the domain name resolution request sent by the client is waited for.
- the domain name resolution device in the embodiment of the present application can be run on a client that sends a domain name resolution request, and can also be run in other networked terminal devices, including a computer system providing domain name resolution services or other types of network terminals. For example: a network terminal such as a gateway or a router.
- the domain name resolution device can directly return the parsing result to the client, and the client directly initiates a socket connection to the obtained IP address; and the domain name resolution device can also be used as a proxy server (Proxy Server).
- the component enables the domain name resolution device to directly return the analysis result to the proxy server, and the proxy server initiates a socket connection to the acquired IP address.
- the preset domain name resolution device is used as an integral part of the proxy server, wherein the domain name resolution device is specifically responsible for receiving the domain name resolution request corresponding to the specific webpage address sent by the client, and performing IP on the specific webpage address. Address resolution, and after obtaining the IP address returned by the domain name resolution device, the proxy server initiates a socket connection to the obtained IP address. Therefore, in this embodiment, the operation of starting the preset domain name resolution device is the operation of starting the proxy server.
- the processing procedure of the proxy server for the connection request sent by the client includes the following steps: 1) the proxy server receives the corresponding specific network address sent by the client. The original connection request; 2) the proxy server changes the request to the domain name resolution request, and sends the domain name resolution request to the domain name resolution device; 3) the domain name resolution device responds to the domain name resolution request to obtain the IP address corresponding to the specific webpage address, And returning the parsing result to the proxy server; 4) the proxy server initiates a socket connection to the obtained IP address; 5) the proxy server returns the content of the received specific webpage address to the client browser.
- the method further includes:
- Step S1103 Configure the preset domain name resolution device to perform IP address resolution on a specific webpage address corresponding to the domain name resolution request sent by the client.
- the domain name resolution device in the domain name resolution method of the first embodiment has the same working principle and function, and the startup method and the configuration method of the two are the same. For details, refer to the domain name resolution device in the domain name resolution method of the first embodiment, and details are not described herein again.
- the preset domain name resolution device is used as an integral part of the proxy server. Therefore, the preset domain name resolution device is configured to be responsible for resolving the operation of the IP address, that is, configuring the operation of the specified proxy server. Specifically, the proxy server including the domain name resolution device can be set in the tool menu of the client browser.
- a method for connecting to a server is provided.
- the present application further provides an apparatus for connecting to a server.
- the device corresponds to an embodiment of the above method.
- FIG. 12 is a schematic diagram of an apparatus embodiment of a connection server according to the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative.
- the first sending unit 1201 is configured to send a domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device, and request the domain name resolution device to perform IP address resolution on the specific webpage address;
- the first receiving unit 1203 is configured to receive a response sent back by the preset domain name resolution device.
- the first determining unit 1205 is configured to determine, according to the response sent back by the preset domain name resolution device, whether the preset domain name resolution device acquires an IP address corresponding to the specific webpage address;
- the first connecting unit 1207 is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- FIG. 13 is a specific schematic diagram of an apparatus embodiment of a connection server according to the present application.
- it also includes:
- the second sending unit 1301 is configured to send the domain name resolution request to the preset DNS domain name resolution server, if the result of the determination is negative, requesting the preset DNS domain name resolution server to perform an IP address on the specific webpage address.
- the second receiving unit 1303 is configured to receive a response sent by the preset DNS domain name resolution server.
- the second determining unit 1305 is configured to determine, according to the response sent by the preset DNS domain name resolution server, whether the preset DNS domain name resolution server obtains an IP address corresponding to the specific webpage address;
- the second connecting unit 1307 is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- FIG. 14 is still another specific schematic diagram of an apparatus embodiment of a connection server according to the present application.
- it also includes:
- the startup unit 1401 is configured to start the preset domain name resolution device, and the preset domain name resolution device refers to a domain name resolution request for receiving a specific webpage address sent by the client, and the specific webpage address is A device that performs IP address resolution.
- it also includes:
- the configuration unit 1403 is configured to configure the preset domain name resolution device to perform IP address resolution on a specific webpage address corresponding to the domain name resolution request sent by the client.
- the embodiment of the present application further provides another electronic device.
- the electronic device includes: a display 1501; a processor 1502; and a memory 1503, configured to store a browser, where the browser is
- the method includes the following steps: sending a domain name resolution request corresponding to a specific webpage address to the preset domain name resolution device, requesting the domain name resolution device to perform IP address resolution on the specific webpage address; and receiving the preset a response sent back by the domain name resolution device; determining, according to the response sent by the preset domain name resolution device, whether the preset domain name resolution device obtains an IP address corresponding to the specific webpage address; if the determination result is yes And initiating a socket connection to the IP address corresponding to the specific webpage address.
- the preset domain name resolution device in the embodiment of the present application refers to a device for performing IP address resolution on a specific webpage address according to a mapping relationship between a preset IP address and a domain name; the IP address and the domain name
- the domain name in the mapping relationship includes the protocol name and the host name, and at least one of the service port address and the web page path.
- the electronic device includes, but is not limited to, a mobile communication device, that is, a so-called mobile phone or a smart phone, and a terminal device such as a personal computer, a PAD, an iPad, and the like.
- the user located in the electronic device can send a domain name resolution request corresponding to the specific webpage address to the preset domain name resolution device by inputting a specific webpage address in the address bar of the browser.
- the embodiment of the present application further provides a domain name resolution system.
- the system includes the domain name resolution device 1601 and the device 1602 connected to the server.
- the domain name resolution device is usually deployed on a proxy server, but is not limited to a proxy server, and may be any device capable of implementing the domain name resolution method, including a computer system providing domain name resolution service or other types of network terminals, for example, : a network terminal such as a gateway or a router; the device connected to the server is usually deployed on a mobile communication device, a personal computer, a PAD, an iPad And other terminal equipment.
- the device connected to the server is deployed on the smart phone, and can send a domain name resolution request corresponding to the specific webpage address;
- the domain name resolution device is deployed on the proxy server, and receives the domain name resolution request corresponding to the specific webpage address sent by the device connected to the server.
- searching for a specific webpage address searching in a set of mapping relationship between the preset IP address and the domain name, thereby obtaining an IP address corresponding to the specific webpage address.
- FIG. 17 is a flowchart of an embodiment of a network proxy method provided by the present application. The parts of the embodiment that are identical to the content of the first embodiment are not described again. Please refer to the corresponding part in the first embodiment.
- a network proxy method provided by the present application includes:
- Step S1701 Receive a connection request sent by the client corresponding to a specific webpage address.
- the client and the specific webpage address in the embodiment of the present application are the same as the client and the specific webpage address in the domain name resolution method of the first embodiment. For details, refer to the related method in the domain name resolution method of the first embodiment. Part, I will not repeat them here.
- the client in the embodiment of the present application is a client that is proxyed by the network proxy device, and the connection request sent by the client is forwarded to the network proxy device connected thereto, and the network proxy device is responsible for Initiate a socket request to the server where the specific web page address is located.
- a proxy also known as a network proxy, is a special type of network service that allows a network terminal (typically a client) to make an indirect connection with another network terminal (typically a server) through this service.
- a computer system or other type of network terminal that provides proxy services is called a proxy server.
- a proxy server is an important server security feature that works primarily at the session level of the Open Systems Interconnection (OSI) model, which acts as a firewall. Proxy servers are mostly used to connect to INTERNET (Internet) and Local Area Network (LAN).
- INTERNET Internet
- LAN Local Area Network
- a complete proxy request process is: the client first creates a connection with the proxy server, and then requests to create a connection to the target server or obtain the specified resource (such as a file) of the target server according to the proxy protocol used by the proxy server. In the latter case, the proxy server may download the resources of the target server to the local cache. If the resources to be acquired by the client are in the cache of the proxy server, the proxy server does not send the request to the target server, but directly Returns the cached resource. Some proxy protocols allow the proxy server to change the client's original request, the original response of the target server, to meet the needs of the proxy protocol. Proxy server options and settings are typically included in a computer program that allows the user to enter a proxy address that masks their network activity and allows network filtering to be bypassed by Internet filtering.
- FIG. 18 is a specific flowchart of a preparation phase of an embodiment of a network proxy method provided by the present application. Specifically, at the receiving guest Before the connection request sent by the client corresponding to a specific webpage address, the method further includes:
- Step S1801 Start a network proxy device that executes the network proxy method.
- the network proxy device in the embodiment of the present application refers to a device for receiving a connection request sent by a client corresponding to a specific webpage address, and initiating a socket connection to a server corresponding to the specific webpage address.
- the network proxy method provided by the embodiment of the present application is executed by using a preset network proxy device. Therefore, to perform the method provided by the embodiment of the present application, first, a network proxy device that executes the network proxy method is started, and when the network proxy device that executes the network proxy method is started, it will wait for a connection request sent by the client.
- the network proxy device described in this embodiment of the present application can be run on a client that sends a connection request, and can also be run in other networked terminal devices, including a computer system providing proxy services or other types of network terminals, for example: A network terminal such as a gateway or router. In this embodiment, the network proxy device runs on the client.
- the method further includes:
- Step S1803 Configure the network proxy device to proxy the connection request sent by the client.
- the configuration of the preset network proxy device is responsible for the operation of proxying the connection request sent by the client, that is, configuring the operation of the specified proxy server. Specifically, you can set the proxy server in the tool menu of the client browser.
- the network proxy method provided by the embodiment of the present application is based on a mapping relationship between a preset IP address and a domain name. Therefore, before the initiating the network proxy device that executes the network proxy method, the method further includes:
- Step S1800 Set a mapping relationship between the IP address and the domain name.
- the step S1800 in the embodiment of the present application is the same as the step S200 in the domain name resolution method of the first embodiment.
- the step S1800 in the embodiment of the present application is the same as the step S200 in the domain name resolution method of the first embodiment.
- Step S1703 Searching in the mapping relationship between the preset IP address and the domain name by using the specific webpage address in the connection request as a retrieval basis, and acquiring an IP address corresponding to the specific webpage address.
- the network proxy method provided by the embodiment of the present application first needs to perform IP address resolution processing on a specific webpage address after receiving a connection request corresponding to a specific webpage address sent by the client.
- the step S1703 in the embodiment of the present application is the same as the step S105 in the domain name resolution method of the first embodiment. For details, refer to the related parts in the domain name resolution method of the first embodiment, and details are not described herein again.
- the specific embodiment of step S1703 described below is only It is only indicative.
- the searching searching in a mapping relationship between a preset IP address and a domain name, and acquiring an IP address corresponding to the specific webpage address, including :1) traversing each mapping relationship included in the mapping relationship set between the IP address and the domain name, determining whether the domain name of the current mapping relationship is a substring of the specific webpage address; 2) if the above judgment result is yes, The IP address of the current mapping relationship is used as an IP address corresponding to the specific webpage address; 3) if the result of the determination is no, returning the traversal of the mapping relationship between the IP address and the domain name included And the step of determining the mapping of the domain name of the next mapping relationship to the sub-string of the specific webpage address until all the mapping relationships in the mapping relationship set between the IP address and the domain name are traversed.
- the method further includes: obtaining a mapping relationship between the IP address and the domain name.
- mapping relationship between the IP address and the domain name is stored in the mapping relationship configuration file.
- Step S1705 determining whether an IP address corresponding to the specific webpage address is obtained.
- Step S1707 If the result of the above determination is yes, initiate a socket connection to the IP address corresponding to the specific webpage address.
- step S1705 determines whether an IP address corresponding to the specific webpage address is acquired according to the result of the domain name resolution. In step S1705, it is determined whether the preset domain name resolution device obtains an IP address corresponding to the specific webpage address. If the IP address corresponding to the specific webpage address is found, the result of the parsing is the obtained IP address, and the pair is obtained by step S1707. This IP address initiates a socket connection.
- FIG. 19 is a specific flowchart of an embodiment of a network proxy method provided by the present application. Specifically, it also includes:
- Step S1901 If the result of the determination is no, send a domain name resolution request corresponding to the specific webpage address to the preset DNS domain name resolution server, and request the preset DNS domain name resolution server to perform an IP address on the specific webpage address. Analysis.
- step S1903 it is determined whether the preset domain name resolution device obtains an IP address corresponding to the specific webpage address. If the IP address corresponding to the specific webpage address is not found, the parsing result is empty, indicating that the preset IP address is If the mapping relationship is not defined in the mapping relationship between the domain names, the actual IP address will be obtained through the DNS domain name resolution server, and then the socket connection will be initiated to the IP address returned by the DNS domain name resolution server.
- Step S1903 Receive a response sent back by the preset DNS domain name resolution server.
- Step S1905 Determine, according to the response sent by the preset DNS domain name resolution server, whether the preset DNS domain name resolution server acquires an IP address corresponding to the specific webpage address.
- Step S1907 If the result of the above determination is yes, a socket connection is initiated to the IP address corresponding to the specific webpage address.
- Step S1903, step S1905, and step S1907 are in one-to-one correspondence with the foregoing steps S1703, S1705, and S1707.
- the only difference is that the device that returns the domain name resolution result is a DNS domain name resolution server, and the details are not described herein again.
- a network proxy method is provided.
- the present application further provides a network proxy device.
- the device corresponds to an embodiment of the above method.
- FIG. 20 is a schematic diagram of an embodiment of a network proxy device of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
- the device embodiments described below are merely illustrative.
- the receiving request unit 2001 is configured to receive a connection request sent by the client corresponding to a specific webpage address
- the first domain name resolution unit 2003 is configured to perform a search in the mapping relationship set between the preset IP address and the domain name by using the specific webpage address in the connection request as a retrieval basis, and obtain the specific webpage address Corresponding IP address;
- the first determining unit 2005 is configured to determine whether an IP address corresponding to the specific webpage address is obtained
- the first connection unit 2007 is configured to initiate a socket connection to the IP address corresponding to the specific webpage address if the determination result is yes.
- FIG. 21 is a specific schematic diagram of an embodiment of a network proxy device according to the present application.
- it also includes:
- the sending unit 2101 is configured to: if the determination result is no, send a domain name resolution request corresponding to the specific webpage address to the preset DNS domain name resolution server, and request the preset DNS domain name resolution server to the specific webpage address Perform IP address resolution;
- the receiving response unit 2103 is configured to receive a response sent by the preset DNS domain name resolution server.
- the second determining unit 2105 is configured to determine, according to the response sent by the preset DNS domain name resolution server, whether the preset DNS domain name resolution server obtains an IP address corresponding to the specific webpage address;
- a second connecting unit 2107 configured to: if the determination result is yes, the opposite to the specific webpage address
- the socket address is initiated by the IP address.
- FIG. 22 is still another specific schematic diagram of an embodiment of the network proxy device of the present application.
- it also includes:
- the obtaining unit 2201 is configured to obtain a mapping relationship between the IP address and the domain name.
- it also includes:
- the initiating unit 2202 is configured to start a network proxy device that executes the network proxy method.
- the network proxy device refers to a connection request for receiving a corresponding specific webpage address sent by the client, and the address is sent to the specific webpage address.
- the corresponding server initiates a socket connection device.
- it also includes:
- the configuration unit 2203 is configured to configure the network proxy device to proxy a connection request sent by the client.
- it also includes:
- the setting unit 2204 is configured to set a mapping relationship between the IP address and the domain name.
- the first domain name resolution unit 2003 includes:
- a determining subunit configured to traverse each mapping relationship included in the mapping relationship set between the IP address and the domain name, and determine whether the domain name of the current mapping relationship is a substring of the specific webpage address;
- the embodiment of the present application further provides another electronic device, as shown in FIG. 23, the electronic device includes: a display 2301; a processor 2302; and a memory 2303, configured to store a network proxy device, where the network proxy device is
- the method includes the following steps: receiving a connection request that is sent by the client and corresponding to a specific webpage address; using the specific webpage address in the connection request as a retrieval basis, in a preset IP address and a domain name Searching in the set of mapping relationships, obtaining an IP address corresponding to the specific webpage address; determining whether an IP address corresponding to the specific webpage address is obtained; if the determination result is yes, The IP address corresponding to the specific webpage address initiates a socket connection.
- An electronic device serves as a networked device, including a computer system providing network proxy services or other types of network terminals.
- a computer system providing network proxy services including personal computers, Terminal devices such as PAD, iPad, and mobile communication devices, that is, commonly referred to as mobile phones or smart phones.
- Other types of network terminals include network terminals such as gateways or routers.
- the domain name resolution method the method for connecting to the server, the network proxy method, and the corresponding device, the electronic device, and the system provided by the present application, by parsing the domain name resolution request corresponding to the specific webpage address sent by the received client, and obtaining the specific webpage address, And searching according to a specific webpage address, searching in a set of mapping relationship between the preset IP address and the webpage address, and obtaining an IP address corresponding to the specific webpage address, so that when the client browser opens the webpage file, Set the different ports or paths under the same domain name to access the specified machine respectively, so as to improve the user experience.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media including both permanent and non-persistent, removable and non-removable media may be implemented by any method or technology.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
- the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本申请公开了一种域名解析方法、装置及系统。其中所述域名解析方法包括:接收客户端发送的对应特定网页地址的域名解析请求;解析所述域名解析请求,获取所述特定网页地址;以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。采用本申请提供的方法,使得客户端浏览器打开网页文件时,能够设置同一个域名下不同端口或路径分别访问到指定的机器,从而达到提高用户体验的效果。
Description
本申请要求2015年05月21日递交的申请号为201510262429.2、发明名称为“一种域名解析方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及互联网技术领域,具体涉及一种域名解析方法、装置及电子设备。本申请同时涉及一种连接服务器的方法、装置及电子设备,以及一种域名解析系统。本申请还涉及一种网络代理方法、装置及电子设备。
域名解析是把域名指向网站空间IP地址,让人们通过注册的域名可以方便地访问到网站一种服务。IP地址是网络上标识站点的数字地址,为了方便记忆,采用域名来代替IP地址标识站点地址。域名解析就是域名到IP地址的转换过程。
客户端用户通过在浏览器中输入网页地址向指定服务器请求服务时,包括两个步骤:1)根据网页地址获取IP地址;2)根据IP地址向指定服务器发出请求。其中,根据网页地址获取IP地址的常用方法为:当客户端用户在浏览器中输入一个需要登录的网址时,客户端操作系统会首先自动从Hosts域名解析文件中寻找对应的IP地址,一旦找到,客户端操作系统会立即把请求发送到该IP地址打开对应网页;如果没有找到,则客户端操作系统会将网页地址提交给DNS域名解析服务器,由DNS域名解析服务器进行IP地址的解析,当接收到DNS域名解析服务器返回的IP地址时,客户端操作系统直接把请求发送到该IP地址打开对应网页。
上述域名解析Hosts文件是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”。一个传统的Hosts文件格式是这样的:
127.0.0.1 localhost
10.6.1.198www.1688.com
10.6.1.123style.c.aliimg.com
其中第一列是IP地址,第二列是主机名(域名),表示若当前系统有通过HTTP访
问第二列给定主机名的资源时,应向第一列指定的IP地址发起连接请求,而无需经过DNS解析IP地址。综上所述,通过查询Hosts文件能够根据指定域名访问指定机器。
在实际应用中,当用户浏览网页时,经常需要设置同一个域名下不同端口或路径,能分别访问到指定的机器,即:同一个域名下的不同端口或路径需要映射到不同的服务器,例如,用户希望www.1688.com:80访问到机器A,www.1688.com:8080访问到机器B,或者www.1688.com/path1访问到机器C,www.1688.com/path2访问到机器D。
然而,现有的域名解析Hosts文件格式存在一个局限,即:不支持端口和路径,例如,以下的写法用现有的Hosts规范来说是错误的,也是无法实现预期的目标:
10.6.1.123www.1688.com:80
10.6.1.124www.1688.com:8080
10.6.1.125www.1688.com/path1
10.6.1.126www.1688.com/path2
由此可见,由于域名解析Hosts文件格式不支持端口和路径,因此通过Hosts文件无法实现将同一个域名下的不同端口或路径映射到不同的服务器。
发明内容
本申请提供一种域名解析方法、装置及电子设备,以解决现有技术存在的通过Hosts文件无法实现将同一个域名下的不同端口或路径映射到不同的服务器的问题。本申请另外提供一种连接服务器的方法、装置及电子设备,以及一种域名解析系统。本申请还涉及一种网络代理方法、装置及电子设备。
本申请提供一种域名解析方法,包括:
接收客户端发送的对应特定网页地址的域名解析请求;
解析所述域名解析请求,获取所述特定网页地址;
以所述特定网页地址为检索依据,在预设的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地址。
此外,本申请还提供一种连接服务器的方法,包括:
向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;
接收所述预设的域名解析装置回送的应答;
根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;
若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接;
其中所述预设的域名解析装置,是指一种根据预设的IP地址与域名之间的映射关系,对特定网页地址进行IP地址解析的装置;所述IP地址与域名之间的映射关系中的域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
可选的,还包括:
若上述判断结果为否,则向预设的DNS域名解析服务器发送所述域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;
接收所述预设的DNS域名解析服务器回送的应答;
根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;
若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连
接。
可选的,在所述向预设的域名解析装置发送对应特定网页地址的域名解析请求之前,还包括:
启动所述预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
可选的,所述预设的域名解析装置运行在所述客户端。
可选的,在所述向预设的域名解析装置发送对应特定网页地址的域名解析请求之前,还包括:
配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
可选的,所述预设的域名解析装置是代理服务器的组成部分。
相应的,本申请还提供一种连接服务器的装置,包括:
第一发送单元,用于向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;
第一接收单元,用于接收所述预设的域名解析装置回送的应答;
第一判断单元,用于根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;
第一连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
可选的,还包括:
第二发送单元,用于若上述判断结果为否,则向预设的DNS域名解析服务器发送所述域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;
第二接收单元,用于接收所述预设的DNS域名解析服务器回送的应答;
第二判断单元,用于根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;
第二连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
可选的,还包括:
启动单元,用于启动所述预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
可选的,还包括:
配置单元,用于配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
相应的,本申请还提供一种电子设备,包括:
显示器;
处理器;以及
存储器,用于存储浏览器,所述浏览器被所述处理器执行时,包括如下步骤:向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;接收所述预设的域名解析装置回送的应答;根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接;其中所述预设的域名解析装置,是指一种根据预设的IP地址与域名之间的映射关系,对特定网页地址进行IP地址解析的装置;所述IP地址与域名之间的映射关系中的域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
相应的,本申请还提供一种域名解析系统,包括:根据上述任一项所述的域名解析装置;以及根据上述任一项所述的连接服务器的装置。
此外,本申请还提供一种网络代理方法,包括:
接收客户端发送的对应特定网页地址的连接请求;
以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;
判断是否获取到与所述特定网页地址相对应的IP地址;
若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
可选的,还包括:
若上述判断结果为否,则向预设的DNS域名解析服务器发送对应所述特定网页地址的域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址
解析;
接收所述预设的DNS域名解析服务器回送的应答;
根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;
若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
可选的,在所述接收客户端发送的对应特定网页地址的连接请求之前,还包括:
启动执行所述网络代理方法的网络代理装置;所述网络代理装置,是指一种用于接收客户端发送的对应特定网页地址的连接请求,并向所述特定网页地址对应的服务器发起套接字连接的装置。
可选的,所述网络代理装置运行在所述客户端。
可选的,在所述接收客户端发送的对应特定网页地址的连接请求之前,还包括:
配置所述网络代理装置代理所述客户端发送的连接请求。
可选的,所述网络代理装置采用代理服务器。
可选的,在所述启动执行所述网络代理方法的网络代理装置之前,还包括:
设置所述IP地址与域名之间的映射关系集合。
可选的,所述域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
可选的,所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址,包括:
遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;
若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;
若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
可选的,在所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址之前,还包括:
获取所述IP地址与域名之间的映射关系集合。
可选的,所述IP地址与域名之间的映射关系集合存储在映射关系配置文件中。
相应的,本申请还提供一种网络代理装置,包括:
接收请求单元,用于接收客户端发送的对应特定网页地址的连接请求;
第一域名解析单元,用于以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;
第一判断单元,用于判断是否获取到与所述特定网页地址相对应的IP地址;
第一连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
可选的,还包括:
发送单元,用于若上述判断结果为否,则向预设的DNS域名解析服务器发送对应所述特定网页地址的域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;
接收应答单元,用于接收所述预设的DNS域名解析服务器回送的应答;
第二判断单元,用于根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;
第二连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
可选的,还包括:
启动单元,用于启动执行所述网络代理方法的网络代理装置;所述网络代理装置,是指一种用于接收客户端发送的对应特定网页地址的连接请求,并向所述特定网页地址对应的服务器发起套接字连接的装置。
可选的,还包括:
配置单元,用于配置所述网络代理装置代理所述客户端发送的连接请求。
可选的,还包括:
设置单元,用于设置所述IP地址与域名之间的映射关系集合。
可选的,所述第一域名解析单元包括:
判断子单元,用于遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;
设置子单元,用于若上述判断结果为是,则将所述当前映射关系的IP地址作为与所
述特定网页地址相对应的IP地址;
返回子单元,用于若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
可选的,还包括:
获取单元,用于获取所述IP地址与域名之间的映射关系集合。
相应的,本申请还提供一种电子设备,包括:
显示器;
处理器;以及
存储器,用于存储网络代理装置,所述网络代理装置被所述处理器执行时,包括如下步骤:接收客户端发送的对应特定网页地址的连接请求;以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;判断是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
与现有技术相比,本申请具有以下优点:
本申请提供的域名解析方法、连接服务器的方法、网络代理方法以及相应装置、电子设备和系统,通过对接收到的客户端发送的对应特定网页地址的域名解析请求进行解析,获取特定网页地址,并以特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与特定网页地址相对应的IP地址,使得客户端浏览器打开网页文件时,能够设置同一个域名下不同端口或路径分别访问到指定的机器,从而达到提高用户体验的效果。
图1是本申请的域名解析方法实施例的流程图;
图2是本申请的域名解析方法实施例准备阶段的具体流程图;
图3是本申请的域名解析方法实施例步骤S105的具体流程图;
图4是本申请的域名解析方法实施例判断当前映射关系的域名是否为所述特定网页地址的子字符串的具体流程图;
图5是本申请的域名解析装置实施例的示意图;
图6是本申请的域名解析装置实施例检索单元105的具体示意图;
图7是本申请的域名解析装置实施例的具体示意图;
图8是本申请的一种电子设备实施例的示意图;
图9是本申请的连接服务器的方法实施例的流程图;
图10是本申请的连接服务器的方法实施例的具体流程图;
图11是本申请的连接服务器的方法实施例准备阶段的具体流程图;
图12是本申请的连接服务器的装置实施例的示意图;
图13是本申请的连接服务器的装置实施例的具体示意图;
图14是本申请的连接服务器的装置实施例的又一具体示意图;
图15是本申请的又一电子设备实施例的示意图;
图16是本申请的域名解析系统实施例的示意图;
图17是本申请的网络代理方法实施例的流程图;
图18是本申请的网络代理方法实施例准备阶段的具体流程图;
图19是本申请的网络代理方法实施例的具体流程图;
图20是本申请的网络代理装置实施例的示意图;
图21是本申请的网络代理装置实施例的具体示意图;
图22是本申请的网络代理装置实施例的又一具体示意图;
图23是本申请的再一电子设备实施例的示意图。
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。
在本申请中,提供了一种域名解析方法、装置和电子设备,一种连接服务器的方法、装置及电子设备,一种域名解析系统,以及一种网络代理方法、装置及电子设备。在下面的实施例中逐一进行详细说明。
本申请提供的域名解析方法,其基本思想是:通过一个能够在预设的IP地址到域名的映射关系中进行查询检索的域名解析装置,对客户端输入的特定网页地址进行IP地址的解析,从而获取特定网页地址的IP地址。
请参考图1,其为本申请的域名解析方法实施例的流程图。所述方法包括如下步骤:
步骤S101:接收客户端发送的对应特定网页地址的域名解析请求。
本申请实施例所述的客户端包括但不限于移动通讯设备,即:通常所说的手机或者智能手机,还包括个人电脑、PAD、iPad等终端设备。位于客户端的用户可以通过在浏览器的地址栏中输入特定网页地址,向预设的域名解析装置发送对应特定网页地址的域名解析请求。此外,客户端用户还可以通过在电脑上按如下步骤操作发送域名解析请求:开始-->运行-->输入cmd-->ping域名-->回车查看结果,显示结果类似Reply from220.181.31.183:bytes=32time=79ms TTL=53,中间的220.181.31.183就是域名的IP地址。
本申请实施例所述的特定网页地址,其技术术语被称为统一资源定位符(Uniform Resource Locator,URL)。统一资源定位符是对可以从互联网上得到的资源的位置和访问方法的一种简洁的表示,是互联网上标准资源的地址。互联网上的每个文件都有一个唯一的URL,它包含的信息指出文件的位置以及浏览器应该怎么处理它。统一资源定位符的标准格式如下:协议类型://服务器地址(必要时需加上端口号)/路径/文件名,例如,一个典型的统一资源定位符类似这样:http://www.1688.com:80/search/index.jsp?title=keyword,其中http(超文本传输协议资源)是请求的协议类型;www.1688.com是服务器地址(又称为域名或主机名称);80是服务器上的网络端口号;/search/index.jsp是路径;?title=keyword,是查询参数。
要实施本申请提供的域名解析方法,需要预先做一些准备工作。请参考图2,其为本申请的域名解析方法实施例准备阶段的具体流程图。具体的,在所述接收客户端发送的对应特定网页地址的域名解析请求之前,还包括:
步骤S201:启动预设的域名解析装置。
本申请实施例提供的域名解析方法是通过一个域名解析装置负责执行的。本申请实施例所述的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。因此,要执行本申请实施例提供的域名解析方法,首先要启动域名解析装置,当域名解析装置启动后,将等待客户端发送的域名解析请求。本申请实施例所述的域名解析装置,既可以运行在发送域名解析请求的客户端上,还可以运行在其它联网的终端设备中,包括提供域名解析服务的电脑系统或其它类型的网络终端,例如:网关或路由器等网络终端。
在实际应用中,既可以使得域名解析装置直接将解析结果返回给客户端,由客户端直接向获取的IP地址发起套接字连接;还可以将域名解析装置作为代理服务器(Proxy Server)的一个组成部分,使得域名解析装置能够直接将解析结果返回给代理服务器,由代理服务器向获取的IP地址发起套接字连接。上述各种不同的返回方式都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。
在本实施例中,将所述预设的域名解析装置作为代理服务器的一个组成部分,其中域名解析装置专门负责接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析,而代理服务器在获取到域名解析装置返回的IP地址后,向获取到的IP地址发起套接字连接。因此,在本实施例中,启动预设的域名解析装置的操作亦即为启动代理服务器的操作。
需要说明的是,如果将域名解析装置作为代理服务器的一个组成部分,则针对客户端发送的连接请求,代理服务器端的处理过程包括如下步骤:1)代理服务器接收到客户端发送的对应特定网络地址的原始连接请求;2)代理服务器将该请求改变为域名解析请求,并将该域名解析请求发送给域名解析装置;3)域名解析装置响应该域名解析请求,获取特定网页地址对应的IP地址,并将解析结果返回给代理服务器;4)代理服务器向获取的IP地址发起套接字连接;5)代理服务器将接收到的特定网页地址的内容返回到客户端浏览器。
为使得预设的域名解析装置能够接收客户端发送的域名解析请求,在所述接收客户端发送的对应特定网页地址的域名解析请求之前,还包括:
步骤S203:配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
通常,针对客户端发送的域名解析请求,默认的域名解析过程为:客户端操作系统读取客户端本地的Hosts域名解析文件,查询Hosts文件中是否存在与请求中的特定网页地址相对应的IP地址,若存在则向客户端返回查找到的IP地址;若不存在,则将域名解析请求发送到DNS域名解析服务器,若DNS域名解析服务器查找到与请求中的特定网页地址相对应的IP地址,则向客户端返回查找到的IP地址。
要实施本申请实施例提供的域名解析方法,需要由特定的预设的域名解析装置接收客户端发送的域名解析请求,并对特定网页地址进行IP地址解析。为此,需要预先配置好由域名解析装置负责接收客户端发送的域名解析请求,而非读取默认的Hosts域名解析文件。
在本实施例中,将所述预设的域名解析装置作为代理服务器的一个组成部分,因此,配置预设的域名解析装置负责解析IP地址的操作,也就是配置指定的代理服务器的操作。具体的,通过在客户端浏览器的工具菜单中设置包括域名解析装置的代理服务器即可。
本申请实施例提供的域名解析方法,是建立在预设的IP地址与域名之间的映射关系集合基础上的。因此,在所述启动预设的域名解析装置之前,还包括:
步骤S200:设置所述IP地址与域名之间的映射关系集合。
本申请实施例所述的IP地址与域名之间的映射关系,其中所述的域名中可以包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。因此,本申请实施例提供的域名解析方法,能够解决现有的Hosts域名解析文件格式存在的不支持端口和路径的问题。
本申请实施例所述的IP地址与域名之间的映射关系包括多个IP地址对应同一域名的映射关系、一个IP地址对应一个域名的映射关系,或者多个IP地址对应多个域名的映射关系。当同一域名与多个IP地址相对应时,可以将该域名结合服务端口地址或网页路径,使得同一域名下的不同服务端口地址或网页路径能够对应不同的IP地址,从而达到同一域名下的不同服务能够指向不同的IP地址或不同的服务器。例如:访问www.1688.com:8080时连接到IP地址10.6.1.123,访问www.1688.com/path1时连接到IP地址10.6.1.125,www.1688.com:8080和www.1688.com/path1属于同一域名,但二者对应不同的IP地址。当多个域名与多个IP地址相对应时,既能够实现一个域名对应多个IP地址,还能够实现一个IP地址对应多个域名。
在实际应用中,可以根据具体的应用需求,采用各种不同的存储格式存储所述IP地址与域名之间的映射关系,例如:文本格式、数据库格式等。当以文本格式存储所述IP地址与域名之间的映射关系时,则可以在域名解析装置启动时,将配置文件读取到内存,以提高查询匹配的效率;当以数据表格式存储所述IP地址与域名之间的映射关系时,则可以在接收到域名解析请求时,以请求中的网页地址为检索依据,在数据表中进行检索,以获取对应的IP地址。上述各种不同的存储格式都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。
在本实施例中,所述IP地址与域名之间的映射关系存储在文本格式的配置文件中。该配置文件包含两列,使用tab分隔,第一列是服务器的IP地址,第二列是本申请实施例所述的能够包含主机名、端口和路径的域名。例如,用户希望访问www.1688.com:8080
时连接到IP地址10.6.1.123,访问www.1688.com/path1时连接到IP地址10.6.1.125,则配置文件采用如下写法:
10.6.1.123www.1688.com:8080
10.6.1.124www.1688.com:80
10.6.1.125www.1688.com/path1
10.6.1.126www.1688.com/path2
当域名解析装置启动时,将该配置文件读取到内存,并形成如表一所示的数据结构:
| 主机名 | 端口 | 路径 | IP地址 |
| www.1688.com | 8080 | 10.6.1.123 | |
| www.1688.com | 80 | path1 | 10.6.1.124 |
表一、IP地址与域名的映射关系的数据结构
需要注意的是,未指定端口的映射关系,将自动设置为80端口。
由此可见,上述IP地址与域名之间的映射关系能够支持端口和路径,从而实现将同一个域名下的不同端口或路径映射到不同的服务器。
步骤S103:解析所述域名解析请求,获取所述特定网页地址。
在接收到客户端发送的域名解析请求后,通过步骤S103解析该请求中的统一资源定位符,得到其协议类型、主机名、端口、路径和查询参数等信息。例如,客户端用户在浏览器中输入特定网页的统一资源定位符www.1688.com/path1/subpath1?a=1&b=2,通过步骤S103对该请求解析后得到如表二所示的结构:
表二、HTTP请求被解析后的结构
步骤S105:以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
经过步骤S101和步骤S103后,进入到步骤S105,以域名解析请求中的特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与特定网页地址相对应的IP地址。要实施步骤S105,首先需要获取所述IP地址与域名之间的映射关系集合。
在实际应用中,获取所述IP地址与域名之间的映射关系集合的方式与映射关系的存
储方式相关,不同的存储方式获取映射关系的方式也不相同。当以文本格式存储所述IP地址与域名之间的映射关系时,则可以在域名解析装置启动时,读取配置文件,将映射关系读取到内存中以便步骤S105查询匹配用;当以数据表格式存储所述IP地址与域名之间的映射关系时,则在步骤S105中以请求中的网页地址为检索依据,实时地在数据表中进行检索,以获取对应的IP地址。
在本实施例中,所述IP地址与域名之间的映射关系集合存储在文本格式的配置文件中,所述获取所述IP地址与域名之间的映射关系集合,采用如下方式:读取存储所述IP地址与域名之间的映射关系的配置文件,获取所述IP地址与域名之间的映射关系集合。
请参考图3,其为本申请的域名解析方法实施例步骤S105的具体流程图。具体的,所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址,包括:
步骤S1051:遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串。
通过步骤S103解析请求并获取到特定网页地址后,将特定网页地址与IP地址与域名之间的映射关系集合包括的各个映射关系逐个进行匹配,以便查找到与特定网页地址对应的IP地址。在实际应用中,特定网页地址是一个统一资源定位符,除了包括协议类型和主机名以外,还可以包括端口、路径、文件名或查询参数。而IP地址与域名之间的映射关系中的域名通常包括协议类型和主机名,以及端口和/或路径,因此在进行匹配查询时,不是简单的判断映射关系中的域名是否与特定网页地址相同,而是判断映射关系的域名是否为特定网页地址的子字符串。
请参考图4,其为本申请的域名解析方法实施例判断当前映射关系的域名是否为所述特定网页地址的子字符串的具体流程图。具体的,所述判断当前映射关系的域名是否为所述特定网页地址的子字符串,包括:
步骤S401:将所述域名的各个组成元素拼接为一个字符串。
步骤S403:判断拼接的字符串是否为所述特定网页地址的子字符串。
在本实施例中,IP地址与域名之间的映射关系存储在配置文件中。配置文件中的各个IP地址与域名之间的映射关系被预先读取并存储在内存中,且将其中域名的各种组成元素分别独立存储,详见上述表一。为了便于在步骤S105的匹配检索,在实际匹配前,通过步骤S401对域名的各种组成元素进行拼接,从而获取与IP地址对应的域名整体,
并通过步骤S403判断拼接的字符串是否为特定网页地址的子字符串,从而实现判断当前映射关系的域名是否为所述特定网页地址的子字符串的功能。
步骤S1052:若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址。
步骤S1053:若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
通过步骤S1051中的判断步骤,如果拼接的字符串为特定网页地址的子字符串,则判定当前映射关系的域名为特定网页地址的子字符串,对应步骤S1052,并且遍历操作结束;否则,判定当前映射关系的域名不是特定网页地址的子字符串,对应步骤S1053。如果当前映射关系的域名不是特定网页地址的子字符串,则步骤S1053将返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,即:步骤S1051,继续判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
此外,在本实施例中,步骤S105之后还包括:向所述客户端回送获取的与所述特定网页地址相对应的IP地址。
与步骤S101相对应,当通过步骤S101、步骤S103和步骤S105完成域名解析处理后,将域名解析的结果回送给发送域名解析请求的客户端。如果查找到与特定网页地址对应的IP地址,则返回的结果为获取的IP地址,客户端将对该IP地址发起套接字连接。如果没有查找到与特定网页地址对应的IP地址,则返回的结果为空,说明在IP地址与域名之间的映射关系集合中未定义该映射关系,则客户端将通过DNS域名解析服务器获取实际IP地址,并对该IP地址发起套接字连接。
在上述的实施例中,提供了一种域名解析方法,与之相对应的,本申请还提供一种域名解析装置。该装置是与上述方法的实施例相对应。
请参看图5,其为本申请的域名解析装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例的一种域名解析装置,包括:
接收单元101,用于接收客户端发送的对应特定网页地址的域名解析请求;
解析单元103,用于解析所述域名解析请求,获取所述特定网页地址;
检索单元105,用于以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
请参看图6,其为本申请的域名解析装置实施例检索单元105的具体示意图。可选的,所述检索单元105包括:
遍历判断子单元1051,用于遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;
设置子单元1053,用于若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;
返回子单元1055,用于若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
可选的,所述当前映射关系中域名的各个组成元素分别独立存储,所述域名的组成元素包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者;所述遍历判断子单元1051包括:
判断子单元,用于判断当前映射关系的域名是否为所述特定网页地址的子字符串;
所述判断子单元包括:
拼接子单元,用于将所述域名的各个组成元素拼接为一个字符串;
第一判断子单元,用于判断拼接的字符串是否为所述特定网页地址的子字符串。
请参看图7,其为本申请的域名解析装置实施例的具体示意图。可选的,还包括:
回送单元209,用于向所述客户端回送获取的与所述特定网页地址相对应的IP地址。
可选的,还包括:
获取单元201,用于获取所述IP地址与域名之间的映射关系集合。
可选的,还包括:
启动单元202,用于启动预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
可选的,还包括:
配置单元203,用于配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
可选的,还包括:
设置单元204,用于设置所述IP地址与域名之间的映射关系集合。
此外,本申请实施例还提供了一种电子设备,如图8所示,该电子设备包括:显示器801;处理器802;以及存储器803,用于存储域名解析装置,所述域名解析装置被所述处理器802执行时,包括如下步骤:接收客户端发送的对应特定网页地址的域名解析请求;解析所述域名解析请求,获取所述特定网页地址;以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
本申请实施例所述的一种电子设备作为一个联网设备,包括提供域名解析服务的电脑系统或其它类型的网络终端。其中,提供域名解析服务的电脑系统,包括个人电脑、PAD、iPad等终端设备,以及移动通讯设备,即:通常所说的手机或者智能手机。其它类型的网络终端包括网关或路由器等网络终端。
与上述的域名解析方法相对应,本申请还提供一种连接服务器的方法。请参考图9,其为本申请提供的一种连接服务器的方法实施例的流程图。本实施例与第一实施例内容相同的部分不再赘述,请参见实施例一中的相应部分。本申请提供的一种连接服务器的方法包括:
步骤S901:向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析。
当客户端用户要打开特定网页地址的内容时,首先需要在客户端浏览器的地址栏输入特定网页地址,然后向预设的域名解析装置发送对应特定网页地址的域名解析请求。
本申请实施例所述的域名解析装置,负责根据域名解析请求对特定网页地址进行IP地址解析。具体的,所述预设的域名解析装置,是指一种根据预设的IP地址与域名之间的映射关系,对特定网页地址进行IP地址解析的装置;所述IP地址与域名之间的映射关系中的域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。因此,要执行本申请实施例提供的连接服务器的方法,首先要启动域名解析装置,当域名解析装置启动后,将等待客户端发送的域名解析请求。域名解析装置,既可以运行在发送域名解析请求的客户端上,还可以运行在其它联网的终端设备中,包括提供域名解析服务的电脑系统或其它类型的网络终端,例如:网关或路由器等网络终端。
步骤S903:接收所述预设的域名解析装置回送的应答。
当域名解析装置完成域名解析处理后,将域名解析的结果回送给发送域名解析请求
的客户端。本申请实施例所述的域名解析装置回送的应答,包括两种结果:1)如果域名解析装置查找到与特定网页地址对应的IP地址,则返回的应答结果为获取的IP地址,客户端将对该IP地址发起套接字连接;2)如果域名解析装置没有查找到与特定网页地址对应的IP地址,则返回的应答结果为空,说明通过域名解析装置中未定义该映射关系,则客户端将通过DNS域名解析服务器获取实际IP地址,然后再向DNS域名解析服务器返回的IP地址发起套接字连接。
步骤S905:根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址。
步骤S907:若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
通过步骤S905,判断预设的域名解析装置是否获取到与特定网页地址相对应的IP地址,如果域名解析装置查找到特定网页地址对应的IP地址,则返回的结果为获取的IP地址,客户端将对该IP地址发起套接字连接。
请参考图10,其为本申请提供的一种连接服务器的方法实施例的具体流程图。具体的,还包括:
步骤S1001:若上述判断结果为否,则向预设的DNS域名解析服务器发送所述域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析。
通过步骤S905,判断预设的域名解析装置是否获取到与特定网页地址相对应的IP地址,如果没有查找到特定网页地址对应的IP地址,则返回的结果为空,说明未定义该映射关系,则客户端将通过DNS域名解析服务器获取实际IP地址,然后再向DNS域名解析服务器返回的IP地址发起套接字连接。
步骤S1003:接收所述预设的DNS域名解析服务器回送的应答。
步骤S1005:根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址。
步骤S1007:若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
步骤S1003、步骤S1005和步骤S1007与上述步骤S903、步骤S905和步骤S907一一对应,不同之处仅在于回送域名解析结果的装置为DNS域名解析服务器,相同之处不再赘述。
要实施本申请提供的连接服务器的方法,需要预先做一些准备工作。请参考图11,
其为本申请提供的一种连接服务器的方法实施例准备阶段的具体流程图。具体的,在所述向预设的域名解析装置发送对应特定网页地址的域名解析请求之前,还包括:
步骤S1101:启动所述预设的域名解析装置。
本申请实施例提供的连接服务器的方法,依赖预设的域名解析装置处理客户端的域名解析请求。因此,要执行本申请实施例提供的方法,首先要启动预设的域名解析装置,当预设的域名解析装置启动后,将等待客户端发送的域名解析请求。本申请实施例所述的域名解析装置,既可以运行在发送域名解析请求的客户端上,还可以运行在其它联网的终端设备中,包括提供域名解析服务的电脑系统或其它类型的网络终端,例如:网关或路由器等网络终端。
在实际应用中,既可以使得域名解析装置直接将解析结果返回给客户端,由客户端直接向获取的IP地址发起套接字连接;还可以将域名解析装置作为代理服务器(Proxy Server)的一个组成部分,使得域名解析装置能够直接将解析结果返回给代理服务器,由代理服务器向获取的IP地址发起套接字连接。上述各种不同的返回方式都只是具体实施方式的变更,都不偏离本申请的核心,因此都在本申请的保护范围之内。
在本实施例中,将所述预设的域名解析装置作为代理服务器的一个组成部分,其中域名解析装置专门负责接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析,而代理服务器在获取到域名解析装置返回的IP地址后,向获取到的IP地址发起套接字连接。因此,在本实施例中,启动预设的域名解析装置的操作亦即为启动代理服务器的操作。
需要说明的是,如果将域名解析装置作为代理服务器的一个组成部分,则针对客户端发送的连接请求,代理服务器端的处理过程包括如下步骤:1)代理服务器接收到客户端发送的对应特定网络地址的原始连接请求;2)代理服务器将该请求改变为域名解析请求,并将该域名解析请求发送给域名解析装置;3)域名解析装置响应该域名解析请求,获取特定网页地址对应的IP地址,并将解析结果返回给代理服务器;4)代理服务器向获取的IP地址发起套接字连接;5)代理服务器将接收到的特定网页地址的内容返回到客户端浏览器。
为使得预设的域名解析装置能够接收客户端发送的域名解析请求,在所述向预设的域名解析装置发送对应特定网页地址的域名解析请求之前,还包括:
步骤S1103:配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
本申请实施例所述的预设的域名解析装置与上述第一实施例的域名解析方法中的域名解析装置具有相同的工作原理和作用,二者的启动方法和配置方法均一致,相同之处详见第一实施例的域名解析方法中的域名解析装置部分,此处不再赘述。
在本实施例中,将所述预设的域名解析装置作为代理服务器的一个组成部分,因此,配置预设的域名解析装置负责解析IP地址的操作,也就是配置指定的代理服务器的操作。具体的,通过在客户端浏览器的工具菜单中设置包括域名解析装置的代理服务器即可。
在上述的实施例中,提供了一种连接服务器的方法,与之相对应的,本申请还提供一种连接服务器的装置。该装置是与上述方法的实施例相对应。
请参看图12,其为本申请的连接服务器的装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例的一种连接服务器的装置,包括:
第一发送单元1201,用于向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;
第一接收单元1203,用于接收所述预设的域名解析装置回送的应答;
第一判断单元1205,用于根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;
第一连接单元1207,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
请参看图13,其为本申请的连接服务器的装置实施例的一种具体示意图。可选的,还包括:
第二发送单元1301,用于若上述判断结果为否,则向预设的DNS域名解析服务器发送所述域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;
第二接收单元1303,用于接收所述预设的DNS域名解析服务器回送的应答;
第二判断单元1305,用于根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;
第二连接单元1307,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
请参看图14,其为本申请的连接服务器的装置实施例的又一具体示意图。可选的,还包括:
启动单元1401,用于启动所述预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
可选的,还包括:
配置单元1403,用于配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
此外,本申请实施例还提供了又一种电子设备,如图15所示,该电子设备包括:显示器1501;处理器1502;以及存储器1503,用于存储浏览器,所述浏览器被所述处理器1502执行时,包括如下步骤:向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;接收所述预设的域名解析装置回送的应答;根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
本申请实施例所述的预设的域名解析装置,是指一种根据预设的IP地址与域名之间的映射关系,对特定网页地址进行IP地址解析的装置;所述IP地址与域名之间的映射关系中的域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
本申请实施例所述的电子设备包括但不限于移动通讯设备,即:通常所说的手机或者智能手机,还包括个人电脑、PAD、iPad等终端设备。位于该电子设备的用户可以通过在浏览器的地址栏中输入特定网页地址,向预设的域名解析装置发送对应特定网页地址的域名解析请求。此外,该电子设备的用户还可以通过在电脑上按如下步骤操作发送域名解析请求:开始-->运行-->输入cmd-->ping域名-->回车查看结果,显示结果类似Reply from 220.181.31.183:bytes=32time=79ms TTL=53,中间的220.181.31.183就是域名的IP地址。
此外,本申请实施例还提供了一种域名解析系统,如图16所示,该系统包括上述实施例所述的域名解析装置1601和连接服务器的装置1602。所述的域名解析装置通常部署于代理服务器,但并不局限于代理服务器,也可以是能够实现所述域名解析方法的任何设备,包括提供域名解析服务的电脑系统或其它类型的网络终端,例如:网关或路由器等网络终端;所述连接服务器的装置通常部署于移动通讯设备、个人电脑、PAD、iPad
等终端设备。例如,连接服务器的装置部署在智能手机上,能够发送对应特定网页地址的域名解析请求;所述域名解析装置部署在代理服务器上,通过接收连接服务器的装置发送的对应特定网页地址的域名解析请求,并以特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,从而获取与特定网页地址相对应的IP地址。
与上述的域名解析方法相对应,本申请还提供一种网络代理方法。请参考图17,其为本申请提供的一种网络代理方法实施例的流程图。本实施例与第一实施例内容相同的部分不再赘述,请参见实施例一中的相应部分。本申请提供的一种网络代理方法包括:
步骤S1701:接收客户端发送的对应特定网页地址的连接请求。
本申请实施例所述的客户端和特定网页地址与上述第一实施例的域名解析方法中的客户端和特定网页地址为相同概念,具体说明详见第一实施例的域名解析方法中的相关部分,此处不再赘述。需要说明的是,本申请实施例所述的客户端,是一个被网络代理装置所代理的客户端,客户端发送的连接请求将被转发到与其连接的网络代理装置中,由网络代理装置负责向特定网页地址所在的服务器发起套接字请求。
代理,也称网络代理,是一种特殊的网络服务,允许一个网络终端(一般为客户端)通过这个服务与另一个网络终端(一般为服务器)进行非直接的连接。提供代理服务的电脑系统或其它类型的网络终端称为代理服务器。
代理服务器是一种重要的服务器安全功能,它的工作主要在开放系统互联(OSI)模型的会话层,从而起到防火墙的作用。代理服务器大多被用来连接INTERNET(国际互联网)和Local Area Network(局域网)。
一个完整的代理请求过程为:客户端首先与代理服务器创建连接,接着根据代理服务器所使用的代理协议,请求对目标服务器创建连接、或者获得目标服务器的指定资源(如:文件)。在后一种情况中,代理服务器可能对目标服务器的资源下载至本地缓存,如果客户端所要获取的资源在代理服务器的缓存之中,则代理服务器并不会向目标服务器发送请求,而是直接返回缓存了的资源。一些代理协议允许代理服务器改变客户端的原始请求、目标服务器的原始响应,以满足代理协议的需要。代理服务器的选项和设置在计算机程序中,通常包括一个“防火墙”,允许用户输入代理地址,它会遮盖他们的网络活动,可以允许绕过互联网过滤实现网络访问。
要实施本申请提供的网络代理方法,需要预先做一些准备工作。请参考图18,其为本申请提供的一种网络代理方法实施例准备阶段的具体流程图。具体的,在所述接收客
户端发送的对应特定网页地址的连接请求之前,还包括:
步骤S1801:启动执行所述网络代理方法的网络代理装置。
本申请实施例所述的网络代理装置,是指一种用于接收客户端发送的对应特定网页地址的连接请求,并向所述特定网页地址对应的服务器发起套接字连接的装置。
本申请实施例提供的网络代理方法,是依赖预设的网络代理装置执行的。因此,要执行本申请实施例提供的方法,首先要启动执行所述网络代理方法的网络代理装置,当执行所述网络代理方法的网络代理装置启动后,将等待客户端发送的连接请求。本申请实施例所述的网络代理装置,既可以运行在发送连接请求的客户端上,还可以运行在其它联网的终端设备中,包括提供代理服务的电脑系统或其它类型的网络终端,例如:网关或路由器等网络终端。在本实施例中,网络代理装置运行在所述客户端。
为使得预设的网络代理装置能够接收客户端发送的连接请求,在所述接收客户端发送的对应特定网页地址的连接请求之前,还包括:
步骤S1803:配置所述网络代理装置代理所述客户端发送的连接请求。
配置预设的网络代理装置负责代理客户端发送的连接请求的操作,也就是配置指定的代理服务器的操作。具体的,通过在客户端浏览器的工具菜单中设置代理服务器即可。
本申请实施例提供的网络代理方法,是建立在预设的IP地址与域名之间的映射关系集合基础上的。因此,在所述启动执行所述网络代理方法的网络代理装置之前,还包括:
步骤S1800:设置所述IP地址与域名之间的映射关系集合。
本申请实施例所述的IP地址与域名之间的映射关系,其中所述的域名中可以包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。因此,本申请实施例提供的网络代理方法,能够设置同一个域名下不同端口或路径分别访问到指定的机器,从而达到提高用户体验的效果。
本申请实施例的步骤S1800与上述第一实施例的域名解析方法中的步骤S200相同,具体说明详见第一实施例的域名解析方法中的相关部分,此处不再赘述。
步骤S1703:以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
本申请实施例提供的网络代理方法,在接收到客户端发送的对应特定网页地址的连接请求后,首先需要对特定网页地址进行IP地址解析处理。本申请实施例所述的步骤S1703与上述第一实施例的域名解析方法中的步骤S105相同,具体说明详见第一实施例的域名解析方法中的相关部分,此处不再赘述。下述描述的步骤S1703的具体实施例仅
仅是示意性的。
在本实施例中,所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址,包括:1)遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;2)若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;3)若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
在本实施例中,在所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址之前,还包括:获取所述IP地址与域名之间的映射关系集合。
在本实施例中,所述IP地址与域名之间的映射关系集合存储在映射关系配置文件中。
步骤S1705:判断是否获取到与所述特定网页地址相对应的IP地址。
步骤S1707:若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
通过步骤S1703完成域名解析处理后,步骤S1705将根据域名解析的结果判断是否获取到与特定网页地址相对应的IP地址。通过步骤S1705,判断预设的域名解析装置是否获取到与特定网页地址相对应的IP地址,如果查找到特定网页地址对应的IP地址,则解析的结果为获取的IP地址,通过步骤S1707将对该IP地址发起套接字连接。
请参考图19,其为本申请提供的一种网络代理方法实施例的具体流程图。具体的,还包括:
步骤S1901:若上述判断结果为否,则向预设的DNS域名解析服务器发送对应所述特定网页地址的域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析。
通过步骤S1903,判断预设的域名解析装置是否获取到与特定网页地址相对应的IP地址,如果没有查找到特定网页地址对应的IP地址,则解析的结果为空,说明预设的IP地址与域名之间的映射关系集合中未定义该映射关系,则将通过DNS域名解析服务器获取实际IP地址,然后再向DNS域名解析服务器返回的IP地址发起套接字连接。
步骤S1903:接收所述预设的DNS域名解析服务器回送的应答。
步骤S1905:根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址。
步骤S1907:若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
步骤S1903、步骤S1905和步骤S1907与上述步骤S1703、步骤S1705和步骤S1707一一对应,不同之处仅在于回送域名解析结果的装置为DNS域名解析服务器,相同之处不再赘述。
在上述的实施例中,提供了一种网络代理方法,与之相对应的,本申请还提供一种网络代理装置。该装置是与上述方法的实施例相对应。
请参看图20,其为本申请的网络代理装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例的一种网络代理装置,包括:
接收请求单元2001,用于接收客户端发送的对应特定网页地址的连接请求;
第一域名解析单元2003,用于以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;
第一判断单元2005,用于判断是否获取到与所述特定网页地址相对应的IP地址;
第一连接单元2007,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
请参看图21,其为本申请的网络代理装置实施例的一种具体示意图。可选的,还包括:
发送单元2101,用于若上述判断结果为否,则向预设的DNS域名解析服务器发送对应所述特定网页地址的域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;
接收应答单元2103,用于接收所述预设的DNS域名解析服务器回送的应答;
第二判断单元2105,用于根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;
第二连接单元2107,用于若上述判断结果为是,则对所述与所述特定网页地址相对
应的IP地址发起套接字连接。
请参看图22,其为本申请的网络代理装置实施例的又一种具体示意图。可选的,还包括:
获取单元2201,用于获取所述IP地址与域名之间的映射关系集合。
可选的,还包括:
启动单元2202,用于启动执行所述网络代理方法的网络代理装置;所述网络代理装置,是指一种用于接收客户端发送的对应特定网页地址的连接请求,并向所述特定网页地址对应的服务器发起套接字连接的装置。
可选的,还包括:
配置单元2203,用于配置所述网络代理装置代理所述客户端发送的连接请求。
可选的,还包括:
设置单元2204,用于设置所述IP地址与域名之间的映射关系集合。
可选的,所述第一域名解析单元2003包括:
判断子单元,用于遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;
设置子单元,用于若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;
返回子单元,用于若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
此外,本申请实施例还提供了再一种电子设备,如图23所示,该电子设备包括:显示器2301;处理器2302;以及存储器2303,用于存储网络代理装置,所述网络代理装置被所述处理器2302执行时,包括如下步骤:接收客户端发送的对应特定网页地址的连接请求;以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;判断是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
本申请实施例所述的一种电子设备作为一个联网设备,包括提供网络代理服务的电脑系统或其它类型的网络终端。其中,提供网络代理服务的电脑系统,包括个人电脑、
PAD、iPad等终端设备,以及移动通讯设备,即:通常所说的手机或者智能手机。其它类型的网络终端包括网关或路由器等网络终端。
本申请提供的域名解析方法、连接服务器的方法、网络代理方法以及相应装置、电子设备和系统,通过对接收到的客户端发送的对应特定网页地址的域名解析请求进行解析,获取特定网页地址,并以特定网页地址为检索依据,在预设的IP地址与网页地址之间的映射关系集合中进行检索,获取与特定网页地址相对应的IP地址,使得客户端浏览器打开网页文件时,能够设置同一个域名下不同端口或路径分别访问到指定的机器,从而达到提高用户体验的效果。
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
Claims (53)
- 一种域名解析方法,其特征在于,包括:接收客户端发送的对应特定网页地址的域名解析请求;解析所述域名解析请求,获取所述特定网页地址;以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
- 根据权利要求1所述的域名解析方法,其特征在于,所述域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
- 根据权利要求1所述的域名解析方法,其特征在于,所述预设的IP地址与域名之间的映射关系包括多个IP地址对应同一域名的映射关系、一个IP地址对应一个域名的映射关系,或者多个IP地址对应多个域名的映射关系。
- 根据权利要求1所述的域名解析方法,其特征在于,所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址,包括:遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
- 根据权利要求4所述的域名解析方法,其特征在于,所述当前映射关系中域名的各个组成元素分别独立存储,所述域名的组成元素包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者;所述判断当前映射关系的域名是否为所述特定网页地址的子字符串,包括:将所述域名的各个组成元素拼接为一个字符串;判断拼接的字符串是否为所述特定网页地址的子字符串。
- 根据权利要求1所述的域名解析方法,其特征在于,还包括:向所述客户端回送获取的与所述特定网页地址相对应的IP地址。
- 根据权利要求1所述的域名解析方法,其特征在于,在所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址之前,还包括:获取所述IP地址与域名之间的映射关系集合。
- 根据权利要求7所述的域名解析方法,其特征在于,所述获取所述IP地址与域名之间的映射关系集合,采用如下方式:读取存储所述IP地址与域名之间的映射关系的配置文件,获取所述IP地址与域名之间的映射关系集合。
- 根据权利要求1-8任意一项所述的域名解析方法,其特征在于,在所述接收客户端发送的对应特定网页地址的域名解析请求之前,还包括:启动预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
- 根据权利要求9所述的域名解析方法,其特征在于,所述预设的域名解析装置运行在所述客户端。
- 根据权利要求9所述的域名解析方法,其特征在于,在所述接收客户端发送的对应特定网页地址的域名解析请求之前,还包括:配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
- 根据权利要求9所述的域名解析方法,其特征在于,所述预设的域名解析装置是代理服务器的组成部分。
- 根据权利要求1-8任意一项所述的域名解析方法,其特征在于,所述IP地址与域名之间的映射关系集合存储在映射关系配置文件中。
- 一种域名解析装置,其特征在于,包括:接收单元,用于接收客户端发送的对应特定网页地址的域名解析请求;解析单元,用于解析所述域名解析请求,获取所述特定网页地址;检索单元,用于以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
- 根据权利要求14所述的域名解析装置,其特征在于,所述检索单元包括:遍历判断子单元,用于遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;设置子单元,用于若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;返回子单元,用于若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
- 根据权利要求15所述的域名解析装置,其特征在于,所述当前映射关系中域名的各个组成元素分别独立存储,所述域名的组成元素包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者;所述遍历判断子单元包括:判断子单元,用于判断当前映射关系的域名是否为所述特定网页地址的子字符串;所述判断子单元包括:拼接子单元,用于将所述域名的各个组成元素拼接为一个字符串;第一判断子单元,用于判断拼接的字符串是否为所述特定网页地址的子字符串。
- 根据权利要求14所述的域名解析装置,其特征在于,还包括:回送单元,用于向所述客户端回送获取的与所述特定网页地址相对应的IP地址。
- 根据权利要求14所述的域名解析装置,其特征在于,还包括:获取单元,用于获取所述IP地址与域名之间的映射关系集合。
- 根据权利要求14-18任意一项所述的域名解析装置,其特征在于,还包括:启动单元,用于启动预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
- 根据权利要求19所述的域名解析装置,其特征在于,还包括:配置单元,用于配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
- 根据权利要求14-18任意一项所述的域名解析装置,其特征在于,还包括:设置单元,用于设置所述IP地址与域名之间的映射关系集合。
- 一种电子设备,其特征在于,包括:显示器;处理器;以及存储器,用于存储域名解析装置,所述域名解析装置被所述处理器执行时,包括如 下步骤:接收客户端发送的对应特定网页地址的域名解析请求;解析所述域名解析请求,获取所述特定网页地址;以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址。
- 一种连接服务器的方法,其特征在于,包括:向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;接收所述预设的域名解析装置回送的应答;根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接;其中所述预设的域名解析装置,是指一种根据预设的IP地址与域名之间的映射关系,对特定网页地址进行IP地址解析的装置;所述IP地址与域名之间的映射关系中的域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
- 根据权利要求23所述的连接服务器的方法,其特征在于,还包括:若上述判断结果为否,则向预设的DNS域名解析服务器发送所述域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;接收所述预设的DNS域名解析服务器回送的应答;根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求23所述的连接服务器的方法,其特征在于,在所述向预设的域名解析装置发送对应特定网页地址的域名解析请求之前,还包括:启动所述预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
- 根据权利要求25所述的连接服务器的方法,其特征在于,所述预设的域名解析装置运行在所述客户端。
- 根据权利要求25所述的连接服务器的方法,其特征在于,在所述向预设的域 名解析装置发送对应特定网页地址的域名解析请求之前,还包括:配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
- 根据权利要求25所述的连接服务器的方法,其特征在于,所述预设的域名解析装置是代理服务器的组成部分。
- 一种连接服务器的装置,其特征在于,包括:第一发送单元,用于向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;第一接收单元,用于接收所述预设的域名解析装置回送的应答;第一判断单元,用于根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;第一连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求29所述的连接服务器的装置,其特征在于,还包括:第二发送单元,用于若上述判断结果为否,则向预设的DNS域名解析服务器发送所述域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;第二接收单元,用于接收所述预设的DNS域名解析服务器回送的应答;第二判断单元,用于根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;第二连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求29所述的连接服务器的装置,其特征在于,还包括:启动单元,用于启动所述预设的域名解析装置;所述预设的域名解析装置,是指一种用于接收客户端发送的对应特定网页地址的域名解析请求,并对特定网页地址进行IP地址解析的装置。
- 根据权利要求31所述的连接服务器的装置,其特征在于,还包括:配置单元,用于配置所述预设的域名解析装置对所述客户端发送的域名解析请求所对应的特定网页地址进行IP地址解析。
- 一种电子设备,其特征在于,包括:显示器;处理器;以及存储器,用于存储浏览器,所述浏览器被所述处理器执行时,包括如下步骤:向预设的域名解析装置发送对应特定网页地址的域名解析请求,请求所述域名解析装置对所述特定网页地址进行IP地址解析;接收所述预设的域名解析装置回送的应答;根据所述预设的域名解析装置回送的应答,判断所述预设的域名解析装置是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接;其中所述预设的域名解析装置,是指一种根据预设的IP地址与域名之间的映射关系,对特定网页地址进行IP地址解析的装置;所述IP地址与域名之间的映射关系中的域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
- 一种域名解析系统,其特征在于,包括:根据上述权利要求15-21任意一项所述的域名解析装置;以及根据权利要求29-32任意一项所述的连接服务器的装置。
- 一种网络代理方法,其特征在于,包括:接收客户端发送的对应特定网页地址的连接请求;以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;判断是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求35所述的网络代理方法,其特征在于,还包括:若上述判断结果为否,则向预设的DNS域名解析服务器发送对应所述特定网页地址的域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;接收所述预设的DNS域名解析服务器回送的应答;根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求35所述的网络代理方法,其特征在于,在所述接收客户端发送 的对应特定网页地址的连接请求之前,还包括:启动执行所述网络代理方法的网络代理装置;所述网络代理装置,是指一种用于接收客户端发送的对应特定网页地址的连接请求,并向所述特定网页地址对应的服务器发起套接字连接的装置。
- 根据权利要求37所述的网络代理方法,其特征在于,所述网络代理装置运行在所述客户端。
- 根据权利要求37所述的网络代理方法,其特征在于,在所述接收客户端发送的对应特定网页地址的连接请求之前,还包括:配置所述网络代理装置代理所述客户端发送的连接请求。
- 根据权利要求37所述的网络代理方法,其特征在于,所述网络代理装置采用代理服务器。
- 根据权利要求37所述的网络代理方法,其特征在于,在所述启动执行所述网络代理方法的网络代理装置之前,还包括:设置所述IP地址与域名之间的映射关系集合。
- 根据权利要求35所述的网络代理方法,其特征在于,所述域名包括协议名称和主机名称,以及服务端口地址和网页路径的至少一者。
- 根据权利要求35所述的网络代理方法,其特征在于,所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址,包括:遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
- 根据权利要求35所述的网络代理方法,其特征在于,在所述以所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址之前,还包括:获取所述IP地址与域名之间的映射关系集合。
- 根据权利要求35-44任意一项所述的网络代理方法,其特征在于,所述IP地址与域名之间的映射关系集合存储在映射关系配置文件中。
- 一种网络代理装置,其特征在于,包括:接收请求单元,用于接收客户端发送的对应特定网页地址的连接请求;第一域名解析单元,用于以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;第一判断单元,用于判断是否获取到与所述特定网页地址相对应的IP地址;第一连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求46所述的网络代理装置,其特征在于,还包括:发送单元,用于若上述判断结果为否,则向预设的DNS域名解析服务器发送对应所述特定网页地址的域名解析请求,请求所述预设的DNS域名解析服务器对所述特定网页地址进行IP地址解析;接收应答单元,用于接收所述预设的DNS域名解析服务器回送的应答;第二判断单元,用于根据所述预设的DNS域名解析服务器回送的应答,判断所述预设的DNS域名解析服务器是否获取到与所述特定网页地址相对应的IP地址;第二连接单元,用于若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
- 根据权利要求46所述的网络代理装置,其特征在于,还包括:启动单元,用于启动执行所述网络代理方法的网络代理装置;所述网络代理装置,是指一种用于接收客户端发送的对应特定网页地址的连接请求,并向所述特定网页地址对应的服务器发起套接字连接的装置。
- 根据权利要求48所述的网络代理装置,其特征在于,还包括:配置单元,用于配置所述网络代理装置代理所述客户端发送的连接请求。
- 根据权利要求46所述的网络代理装置,其特征在于,还包括:设置单元,用于设置所述IP地址与域名之间的映射关系集合。
- 根据权利要求46所述的网络代理装置,其特征在于,所述第一域名解析单元包括:判断子单元,用于遍历所述IP地址与域名之间的映射关系集合包括的各个映射关 系,判断当前映射关系的域名是否为所述特定网页地址的子字符串;设置子单元,用于若上述判断结果为是,则将所述当前映射关系的IP地址作为与所述特定网页地址相对应的IP地址;返回子单元,用于若上述判断结果为否,则返回所述遍历所述IP地址与域名之间的映射关系集合包括的各个映射关系的步骤,判断下一映射关系的域名是否为所述特定网页地址的子字符串,直至遍历完所述IP地址与域名之间的映射关系集合中所有映射关系。
- 根据权利要求46所述的网络代理装置,其特征在于,还包括:获取单元,用于获取所述IP地址与域名之间的映射关系集合。
- 一种电子设备,其特征在于,包括:显示器;处理器;以及存储器,用于存储网络代理装置,所述网络代理装置被所述处理器执行时,包括如下步骤:接收客户端发送的对应特定网页地址的连接请求;以所述连接请求中的所述特定网页地址为检索依据,在预设的IP地址与域名之间的映射关系集合中进行检索,获取与所述特定网页地址相对应的IP地址;判断是否获取到与所述特定网页地址相对应的IP地址;若上述判断结果为是,则对所述与所述特定网页地址相对应的IP地址发起套接字连接。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510262429.2 | 2015-05-21 | ||
| CN201510262429.2A CN106302842B (zh) | 2015-05-21 | 2015-05-21 | 一种域名解析方法、装置及系统 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016184349A1 true WO2016184349A1 (zh) | 2016-11-24 |
Family
ID=57319414
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/081950 Ceased WO2016184349A1 (zh) | 2015-05-21 | 2016-05-13 | 一种域名解析方法、装置及系统 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106302842B (zh) |
| WO (1) | WO2016184349A1 (zh) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111245973A (zh) * | 2020-01-20 | 2020-06-05 | 烽火通信科技股份有限公司 | 一种基于域名的报文传输方法、报文转发控制方法及系统 |
| CN112235433A (zh) * | 2020-10-16 | 2021-01-15 | 北京乐学帮网络技术有限公司 | 一种域名访问方法及装置 |
| CN112333299A (zh) * | 2021-01-04 | 2021-02-05 | 观脉科技(北京)有限公司 | 一种域名解析方法、配置方法及设备 |
| CN112887451A (zh) * | 2021-02-25 | 2021-06-01 | 上海哔哩哔哩科技有限公司 | 域名解析方法、装置及计算机设备 |
| CN114390027A (zh) * | 2022-03-24 | 2022-04-22 | 恒生电子股份有限公司 | 一种网络通信方法、装置、设备及介质 |
| CN114513487A (zh) * | 2020-10-28 | 2022-05-17 | 武汉斗鱼网络科技有限公司 | 一种加速域名解析的方法、装置、电子设备及计算机可读存储介质 |
| CN115378905A (zh) * | 2022-07-22 | 2022-11-22 | 北京华顺信安科技有限公司 | 一种域名收集方法、装置、设备及计算机可读存储介质 |
| CN115442331A (zh) * | 2022-08-29 | 2022-12-06 | 天翼云科技有限公司 | 一种域名访问方法、装置、网络设备及存储介质 |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108696600B (zh) * | 2017-04-12 | 2019-11-22 | 贵州白山云科技股份有限公司 | 域名解析配置方法及装置 |
| CN107222365B (zh) * | 2017-06-08 | 2021-03-16 | 百度在线网络技术(北京)有限公司 | 数据处理方法、装置及服务器 |
| KR102333144B1 (ko) * | 2017-06-16 | 2021-11-30 | 삼성전자주식회사 | 통신 시스템에서 연결 제어 장치 및 방법 |
| CN107872548B (zh) * | 2017-11-10 | 2021-01-12 | 北京知道创宇信息技术股份有限公司 | 网页链接方法、装置及可读存储介质 |
| CN108111620A (zh) * | 2017-12-29 | 2018-06-01 | 优鸿网络科技有限公司 | 微云服务器 |
| CN109600458B (zh) * | 2019-02-22 | 2022-03-29 | 北京知道创宇信息技术股份有限公司 | 网站访问方法及装置 |
| CN110798545B (zh) * | 2019-11-05 | 2020-08-18 | 中国人民解放军国防科技大学 | 一种基于Web的域名数据获取方法 |
| CN111147616B (zh) * | 2019-12-17 | 2022-10-25 | 北京明略软件系统有限公司 | 一种资源获取方法、装置、电子设备及存储介质 |
| CN113422723B (zh) * | 2021-05-13 | 2023-05-16 | 新华三信息安全技术有限公司 | 一种转发报文的方法及设备 |
| CN113507527B (zh) * | 2021-07-20 | 2023-05-30 | 上海万物新生环保科技集团有限公司 | 一种基于网关转发的代码数据访问方法及设备 |
| CN116800711A (zh) * | 2022-12-19 | 2023-09-22 | 慧之安信息技术股份有限公司 | 一种设备域名转换系统和方法 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040103170A1 (en) * | 2002-11-21 | 2004-05-27 | Borzilleri James V. | Extended domain name method, apparatus, and system |
| CN102855334A (zh) * | 2012-09-29 | 2013-01-02 | 北京奇虎科技有限公司 | 一种浏览器及其获取dns解析数据的方法 |
| CN103024098A (zh) * | 2012-12-27 | 2013-04-03 | 北京百度网讯科技有限公司 | 一种域名解析方法、系统及装置 |
| CN104184846A (zh) * | 2014-09-10 | 2014-12-03 | 北京浩瀚深度信息技术股份有限公司 | 一种互联网端口的整理方法及装置 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101794318A (zh) * | 2010-03-26 | 2010-08-04 | 成都市华为赛门铁克科技有限公司 | Url解析方法及设备 |
| CN103581213B (zh) * | 2012-07-19 | 2017-06-13 | 阿里巴巴集团控股有限公司 | 一种共享Hosts文件的应用方法、设备和系统 |
| CN103561121B (zh) * | 2013-10-11 | 2017-04-12 | 北京奇虎科技有限公司 | 一种dns的解析方法、装置和浏览器 |
-
2015
- 2015-05-21 CN CN201510262429.2A patent/CN106302842B/zh active Active
-
2016
- 2016-05-13 WO PCT/CN2016/081950 patent/WO2016184349A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040103170A1 (en) * | 2002-11-21 | 2004-05-27 | Borzilleri James V. | Extended domain name method, apparatus, and system |
| CN102855334A (zh) * | 2012-09-29 | 2013-01-02 | 北京奇虎科技有限公司 | 一种浏览器及其获取dns解析数据的方法 |
| CN103024098A (zh) * | 2012-12-27 | 2013-04-03 | 北京百度网讯科技有限公司 | 一种域名解析方法、系统及装置 |
| CN104184846A (zh) * | 2014-09-10 | 2014-12-03 | 北京浩瀚深度信息技术股份有限公司 | 一种互联网端口的整理方法及装置 |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111245973B (zh) * | 2020-01-20 | 2022-06-03 | 烽火通信科技股份有限公司 | 一种基于域名的报文传输方法、报文转发控制方法及系统 |
| CN111245973A (zh) * | 2020-01-20 | 2020-06-05 | 烽火通信科技股份有限公司 | 一种基于域名的报文传输方法、报文转发控制方法及系统 |
| CN112235433A (zh) * | 2020-10-16 | 2021-01-15 | 北京乐学帮网络技术有限公司 | 一种域名访问方法及装置 |
| CN114513487A (zh) * | 2020-10-28 | 2022-05-17 | 武汉斗鱼网络科技有限公司 | 一种加速域名解析的方法、装置、电子设备及计算机可读存储介质 |
| CN112333299A (zh) * | 2021-01-04 | 2021-02-05 | 观脉科技(北京)有限公司 | 一种域名解析方法、配置方法及设备 |
| CN112333299B (zh) * | 2021-01-04 | 2021-12-28 | 观脉科技(北京)有限公司 | 一种域名解析方法、配置方法及设备 |
| US12166742B2 (en) | 2021-02-05 | 2024-12-10 | Shanghai Bilibili Technology Co., Ltd. | Domain name resolution method and apparatus, and computer device |
| CN112887451A (zh) * | 2021-02-25 | 2021-06-01 | 上海哔哩哔哩科技有限公司 | 域名解析方法、装置及计算机设备 |
| CN114390027A (zh) * | 2022-03-24 | 2022-04-22 | 恒生电子股份有限公司 | 一种网络通信方法、装置、设备及介质 |
| CN115378905A (zh) * | 2022-07-22 | 2022-11-22 | 北京华顺信安科技有限公司 | 一种域名收集方法、装置、设备及计算机可读存储介质 |
| CN115378905B (zh) * | 2022-07-22 | 2023-11-14 | 北京华顺信安科技有限公司 | 一种域名收集方法、装置、设备及计算机可读存储介质 |
| CN115442331A (zh) * | 2022-08-29 | 2022-12-06 | 天翼云科技有限公司 | 一种域名访问方法、装置、网络设备及存储介质 |
| CN115442331B (zh) * | 2022-08-29 | 2023-11-03 | 天翼云科技有限公司 | 一种域名访问方法、装置、网络设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106302842B (zh) | 2020-02-18 |
| CN106302842A (zh) | 2017-01-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106302842B (zh) | 一种域名解析方法、装置及系统 | |
| CN106933871B (zh) | 短链接处理方法、装置及短链接服务器 | |
| CN102624920B (zh) | 一种通过代理服务器进行访问的方法及装置 | |
| CN103561121B (zh) | 一种dns的解析方法、装置和浏览器 | |
| WO2014206118A1 (zh) | 基于tcp协议的移动互联网域名解析方法及dns服务器 | |
| WO2013143403A1 (zh) | 一种访问网站的方法和系统 | |
| CN106161669A (zh) | 一种快速域名解析方法和系统、及其终端和服务器 | |
| CN106797410A (zh) | 域名解析方法和装置 | |
| CN107613037B (zh) | 一种域名重定向方法和系统 | |
| US20130007207A1 (en) | Systems and methods for retrieving objects from a plurality of network locations | |
| KR20140021602A (ko) | 수정된 호스트네임을 사용하는 글로벌 트래픽 관리 | |
| CN109729187B (zh) | 一种代理通信方法、系统、装置及存储介质 | |
| CN106209486B (zh) | 域名解析生效的检测方法、浏览器、服务端和系统 | |
| CN113055420B (zh) | Https业务识别方法、装置及计算设备 | |
| WO2017166524A1 (zh) | 域名解析方法及装置 | |
| CN110795434A (zh) | 一种构建服务属性数据库的方法及装置 | |
| WO2017096888A1 (zh) | 域名解析系统的实现方法及装置 | |
| CN109327559A (zh) | 一种基于混合云平台的域名解析方法和装置 | |
| WO2015003556A1 (zh) | 获取一个主域名相关联的二级域名信息的设备和方法 | |
| CN110933193B (zh) | 域名解析方法、装置、电子设备及计算机可读存储介质 | |
| CN104717312A (zh) | 一种确定访问网络资源接口的方法及装置 | |
| CN114448849B (zh) | 网站IPv6网络支持模式检测方法及电子设备 | |
| CN107071091B (zh) | 一种优化dns域名解析的实现方法 | |
| WO2018081963A1 (zh) | 一种dns解析方法、装置及网络系统 | |
| TWI546688B (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: 16795836 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16795836 Country of ref document: EP Kind code of ref document: A1 |
