CN103581213B - A kind of application process of shared Hosts files, equipment and system - Google Patents

A kind of application process of shared Hosts files, equipment and system Download PDF

Info

Publication number
CN103581213B
CN103581213B CN201210250250.1A CN201210250250A CN103581213B CN 103581213 B CN103581213 B CN 103581213B CN 201210250250 A CN201210250250 A CN 201210250250A CN 103581213 B CN103581213 B CN 103581213B
Authority
CN
China
Prior art keywords
dns
client
shared
hosts files
shared hosts
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
Application number
CN201210250250.1A
Other languages
Chinese (zh)
Other versions
CN103581213A (en
Inventor
金立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201210250250.1A priority Critical patent/CN103581213B/en
Publication of CN103581213A publication Critical patent/CN103581213A/en
Application granted granted Critical
Publication of CN103581213B publication Critical patent/CN103581213B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application discloses a kind of application process of shared Hosts files, equipment and system, by the technical scheme of application the embodiment of the present application, client can be when needing to carry out domain name mapping, the shared Hosts file corresponding with the client is inquired about to database server by dns-proxy server, and carry out corresponding domain name mapping, obtain IP address, so as to, the unified storage and management of shared Hosts files can be carried out by database server, the content of Hosts files is realized between multiple corresponding clients shared, avoid the repetition configuration of the Hosts files for carrying out same to multiple client, reduce the cost of configuration and attended operation, simplify the process of operation treatment.

Description

A kind of application process of shared Hosts files, equipment and system
Technical field
The application is related to network technique field, more particularly to a kind of application process of shared Hosts files, equipment and is System.
Background technology
DNS (Domain Name System, domain name system) business is a core business of internet, and DNS is used as energy Enough distributed numbers for mutually mapping domain name and IP (Internet Protocol, the agreement interconnected between network) address According to storehouse, Internet user can be made more easily to access internet, without spending the IP address for remembeing to read for computer.
Hosts is a computer documents for being used to store each nodal information in internet, and this file is responsible for domain Name (or host name) is mapped to corresponding IP address.Hosts files are generally used for supplementing or replacing the function of DNS in network.When When user is input into network address (domain name) that a needs are logged in a browser, system can be searched from Hosts files automatically first The corresponding IP address of the domain name, once finding, system can open correspondence webpage according to this IP address immediately, if do not found, Then the domain name can be submitted to DNS name resolution server and carry out the parsing of IP address by system, to obtain corresponding IP address.With Unlike DNS, Hosts files are typically configured in each computer, directly can be modified on computers.
During the application is realized, inventor has found prior art, and at least there are the following problems:
In some application scenarios (such as exploitation, test, function presentation, pre- issue application scenarios), multiple client can The corresponding relation of configuration identical domain name and IP address can be needed, corresponding IP address may in different projects for same domain name It is different.Based on above-mentioned situation, during network address is logged in, if Hosts files carry out IP ground on the client using configuration Location obtains, then need each client to repeat configuration identical Hosts files, and after switching project, be to Hosts files again Configured, configuration process is excessively complicated, inefficiency;If carrying out IP address acquisition by dns server, due to DNS clothes Business device cannot be directed to disparity items and go out different IP to same domain name mapping, it is necessary to arrange multiple different dns servers, so Arrangement is not only excessively complicated, and high cost.
The content of the invention
The embodiment of the present application provides a kind of application process of shared Hosts files, equipment and system, solves in prior art Present in Hosts files configuration complex operation, repeat rate problem high.
To reach above-mentioned purpose, on the one hand the embodiment of the present application provides a kind of application process of shared Hosts files, extremely Comprise the following steps less:
Dns-proxy server receives the domain name mapping request that client sends, wherein, carried in domain name analysis request The identification information of the client and domain-name information to be resolved;
With the presence or absence of relative with the identification information of the client in the dns-proxy server inquiry database server The shared Hosts files answered, wherein, be stored with shared Hosts files in the database server, and each shared Hosts Mapping relations between the identification information of file and different clients;
If it does, the dns-proxy server is according to the shared Hosts files, parsing obtains to be resolved with described IP address corresponding to domain-name information;
If obtained successfully, the dns-proxy server will get with corresponding to the domain-name information to be resolved IP address is sent to the client.
On the other hand, the embodiment of the present application additionally provides a kind of dns-proxy server, at least includes:
Receiver module, the domain name mapping request for receiving client transmission, wherein, carried in domain name analysis request The identification information of the client and domain-name information to be resolved;
Enquiry module, for inquiring about in database server with the presence or absence of corresponding with the identification information of the client Shared Hosts files, wherein, be stored with shared Hosts files in the database server, and each shared Hosts files And the mapping relations between the identification information of different clients;
Acquisition module, it is described shared according to what is inquired in the presence of being in the Query Result of the enquiry module Hosts files, parsing is obtained and the IP address corresponding to the domain-name information to be resolved;
Sending module, for successfully being got and the IP ground corresponding to the domain-name information to be resolved in the acquisition module During location, the IP address is sent to the client.
On the other hand, the embodiment of the present application additionally provides a kind of domain name analysis system, at least including client, DNS proxy Server, database server and higher level's dns server:
The client, for the domain name mapping request sent to the dns-proxy server, and receives the DNS generations The IP address that reason server is returned, wherein, the identification information of the client and to be resolved is carried in domain name analysis request Domain-name information;
The dns-proxy server, for according to domain name analysis request, in the database server inquiry with Corresponding shared Hosts files of the identification information of the client, and according to the shared Hosts files, parsing obtain with IP address corresponding to the domain-name information to be resolved, and the IP address that will be got is sent to the client;
The database server, for storing shared Hosts files, and each shared Hosts files and different visitors Mapping relations between the identification information at family end;
Higher level's dns server, for receiving the dns-proxy server can not be from the database server solution Analysis gets the domain name mapping request of carrying domain-name information to be resolved transmitted during corresponding IP address, parses described to be resolved Domain-name information obtains corresponding IP address, and the IP address is sent into the client by the dns-proxy server End.
Compared with prior art, the embodiment of the present application has advantages below:
By the technical scheme of application the embodiment of the present application, client can be when needing to carry out domain name mapping, by DNS Proxy server inquires about the shared Hosts file corresponding with the client to database server, and carries out corresponding domain name Parsing, obtains IP address, it is thus possible to the unified storage of shared Hosts files is carried out by database server and is managed, will The content of Hosts files realizes shared between multiple corresponding clients, it is to avoid multiple client is carried out same The repetition configuration of Hosts files, reduces the cost of configuration and attended operation, simplifies the process of operation treatment.
Brief description of the drawings
The schematic flow sheet of the application process of a kind of shared Hosts files that Fig. 1 is provided for the embodiment of the present application;
The network system architecture figure of the application process of the shared Hosts files that Fig. 2 is provided for the embodiment of the present application;
The intraware figure based on above-mentioned network system architecture that Fig. 3 is provided for the embodiment of the present application;
Signalling exchange schematic diagram between each intraware that Fig. 4 is provided for the embodiment of the present application;
A kind of structural representation of dns-proxy server that Fig. 5 is provided for the embodiment of the present application;
A kind of structural representation of domain name analysis system that Fig. 6 is provided for the embodiment of the present application.
Specific embodiment
As stated in the Background Art, in existing Hosts file configurations scheme, due to being total to for configuration file cannot be accomplished Enjoy, it is necessary to carrying out one by one configures, not only configuration work amount is huge, and in follow-up maintenance process, it is also desirable to carry out big The reconfiguration operation of amount, treatment effeciency is low, and cost consumption is high.
In order to solve such problem, realize that multiple client makes by shared Hosts files present applicant proposes one kind With the scheme of same Hosts files, the unified storage of shared Hosts files is carried out by database server and is managed, will The content of Hosts files realizes shared between multiple corresponding clients, it is to avoid multiple client is carried out same The repetition configuration of Hosts files, reduces the cost of configuration and attended operation, simplifies the process of operation treatment.
As shown in figure 1, the flow of the application process of a kind of shared Hosts files provided for the embodiment of the present application is illustrated Figure, including:
Step S101, dns-proxy server receive the domain name mapping request that client sends.
Wherein, the identification information and domain-name information to be resolved of the client are carried in domain name analysis request.
In specific implement scene, above-mentioned domain-name information to be resolved is specially the object for needing to carry out domain name mapping, And the identification information of client is then equivalent to the index of specific parsing operation, mark of the dns-proxy server according to client Information, the retrieval of Hosts files is specifically shared by subsequent step in corresponding database server.
With the presence or absence of the mark with the client in step S102, dns-proxy server inquiry database server The corresponding shared Hosts files of knowledge information.
Wherein, be stored with shared Hosts files in the database server, and each shared Hosts files and difference Client identification information between mapping relations.
If it is present performing step S103;
If it does not exist, then performing step S105.
Specifically, mapping relations herein realize the index of the identification information of received client in step S101 Operation, dns-proxy server can accordingly search shared Hosts files accordingly, and continue subsequent operation.
Needs are illustrated, before step is performed, it is necessary first to shared Hosts is carried out in database server The configuration of file, its specific configuration mode includes:
(1) DNS back-stage management servers receive the configuration message of the shared Hosts files that management terminal sends.
Wherein, the configuration information of shared Hosts files is at least included in the configuration message of the shared Hosts files, with And the corresponding relation of shared Hosts files and project.
It should be noted that the DNS back-stage management servers receive matching somebody with somebody for the shared Hosts files that management terminal sends The mode of message is put, is specifically as follows and is obtained by Web modes.
Specifically, DNS back-stage management servers are in same LAN, DNS back-stage management clothes together with each management terminal Business device provides Web service to each management terminal, and each management terminal logs in DNS back-stage management servers especially by Web page, And be input into or directly submit corresponding configuration information to.
Certainly, the submission for carrying out configuration information by Web modes is a kind of specific side that the embodiment of the present application is proposed Case, in actual applications, it is also possible to by radio communication, the mode such as file transmission carries out corresponding configuration operation, such change Change has no effect on protection scope of the present invention.
(2) the DNS back-stage management servers are according to the shared Hosts of the configuration information of shared Hosts files generation File, and store corresponding described shared Hosts files according to different projects in the database server.
Under specific application scenarios, the DNS back-stage management servers are according to the shared Hosts files with confidence The shared Hosts files that breath is generated, can specifically include one or more in following three kinds of modes:
Mode one, represented by the standard mode of current system configuration domain-name information and IP address corresponding relation it is shared Hosts files.
Mode two, represented by wildcarding domain-name information and IP address corresponding relation shared Hosts files.
Mode three, represented by regular expression mode domain-name information and IP address corresponding relation shared Hosts text Part.
Certainly, except three kinds of above-mentioned modes, other can explicitly indicate that the corresponding relation of domain-name information and IP address Mode can be applied equally to the technical scheme of the application, and such change has no effect on protection scope of the present invention.
Needs are illustrated, the operating process of above-mentioned (1) and (2), and that corresponding is actually shared Hosts literary Part is configured in database server, and the operating process for being generated, in actual applications, in shared Hosts file generateds Afterwards, if specifically to be applied to it, it is necessary first to be bundled in specific client, i.e., one client is in tool Before the shared Hosts files of body application one, it is necessary first to requested database server by the client with existed one Individual shared Hosts files are bound, and specific operating process is as follows:
A, the DNS back-stage management servers receive the shared Hosts files bind request that client sends.
Wherein, the shared Hosts files bind request includes that the identification information of the client and request are tied up Project information corresponding to fixed shared Hosts files.
It should be noted that the shared Hosts files binding that the DNS back-stage management servers receive client transmission please The mode asked, is specifically as follows and is obtained by Web modes.
Specifically, DNS back-stage management servers are in same LAN, the service of DNS back-stage management together with each client Device provides Web service to each client, and each client logs in DNS back-stage management servers especially by Web page, and is input into Or directly submit corresponding bind request to.
Specific mode of operation, can be each client respectively database server provided it is stored shared Selected in Hosts listed files, or database server is shared according to the parameter that each client is input into The matching of Hosts files.
Certainly, the submission for carrying out configuration information by Web modes is a kind of specific side that the embodiment of the present application is proposed Case, in actual applications, it is also possible to by radio communication, the mode such as file transmission carries out corresponding configuration operation, such change Change has no effect on protection scope of the present invention.
B, the DNS back-stage management servers inquire about corresponding according to the project information in the database server Shared Hosts files, and the mark letter of the shared Hosts files and the client is recorded in the database server Mapping relations between breath.
Step S 103, the dns-proxy server obtain to be resolved with described according to the shared Hosts files, parsing IP address corresponding to domain-name information.
If obtained successfully, step S104 is performed;
If obtaining failure, step S105 is performed.
Step S104, the dns-proxy server will get and the IP ground corresponding to the domain-name information to be resolved Location is sent to the client.
Step S105, the dns-proxy server superior dns server send domain name analysis request.
Wherein, domain-name information to be resolved is carried in domain name analysis request.
It should be noted that the execution of this step is specially inquiry less than the processing scheme after shared Hosts files, that is, exist In the case of being unable to Application share Hosts files and carrying out domain name mapping, request higher level's dns server is directly connect to step S101 The domain-name information to be resolved for receiving carries out domain name mapping, so that, it is ensured that domain name mapping may finally be smoothly completed, that is, ensure corresponding Client is obtained in that accurate domain name mapping result, and carries out subsequent operation.
It is returning with the domain name to be resolved that step S106, the dns-proxy server receive higher level's dns server IP address corresponding to information, and the IP address is sent to the client.
Compared with prior art, the embodiment of the present application has advantages below:
By the technical scheme of application the embodiment of the present application, client can be when needing to carry out domain name mapping, by DNS Proxy server inquires about the shared Hosts file corresponding with the client to database server, and carries out corresponding domain name Parsing, obtains IP address, it is thus possible to the unified storage of shared Hosts files is carried out by database server and is managed, will The content of Hosts files realizes shared between multiple corresponding clients, it is to avoid multiple client is carried out same The repetition configuration of Hosts files, reduces the cost of configuration and attended operation, simplifies the process of operation treatment.
Below in conjunction with the accompanying drawing in the application, clear, complete description is carried out to the technical scheme in the application, shown So, described embodiment is a part of embodiment of the application, rather than whole embodiments.Based on the implementation in the application Example, the every other embodiment that those of ordinary skill in the art are obtained on the premise of creative work is not made all belongs to In the scope of the application protection.
Specifically, the shared Hosts files provided the embodiment of the present application with reference to actual exploitation, the application scenarios tested Application process be illustrated.
As shown in Fig. 2 the network system architecture of the application process of the shared Hosts files provided for the embodiment of the present application Figure, including:
Datebase (database, i.e., foregoing database server), (is used for for storing multiple shared Hosts files The corresponding relation of record Hosts information, i.e. domain name and IP address, every kind of corresponding relation is recorded in a Hosts, specifically can be with Realized by the way of shared Hosts files), and store the corresponding relation of client identification and each shared Hosts files.
Wherein, the corresponding relation of client identification and each shared Hosts files, can be specifically user's registration account (or Person other can represent the identification information of client identity) corresponding relation with each shared Hosts files.
DNS Back Office (DNS backstages, i.e., foregoing DNS back-stage management servers), for by Web modes to Each management terminal provides configuration service.
In specific treatment scene, the content that each management terminal is configured includes:Need the shared Hosts files of configuration Comprising Hosts information, and each shared Hosts files and client identification corresponding relation.
Wherein, the storage mode of Hosts information can be:Standard mode, wildcarding, regular expression mode etc..
DNS Proxy Server (dns-proxy server), the IP address for receiving client transmission obtains request, and Mark (for example, the MAC Address of the client, IP address etc.) according to the client included in it, and Datebase is deposited The client identification of storage and the corresponding relation of each shared Hosts files, determine the corresponding shared Hosts files of the client;So Afterwards, the domain name to be resolved carried in request is obtained according to IP address, and the Hosts information that the shared Hosts files are stored is (i.e. The corresponding relation of domain name and IP address) determine the corresponding IP address of the domain name to be resolved;Finally, the IP address for obtaining will be parsed to return Back to client.
Preferably, when the corresponding IP address of the domain name is not recorded in the shared Hosts files of client correspondence, DNS generations The IP address that reason server can also continue to superior dns server forwarding client obtains request, and obtains corresponding domain name Analysis result (IP address).
Client, comprising both sides operation:
First, exploitation tester can send IP address and obtain request by client to DNS Proxy Server, And domain-name information and client identification are carried in the request, to obtain the corresponding IP address of the domain name.
On the other hand, exploitation tester can also by client to DNS Back Office send association request (can With by web modes, i.e., foregoing bind request), inform that the DNS Back Office clients need to be total to which project Enjoy Hosts files correspondence.
In specific treatment scene, exploitation tester can also be selected by client, be by DNSProxy Server obtains the corresponding IP address of domain name, or using the corresponding IP address of local Hosts file acquisitions domain name.
Management terminal, exploitation test and management personnel can connect DNS Back Office to different item by management terminal The corresponding relation of the mark of the Hosts information of mesh (exploration project, test event) and each shared Hosts files and client enters Row configuration management.
Wherein, there can be multiple Hosts files in each project.Exploitation test and management personnel can also step in other-end Record management account carries out corresponding management work.
The specific stream of the application process of the shared Hosts files provided based on the above-mentioned network architecture, the embodiment of the present application Journey includes:
DNS Back Office receive the Hosts texts of the disparity items (exploration project, test event) that management terminal sends Part.There can be multiple shared Hosts files in each project.
DNS Back Office provide shared Hosts files to client, and receive the shared Hosts of client transmission File selection info, and the shared Hosts files that the client identification of the client is selected with it corresponding relation record exist In Datebase.
The IP address of the dns server of client is set to the IP address of DNS Proxy Server.
DNS Proxy Server receive that the IP address for carrying domain name and client identification that client sends obtains please Ask.
DNS Proxy Server are searched in the corresponding shared Hosts files of the client identification that Datebase is stored The corresponding IP address of the domain name.
The IP address that DNS Proxy Server will find returns to client.
Further, as shown in figure 3, being the intraware based on above-mentioned network system architecture of the embodiment of the present application proposition Figure, wherein:
Hosts, the correspondence relationship information for safeguarding one group of domain name and IP address, Hosts information is deposited including following three kinds Storage mode:
(1) StandardHosts, standard mode.
I.e. operating system provide Hosts files form.
(2) WildcardHosts, wildcarding.
For example:By recording the corresponding relation of * .cn.XXXXXXX.com and IP1, can be corresponding with IP1 by one group of domain name Binding is got up.
(3) RegularHosts, regular expression mode.
For example:By recording the corresponding relation of www. [name1 | name2] .XXXXXXX.com and IP2, can be by one group Domain name binding corresponding with IP2 is got up.
ClientHostsMapping, for safeguarding that client (or register account number) is corresponding with shared Hosts files Relation.Wherein, a shared Hosts file can be corresponding with multiple client mark.
DnsProtocol, for carrying out DNS Protocol conversion, request is obtained and to visitor to the IP address that client sends The IP address information that family end returns carries out protocol conversion.
DnsResolver, is DNS Proxy Server interior inlet components, the work for coordinating above-mentioned each intraware Make.
Signaling interaction diagram between each intraware can be found in Fig. 4, specifically include following steps:
Step S401, DnsResolver receives the IP address acquisition request that client sends.
Step S402, DnsResolver forwards the IP address to obtain request to DnsProtocol, and carries out corresponding DNS Protocol conversion.
Step S403, DnsResolver is to the ClientHostsMapping acquisition requests client and shared Hosts texts The corresponding relation of part.
Step S404, DnsResolver obtains IP address and obtains request institute according to the corresponding relation for getting, to Hosts The IP address information corresponding to domain name to be resolved for carrying.
Step S405, DnsResolver is carried out corresponding to the accessed IP address information of DnsProtocol forwardings DNS Protocol conversion.
Step S406, DnsResolver returns to corresponding IP address information to client.
Compared with prior art, the embodiment of the present application has advantages below:
By the technical scheme of application the embodiment of the present application, client can be when needing to carry out domain name mapping, by DNS Proxy server inquires about the shared Hosts file corresponding with the client to database server, and carries out corresponding domain name Parsing, obtains IP address, it is thus possible to the unified storage of shared Hosts files is carried out by database server and is managed, will The content of Hosts files realizes shared between multiple corresponding clients, it is to avoid multiple client is carried out same The repetition configuration of Hosts files, reduces the cost of configuration and attended operation, simplifies the process of operation treatment.
In order to realize above-mentioned technical scheme, the embodiment of the present application provides a kind of dns-proxy server, its structural representation Figure is as shown in figure 5, at least include:
Receiver module 51, the domain name mapping request for receiving client transmission, wherein, taken in domain name analysis request Identification information with the client and domain-name information to be resolved;
Enquiry module 52, for inquiring about in database server with the presence or absence of corresponding with the identification information of the client Shared Hosts files, wherein, be stored with shared Hosts files in the database server, and each shared Hosts texts Mapping relations between the identification information of part and different clients;
Acquisition module 53, it is described common according to what is inquired in the presence of being in the Query Result of the enquiry module 52 Hosts files are enjoyed, parsing is obtained and the IP address corresponding to the domain-name information to be resolved;
Sending module 54, for the acquisition module 53 successfully get with corresponding to the domain-name information to be resolved During IP address, the IP address is sent to the client.
In actual application scenarios, the sending module 54 is additionally operable to:
The Query Result of the enquiry module 52 be in the absence of, or the acquisition module 53 do not get successfully with During IP address corresponding to the domain-name information to be resolved, superior dns server sends domain name analysis request, and is connect described Receive that module 51 receives that higher level's dns server returns with the IP address corresponding to the domain-name information to be resolved after, will The IP address is sent to the client;
Wherein, domain-name information to be resolved is carried in domain name analysis request.
Further, the embodiment of the present application also proposed a kind of domain name analysis system, its structural representation as shown in fig. 6, At least include client 61, dns-proxy server 62, database server 63 and higher level's dns server 64:
The client 61, for the domain name mapping request sent to the dns-proxy server 62, and receives described The IP address that dns-proxy server 62 is returned, wherein, the identification information of the client 61 is carried in domain name analysis request With domain-name information to be resolved;
The dns-proxy server 62, for according to domain name analysis request, being looked into the database server 63 The shared Hosts file corresponding with the identification information of the client 61 is ask, and according to the shared Hosts files, parsing Acquisition and the IP address corresponding to the domain-name information to be resolved, and the IP address that will be got is sent to the client 61;
The database server 63, for storing shared Hosts files, and each shared Hosts files and different Mapping relations between the identification information of client 61;
Higher level's dns server 64, for receiving the dns-proxy server 62 can not be from the database service Device 63 is analyzed and acquired by the domain name mapping request of carrying domain-name information to be resolved transmitted during corresponding IP address, and parsing is described Domain-name information to be resolved obtains corresponding IP address, and is sent to the IP address by the dns-proxy server 62 The client 61.
Further, above-mentioned domain name analysis system also includes management terminal 65 and DNS back-stage management servers 66:
The management terminal 65, the configuration message for sending shared Hosts files to DNS back-stage management servers 66, Wherein, the configuration information of shared Hosts files is at least included in the configuration message of the shared Hosts files, and it is shared The corresponding relation of Hosts files and project;
The client 61, is additionally operable to send shared Hosts file bind requests to DNS back-stage management servers 66, its In, it is shared that the shared Hosts files bind request includes that the identification information of the client 61 and request are bound Project information corresponding to Hosts files;
The DNS back-stage management servers 66, for shared according to the generation of the configuration message of the shared Hosts files Hosts files, and store corresponding described shared Hosts texts according to different projects in the database server 63 Part, is additionally operable to according to the shared Hosts files bind request, inquires about corresponding shared in the database server 63 Hosts files, and the mark letter of the shared Hosts files and the client 61 is recorded in the database server 63 Mapping relations between breath.
Compared with prior art, the embodiment of the present application has advantages below:
By the technical scheme of application the embodiment of the present application, client can be when needing to carry out domain name mapping, by DNS Proxy server inquires about the shared Hosts file corresponding with the client to database server, and carries out corresponding domain name Parsing, obtains IP address, it is thus possible to the unified storage of shared Hosts files is carried out by database server and is managed, will The content of Hosts files realizes shared between multiple corresponding clients, it is to avoid multiple client is carried out same The repetition configuration of Hosts files, reduces the cost of configuration and attended operation, simplifies the process of operation treatment.
It will be appreciated by those skilled in the art that the module in device in embodiment can be divided according to embodiment description It is distributed in the device of embodiment, it is also possible to carry out respective change and be disposed other than in one or more devices of the present embodiment.On Stating the module of embodiment can merge into a module, it is also possible to be further split into multiple submodule.
Above-mentioned the embodiment of the present application sequence number is for illustration only, and the quality of embodiment is not represented.
Through the above description of the embodiments, those skilled in the art can be understood that the application can be by Software adds the mode of required general hardware platform to realize, naturally it is also possible to which by hardware, but the former is more in many cases Good implementation method.Based on such understanding, what the technical scheme of the application substantially contributed to prior art in other words Part can be embodied in the form of software product, and the computer software product is stored in a storage medium, if including Dry instruction is used to so that a station terminal equipment (can be mobile phone, personal computer, server, or network equipment etc.) performs sheet Apply for the method described in each embodiment.
The above is only the preferred embodiment of the application, it is noted that for the ordinary skill people of the art For member, on the premise of the application principle is not departed from, some improvements and modifications can also be made, these improvements and modifications also should Depending on the protection domain of the application.

Claims (10)

1. a kind of application process of shared Hosts files, it is characterised in that at least comprise the following steps:
Dns-proxy server receives the domain name mapping request that client sends, wherein, carried in domain name analysis request described The identification information of client and domain-name information to be resolved;
With the presence or absence of corresponding with the identification information of the client in the dns-proxy server inquiry database server Shared Hosts files, wherein, be stored with shared Hosts files in the database server, and each shared Hosts files And the mapping relations between the identification information of different clients, the mapping relations are for searching the shared Hosts files;
If it does, the dns-proxy server is according to the shared Hosts files, parsing is obtained and the domain name to be resolved IP address corresponding to information;
If obtained successfully, the dns-proxy server will get and the IP ground corresponding to the domain-name information to be resolved Location is sent to the client.
2. the method for claim 1, it is characterised in that the shared Hosts texts stored in the database server The configuration mode of part, specifically includes:
DNS back-stage management servers receive the configuration message of the shared Hosts files that management terminal sends, wherein, it is described shared At least include the configuration information of shared Hosts files, and shared Hosts files and project in the configuration message of Hosts files Corresponding relation;
The DNS back-stage management servers share Hosts files according to the generation of the configuration information of the shared Hosts files, and In the database server corresponding described shared Hosts files are stored according to different projects.
3. method as claimed in claim 2, it is characterised in that the DNS back-stage management servers are in the database service After storing corresponding described shared Hosts files according to different project in device, also include:
The DNS back-stage management servers receive the shared Hosts files bind request that client sends, wherein, it is described shared Hosts file bind requests include that the shared Hosts files institute that the identification information of the client and request are bound is right The project information answered;
The DNS back-stage management servers inquire about corresponding shared according to the project information in the database server Hosts files, and recorded in the database server the shared Hosts files and the client identification information it Between mapping relations.
4. method as claimed in claim 3, it is characterised in that the DNS back-stage management servers receive management terminal and send Shared Hosts files configuration message and/or the client send shared Hosts files bind request mode, tool Body is:
The DNS back-stage management servers obtain the configuration of the shared Hosts files that the management terminal sends by Web modes The shared Hosts files bind request that message and/or the client send.
5. method as claimed in claim 2, it is characterised in that the DNS back-stage management servers are according to the shared Hosts The shared Hosts files that the configuration information of file is generated, specifically include:
The shared Hosts files of domain-name information and the corresponding relation of IP address are represented by the standard mode of current system configuration; And/or,
The shared Hosts files of domain-name information and the corresponding relation of IP address are represented by wildcarding;And/or,
The shared Hosts files of domain-name information and the corresponding relation of IP address are represented by regular expression mode.
6. the method for claim 1, it is characterised in that when not existing and the client in the database server The corresponding shared Hosts files of identification information, or the dns-proxy server is according to the shared Hosts file acquisitions When IP address fails, also include:
The dns-proxy server superior dns server sends domain name analysis request, wherein, in domain name analysis request Carry domain-name information to be resolved;
The dns-proxy server receive that higher level's dns server returns with corresponding to the domain-name information to be resolved IP address, and the IP address is sent to the client.
7. a kind of dns-proxy server, it is characterised in that at least include:
Receiver module, the domain name mapping request for receiving client transmission, wherein, carried in domain name analysis request described The identification information of client and domain-name information to be resolved;
Enquiry module, shares for inquiring about in database server with the presence or absence of corresponding with the identification information of the client Hosts files, wherein, be stored with shared Hosts files in the database server, and each shared Hosts files and not Mapping relations between the identification information of same client, the mapping relations are used to search the shared Hosts files;
Acquisition module, in the presence of being in the Query Result of the enquiry module, according to the described shared Hosts texts for inquiring Part, parsing is obtained and the IP address corresponding to the domain-name information to be resolved;
Sending module, for successfully being got and the IP address corresponding to the domain-name information to be resolved in the acquisition module When, the IP address is sent to the client.
8. dns-proxy server as claimed in claim 7, it is characterised in that the sending module, is additionally operable to:
It is in the absence of or not got successfully in the acquisition module and wait to solve with described in the Query Result of the enquiry module When analysing the IP address corresponding to domain-name information, superior dns server sends domain name analysis request, and is connect in the receiver module Receive that higher level's dns server returns with the IP address corresponding to the domain-name information to be resolved after, by the IP address It is sent to the client;
Wherein, domain-name information to be resolved is carried in domain name analysis request.
9. a kind of domain name analysis system, it is characterised in that at least including client, dns-proxy server, database server and Higher level's dns server:
The client, for sending domain name analysis request to the dns-proxy server, and receives the DNS proxy service The IP address that device is returned, wherein, identification information and the domain name to be resolved letter of the client are carried in domain name analysis request Breath;
The dns-proxy server, for according to domain name analysis request, inquired about in the database server with it is described Corresponding shared Hosts files of the identification information of client, and according to the shared Hosts files, parsing obtain with it is described IP address corresponding to domain-name information to be resolved, and the IP address that will be got is sent to the client;
The database server, for storing shared Hosts files, and each shared Hosts files and different clients Identification information between mapping relations, the mapping relations be used for search the shared Hosts files;
Higher level's dns server, can not obtain for receiving the dns-proxy server from database server parsing The domain name mapping request of carrying domain-name information to be resolved transmitted during corresponding IP address is got, the domain name to be resolved is parsed Information obtains corresponding IP address, and the IP address is sent into the client by the dns-proxy server.
10. domain name analysis system as claimed in claim 9, it is characterised in that also taken including management terminal and DNS back-stage management Business device:
The management terminal, the configuration message for sending shared Hosts files to DNS back-stage management servers, wherein, it is described At least include the configuration information of shared Hosts files in the configuration message of shared Hosts files, and shared Hosts files and The corresponding relation of project;
The client, is additionally operable to send shared Hosts file bind requests to DNS back-stage management servers, wherein, it is described common Enjoy the shared Hosts files institute that Hosts file bind requests include that the identification information of the client and request are bound Corresponding project information;
The DNS back-stage management servers, for according to the shared Hosts texts of the configuration message of shared Hosts files generation Part, and corresponding described shared Hosts files are stored according to different projects in the database server, it is additionally operable to root According to the shared Hosts files bind request, inquired about in the database server and share Hosts files accordingly, and The mapping relations between the shared Hosts files and the identification information of the client are recorded in the database server.
CN201210250250.1A 2012-07-19 2012-07-19 A kind of application process of shared Hosts files, equipment and system Active CN103581213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210250250.1A CN103581213B (en) 2012-07-19 2012-07-19 A kind of application process of shared Hosts files, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210250250.1A CN103581213B (en) 2012-07-19 2012-07-19 A kind of application process of shared Hosts files, equipment and system

Publications (2)

Publication Number Publication Date
CN103581213A CN103581213A (en) 2014-02-12
CN103581213B true CN103581213B (en) 2017-06-13

Family

ID=50052141

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210250250.1A Active CN103581213B (en) 2012-07-19 2012-07-19 A kind of application process of shared Hosts files, equipment and system

Country Status (1)

Country Link
CN (1) CN103581213B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430108B (en) * 2014-08-25 2020-03-03 腾讯科技(深圳)有限公司 Test environment access method and proxy server
CN104519137B (en) * 2014-12-26 2019-08-06 北京奇虎科技有限公司 Management method, the device and system of Host file
CN104683162A (en) * 2015-03-27 2015-06-03 福州大学 Middle domain name-based system and method for achieving automatic discovery of network equipment
CN106302842B (en) * 2015-05-21 2020-02-18 阿里巴巴集团控股有限公司 Domain name resolution method, device and system
CN105245492B (en) * 2015-08-20 2019-07-30 天翼智慧家庭科技有限公司 A kind of method of concurrent access public internet under IPTV private network
CN106997306B (en) * 2016-01-26 2021-03-09 阿里巴巴集团控股有限公司 Method, device and system for migrating physical machine data to cloud
CN105808305B (en) * 2016-03-29 2022-08-30 北京小米移动软件有限公司 Static resource loading method and device
CN105959428A (en) * 2016-04-28 2016-09-21 武汉斗鱼网络科技有限公司 Domain name resolution method and device based on Linux system
WO2018112944A1 (en) * 2016-12-23 2018-06-28 深圳前海达闼云端智能科技有限公司 Domain name resolution method and apparatus
CN108462759B (en) * 2017-02-22 2021-12-21 南昌黑鲨科技有限公司 Domain name resolution method and device
CN107566211B (en) * 2017-08-23 2020-10-09 北京小米移动软件有限公司 Method, device and system for accessing test equipment
CN110019281B (en) * 2017-09-13 2023-04-07 凌云天博光电科技股份有限公司 Identification method and device for broadcasting and television equipment
CN107580080B (en) * 2017-09-15 2021-03-12 北京奇艺世纪科技有限公司 Test environment connection method and device
CN107707688A (en) * 2017-10-19 2018-02-16 杭州数梦工场科技有限公司 A kind of method and device of kubernetes clusters parsing host host name
CN108055168B (en) * 2017-12-29 2021-06-04 广州品唯软件有限公司 Http protocol debugging system, device and method
CN114553826B (en) * 2022-01-11 2023-10-17 阿里巴巴(中国)有限公司 Domain name management method, device, electronic equipment, medium and program product

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8037415B1 (en) * 2007-09-21 2011-10-11 United Services Automobile Association (Usaa) Systems, methods, and computer readable media for managing a hosts file
CN101188866B (en) * 2007-12-07 2010-04-21 华为技术有限公司 Context activation method and device for packet data protocol
US8418174B2 (en) * 2008-02-14 2013-04-09 International Business Machines Corporation Enhancing the scalability of network caching capability in virtualized environment
CN102546613B (en) * 2011-12-28 2015-08-19 深圳万兴信息科技股份有限公司 The access method of GAE trustship website and the control device of correspondence and system

Also Published As

Publication number Publication date
CN103581213A (en) 2014-02-12

Similar Documents

Publication Publication Date Title
CN103581213B (en) A kind of application process of shared Hosts files, equipment and system
CN102301677B (en) Systems And Methods For Gslb Site Persistence
CN103685590B (en) Obtain the method and system of IP address
CN103475726B (en) A kind of virtual desktop management, server and client side
CN102292960B (en) Systems and methods for global server load balancing based on SSL VPN users
CN103403707B (en) The system and method exchanged for database proxy request
CN104125208B (en) Data transmission method and device
CN106856434A (en) The method and apparatus of access request conversion
CN103888547B (en) A kind of bill processing method and server
CN101335765B (en) Storage service middleware based on mobile caching
CN102771085A (en) Systems and methods for maintaining transparent end to end cache redirection
CN103392321A (en) Systems and methods for policy based integration to horizontally deployed wan optimization appliances
CN102771090A (en) Systems and methods for policy based transparent client IP prosecution
CN102771084A (en) Systems and methods for managing static proximity in multi-core GSLB appliance
CN108055312A (en) Method for routing and its device and computer installation and its readable storage medium storing program for executing
CN103392320A (en) Systems and methods for multi-level tagging of encrypted items for additional security and efficient encrypted item determination
CN102771089A (en) Systems and methods for mixed mode handling of IPv6 and IPv4 traffic by a virtual server
CN102769529A (en) Dnssec signing server
CN103428041B (en) A kind of end-to-end flux content detection system and detection method based on cloud
CN102655481A (en) Webpape-based instant messaging chat content looking-up method and system
CN106685949A (en) Container access method, container access device and container access system
CN107846483A (en) A kind of domain name analytic method, system and server
CN102771086A (en) Systems and methods for listening policies for virtual servers of an appliance
CN107231445A (en) A kind of dynamic domain name system DNS reorientation methods, apparatus and system
CN106169963A (en) The access method of service page and system, proxy server

Legal Events

Date Code Title Description
C06 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