WO2016184349A1 - Procédé, dispositif et système d'analyse de nom de domaine - Google Patents
Procédé, dispositif et système d'analyse de nom de domaine 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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; CALCULATING OR 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
La présente invention concerne un procédé, un dispositif et un système d'analyse de nom de domaine. Le procédé d'analyse de nom de domaine consiste : à recevoir une demande d'analyse de nom de domaine qui correspond à une adresse de page web spécifique et est envoyée par un client ; à analyser la demande d'analyse de nom de domaine, de manière à acquérir l'adresse de page web spécifique ; et en prenant l'adresse de page web spécifique en tant que fonction d'extraction, à effectuer une récupération dans un ensemble de relations de mappage entre des adresses IP et des noms de domaine, de manière à acquérir une adresse IP correspondant à l'adresse de la page Web spécifique. Au moyen du procédé décrit dans la présente invention, lorsqu'un fichier de page Web est ouvert par l'intermédiaire d'un navigateur client, différents ports ou chemins sous le même nom de domaine peuvent être définis pour accéder respectivement à une machine désignée, ce qui permet d'obtenir l'effet d'améliorer l'expérience de l'utilisateur.
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 (fr) | 2016-11-24 |
Family
ID=57319414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/081950 WO2016184349A1 (fr) | 2015-05-21 | 2016-05-13 | Procédé, dispositif et système d'analyse de nom de domaine |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106302842B (fr) |
WO (1) | WO2016184349A1 (fr) |
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 (10)
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 | 上海万物新生环保科技集团有限公司 | 一种基于网关转发的代码数据访问方法及设备 |
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/fr active Application Filing
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 (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111245973A (zh) * | 2020-01-20 | 2020-06-05 | 烽火通信科技股份有限公司 | 一种基于域名的报文传输方法、报文转发控制方法及系统 |
CN111245973B (zh) * | 2020-01-20 | 2022-06-03 | 烽火通信科技股份有限公司 | 一种基于域名的报文传输方法、报文转发控制方法及系统 |
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 | 观脉科技(北京)有限公司 | 一种域名解析方法、配置方法及设备 |
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 |
---|---|---|
WO2016184349A1 (fr) | Procédé, dispositif et système d'analyse de nom de domaine | |
WO2017114206A1 (fr) | Procédé et dispositif destinés au traitement de liaison courte et serveur de liaison courte | |
TWI475863B (zh) | 使用快取之安全資源名稱解析 | |
US8463915B1 (en) | Method for reducing DNS resolution delay | |
TWI478564B (zh) | 用於安全資源名稱解析的方法、電腦可讀取儲存媒體及設備 | |
US8321503B2 (en) | Context-specific network resource addressing model for distributed services | |
WO2014206118A1 (fr) | Procédé de résolution de nom de domaine fondé sur le protocole tcp dans internet mobile et serveur dns | |
US9554276B2 (en) | System and method for on the fly protocol conversion in obtaining policy enforcement information | |
WO2013143403A1 (fr) | Procédé et système pour accéder à un site web | |
CN106797410A (zh) | 域名解析方法和装置 | |
US9444780B1 (en) | Content provided DNS resolution validation and use | |
CN107613037B (zh) | 一种域名重定向方法和系统 | |
US20130007207A1 (en) | Systems and methods for retrieving objects from a plurality of network locations | |
KR20140021602A (ko) | 수정된 호스트네임을 사용하는 글로벌 트래픽 관리 | |
CN109729187B (zh) | 一种代理通信方法、系统、装置及存储介质 | |
CN109327559B (zh) | 一种基于混合云平台的域名解析方法和装置 | |
CN105704171B (zh) | 实现cdn访问的系统和方法 | |
WO2017166524A1 (fr) | Procédé et appareil d'analyse de nom de domaine | |
CN110430188A (zh) | 一种快速url过滤方法及装置 | |
WO2017096888A1 (fr) | Procédé et dispositif de mise en œuvre d'un système de nom de domaine | |
WO2020088170A1 (fr) | Procédé de configuration de système de nom de domaine et appareil associé | |
WO2015003556A1 (fr) | Dispositif et procédé d'acquisition d'informations sur le nom de domaine de deuxième niveau associées au nom de domaine principal | |
WO2013120315A1 (fr) | Procédé de traitement d'information de nom de domaine, routeur sans fil, et client | |
CN114338597A (zh) | 一种网络访问方法及装置 | |
US11134117B1 (en) | Network request intercepting framework for compliance monitoring |
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 |