CN107995325B - Method for reducing domain name resolution failure on Android - Google Patents
Method for reducing domain name resolution failure on Android Download PDFInfo
- Publication number
- CN107995325B CN107995325B CN201711298586.4A CN201711298586A CN107995325B CN 107995325 B CN107995325 B CN 107995325B CN 201711298586 A CN201711298586 A CN 201711298586A CN 107995325 B CN107995325 B CN 107995325B
- Authority
- CN
- China
- Prior art keywords
- domain name
- name resolution
- reply message
- url
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- 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]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Abstract
The invention relates to a method for reducing domain name resolution failure on Android, which comprises the following steps: when receiving a domain name resolution failure reply message, acquiring a URL object in the reply message, resolving the URL object to obtain host information, sending a UDP request to a designated server, carrying the host information obtained in the previous step in the UDP request, receiving the reply message returned by the designated server, resolving the reply message to obtain an IP of a TCP proxy service, disconnecting and closing the UDP request, replacing the host linked with the original URL with the IP of the TCP proxy service to form a new URL, trying to establish an http request by using the new URL, and retrying the domain name resolution. According to the invention, secondary resolution processing is carried out aiming at domain name resolution failure, the success of domain name resolution is improved, the problem of domain name resolution failure or shielded conditions in different areas is solved, and a user can be ensured to acquire correct data as far as possible.
Description
Technical Field
The invention relates to the technical field of domain name resolution, in particular to a method for reducing domain name resolution failure on Android.
Background
In a network, storage and access to a website is typically supported by a computer or group of computers, referred to as sites, located in the Internet (Internet). When accessing a website, the domain name resolution service is required to be supported for easy memory and access.
When identifying and distinguishing computers or computer groups, IP is adopted, the IP is short for IP address, the address in the Internet is the IP address of number, the number address of the identification site on the network is inconvenient to memorize, because the IP address is composed of 32-bit binary digits, even the decimal IP address is not easy to memorize.
The Domain Name (Domain Name), which is composed of a string of characters separated by "dots", corresponds to the Name of a site and is used to identify the electronic position of a computer (sometimes also referred to as geographical location, geographical Domain Name, referring to a local area with administrative autonomy) at the time of data transmission. Relatively easy to remember.
Domain name resolution is IP for pointing domain names to sites, so that people can conveniently access a service of a website through the registered domain names. Namely: for ease of memory, domain names are used instead of IP addresses to represent sites. Domain name resolution is the process of converting a domain name to an IP address. The resolution work of the domain name is completed by a DNS server (domain name server).
For example:
the domain name www.kuwo.cn, after domain name resolution by the DNS server, will get the following IP address IPV 4: 101.36.137.11.
domain name resolution is also called domain name pointing, server setting, domain name configuration, reverse IP registration, etc. The simple point is to resolve a well-documented domain name into an IP, and the service is done by a DNS server, which resolves the domain name into an IP address and then binds a subdirectory to the domain name on the host of this IP address.
DNS is an abbreviation of Domain Name System (Domain Name System) and is a naming System used in the internet. The naming system of the internet uses a number of domains (domains), and thus the term "domain name" appears.
Because the internet is very large, it is not feasible to use only one domain name server throughout the internet. Therefore, the internet started to adopt a hierarchical tree naming method as early as 1983, and used a distributed domain name system DNS, and adopted a client server approach.
DNS allows most names to be resolved locally (resolve), with only a few resolutions requiring communication over the internet, and thus the efficiency of the DNS system is high. Since the DNS is a distributed system, even if a single computer fails, the normal operation of the entire DNS system is not hindered. Resolution of domain names to IP addresses is accomplished by a number of domain name server programs distributed across the internet. The domain name server program runs on a dedicated node, and the machine on which the domain name server program runs is also often called a domain name server.
The main point of the resolution process of domain name to IP address is as follows: when an application needs to resolve a host name into an IP address, the application process calls a resolving program, is called a client of the DNS, places a domain name to be resolved in a DNS request message, and sends the domain name to a local domain name server in a UDP user datagram mode. After the local domain name server searches the domain name, the corresponding IP address is put in the answer message and returned. The application program can communicate after obtaining the IP address of the target host.
When a DNS resolution is wrong, generally, a domain name is resolved into a wrong IP address, or when it is not known at all what the IP address corresponding to a domain name is, we cannot access the corresponding site through the domain name, which is a DNS resolution failure. The biggest symptom of DNS resolution failure is that there is no problem in accessing the IP address corresponding to the site, but an error occurs in accessing his domain name.
In Android development, when domain name resolution of a request fails in different regions, the request is abnormal, so that correct data cannot be acquired, a client cannot normally display the data, and user experience is affected.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method for reducing domain name resolution failure on Android, which is used for carrying out secondary resolution processing aiming at the domain name resolution failure, improving the success of domain name resolution, solving the problem of domain name resolution failure or shielded conditions in different areas and ensuring that a user can obtain correct data as far as possible.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
a method for reducing domain name resolution failure on Android is characterized by comprising the following steps:
when receiving the domain name resolution failure reply message, acquiring the URL object in the reply message,
the URL object is analyzed to obtain host information,
sending a UDP request to a designated server, carrying host information obtained in the last step in the UDP request,
receiving a reply message returned by the appointed server,
analyzing the reply message to obtain IP of TCP proxy service,
the UDP request is disconnected and turned off,
replacing the host linked with the original URL with the IP of the TCP proxy service to form a new URL,
an attempt is made to create an http request with a new URL and retry domain name resolution.
On the basis of the technical scheme, when a new URL is formed, the port number is specified.
On the basis of the above technical solution, the UDP request is a request including datagrampocket.
According to the method for reducing domain name resolution failure on Android, provided by the invention, secondary resolution processing is carried out aiming at the domain name resolution failure, the success rate of domain name resolution is improved, the problem that domain name resolution fails in different areas or domain names are shielded is solved, and a user can be ensured to obtain correct data as far as possible.
Drawings
The invention has the following drawings:
FIG. 1 is a flow chart of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, the method for reducing domain name resolution failure on Android described in the present invention includes the following steps:
when receiving the domain name resolution failure reply message, acquiring the URL object in the reply message,
the URL object is analyzed to obtain host information,
sending a UDP request to a designated server, carrying host information obtained in the last step in the UDP request,
receiving a reply message returned by the appointed server,
analyzing the reply message to obtain IP of TCP proxy service,
the UDP request is disconnected and turned off,
replacing the host linked with the original URL with the IP of the TCP proxy service to form a new URL,
an attempt is made to create an http request with a new URL and retry domain name resolution.
On the basis of the technical scheme, when a new URL is formed, the port number is specified.
On the basis of the above technical solution, the UDP request is a request including datagrampocket.
Those not described in detail in this specification are within the skill of the art.
Claims (2)
1. A method for reducing domain name resolution failure on Android is characterized by comprising the following steps:
when receiving the domain name resolution failure reply message, acquiring the URL object in the reply message,
the URL object is analyzed to obtain host information,
sending a UDP request to a designated server, carrying host information obtained in the last step in the UDP request,
the UDP request is a request containing Datagrapacket,
receiving a reply message returned by the appointed server,
analyzing the reply message to obtain IP of TCP proxy service,
the UDP request is disconnected and turned off,
replacing the host linked with the original URL with the IP of the TCP proxy service to form a new URL,
an attempt is made to create an http request with a new URL and retry domain name resolution.
2. The method for reducing domain name resolution failure on Android of claim 1, characterized in that: when composing a new URL, a port number is specified.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711298586.4A CN107995325B (en) | 2017-12-08 | 2017-12-08 | Method for reducing domain name resolution failure on Android |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711298586.4A CN107995325B (en) | 2017-12-08 | 2017-12-08 | Method for reducing domain name resolution failure on Android |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107995325A CN107995325A (en) | 2018-05-04 |
CN107995325B true CN107995325B (en) | 2021-08-24 |
Family
ID=62035945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711298586.4A Active CN107995325B (en) | 2017-12-08 | 2017-12-08 | Method for reducing domain name resolution failure on Android |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107995325B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112904758B (en) * | 2021-01-14 | 2022-04-26 | 北京经纬恒润科技股份有限公司 | Data return link state monitoring method and system based on unmanned vehicle |
CN114465982B (en) * | 2021-11-12 | 2023-03-24 | 中山大学 | Autonomous defense method and device for disappearing risk of authoritative domain name |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102857556A (en) * | 2012-08-06 | 2013-01-02 | 深圳市同洲电子股份有限公司 | Broadcast storm preventing method and device based on set top boxes |
CN103051717A (en) * | 2012-12-25 | 2013-04-17 | 北京小米科技有限责任公司 | Method, device and equipment for processing http request |
CN105100958A (en) * | 2015-07-27 | 2015-11-25 | 网宿科技股份有限公司 | Video flow guide method and device based on Android system |
CN105939313A (en) * | 2015-09-01 | 2016-09-14 | 杭州迪普科技有限公司 | State code redirecting method and device |
CN106063232A (en) * | 2013-12-10 | 2016-10-26 | 华为技术有限公司 | Method and apparatus for optimizing web access |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5777989A (en) * | 1995-12-19 | 1998-07-07 | International Business Machines Corporation | TCP/IP host name resolution for machines on several domains |
CN101478755B (en) * | 2009-01-21 | 2011-05-11 | 中兴通讯股份有限公司 | Network security HTTP negotiation method and related apparatus |
US20120290724A1 (en) * | 2011-05-09 | 2012-11-15 | Nomadix, Inc. | System and method for network redirection |
US9961027B2 (en) * | 2013-09-17 | 2018-05-01 | Amazon Technolgies, Inc. | Email webclient automatic failover |
CN106790747A (en) * | 2016-12-13 | 2017-05-31 | 北京网瑞达科技有限公司 | A kind of method of the secondary recursion resolution of domain name system DNS |
-
2017
- 2017-12-08 CN CN201711298586.4A patent/CN107995325B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102857556A (en) * | 2012-08-06 | 2013-01-02 | 深圳市同洲电子股份有限公司 | Broadcast storm preventing method and device based on set top boxes |
CN103051717A (en) * | 2012-12-25 | 2013-04-17 | 北京小米科技有限责任公司 | Method, device and equipment for processing http request |
CN106063232A (en) * | 2013-12-10 | 2016-10-26 | 华为技术有限公司 | Method and apparatus for optimizing web access |
CN105100958A (en) * | 2015-07-27 | 2015-11-25 | 网宿科技股份有限公司 | Video flow guide method and device based on Android system |
CN105939313A (en) * | 2015-09-01 | 2016-09-14 | 杭州迪普科技有限公司 | State code redirecting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107995325A (en) | 2018-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102859960B (en) | Method and apparatus for correlating nameserver IPv6 and IPv4 addresses | |
US20060218289A1 (en) | Systems and methods of registering and utilizing domain names | |
KR100751622B1 (en) | Network address server | |
US20090240835A1 (en) | Interactive whois | |
CN110392130B (en) | Information processing method based on network, electronic equipment and network system | |
US9363337B2 (en) | Conversion tracking and context preserving systems and methods | |
CN106068639A (en) | The Transparent Proxy certification processed by DNS | |
US8161135B2 (en) | Device identification number based name service | |
US20080294796A1 (en) | Native Language Internet Address System | |
CN107995325B (en) | Method for reducing domain name resolution failure on Android | |
CN111988447A (en) | Network security protection method and DNS recursive server | |
CN111010456B (en) | Main domain name acquisition and verification method | |
CN114205330A (en) | Domain name resolution method, domain name resolution device, server, and storage medium | |
US8024456B2 (en) | Interactive DNS for controlling party | |
CN109995885B (en) | Domain name space structure presentation method, device, equipment and medium | |
CN104253796A (en) | Domain name system fast region identification method based on network address binding region levels | |
CN112887451A (en) | Domain name resolution method and device and computer equipment | |
WO2005093999A1 (en) | Systems and methods of registering and utilizing domain names | |
CN105245626B (en) | The method for realizing website addressing using quick domain name in private network | |
CN111478984B (en) | Server IP address obtaining method and device and computer readable storage medium | |
CN110213394B (en) | DNS server configuration method, device and network system | |
US10659424B2 (en) | Determining status of domain name registration | |
US8762571B2 (en) | Interactive DNS for non-controlling party | |
Moura et al. | Diving into the NTP Pool | |
CN101553804B (en) | Method for processing native language internet address and storage medium for saving program of executing the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |