CN107154927A - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN107154927A
CN107154927A CN201710192563.9A CN201710192563A CN107154927A CN 107154927 A CN107154927 A CN 107154927A CN 201710192563 A CN201710192563 A CN 201710192563A CN 107154927 A CN107154927 A CN 107154927A
Authority
CN
China
Prior art keywords
dns
request message
dns request
kernel spacing
address
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.)
Pending
Application number
CN201710192563.9A
Other languages
Chinese (zh)
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.)
Beijing An Polytron Technologies Inc
Original Assignee
Beijing An Polytron Technologies Inc
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 Beijing An Polytron Technologies Inc filed Critical Beijing An Polytron Technologies Inc
Priority to CN201710192563.9A priority Critical patent/CN107154927A/en
Publication of CN107154927A publication Critical patent/CN107154927A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiments of the invention provide a kind of message processing method and device.The embodiment of the present invention from kernel spacing by socket by DNS request message without copying to user's space, kernel spacing is copied to from user's space by socket without by DNS request message, directly the DNS request message is handled using kernel spacing, and then obtain DNS response messages using kernel spacing, and DNS response messages are sent to terminal using kernel spacing, so as to save system resource;And save DNS request message the time expended needed for user's space is copied to by socket, and then improve the acquisition efficiency that terminal gets DNS response messages.

Description

Message processing method and device
Technical field
The present embodiments relate to field of computer technology, more particularly to a kind of message processing method and device.
Background technology
Currently, domain name resolution server provides webpage domain name and IP address (Internet Protocol for people Address, Internet protocol address) information mutually changed, it is a basic technology facility of internet system, is people It is daily to browse indispensable part during webpage.
At present, when user's webpage a certain using terminal access, user can input the domain of webpage to be visited in the terminal Name, for example, when user needs the homepage for browsing Baidu, the domain name of the homepage of Baidu can be inputted in the terminal " www.***.com ", terminal obtains the domain name of the webpage to be visited of user's input, and generates DNS (Domain Name System, domain name system) request message, the domain name of webpage to be visited is carried in DNS request message, is then turned to proxy server Send out DNS request message;Proxy server receives the DNS request message using linux (operating system) kernel spacing, utilizes set Connect word to copy to DNS request message in linux user's space, then forwarded using user's space to domain name resolution server The DNS request message, domain name resolution server obtains the domain name according to the webpage, obtains the web page server for the webpage that is stored with IP address, and domain name according to the webpage and the IP address of web page server generation DNS response messages, then to agency service Device sends the DNS response messages, and proxy server receives the DNS response reports that domain name resolution server is sent using user's space Text, is then copied to the DNS response messages in kernel spacing using socket, and recycling kernel spacing to be sent to terminal should DNS response messages.Terminal receives the DNS response messages, and then the IP address of the web page server in the DNS response messages The webpage is obtained from web page server, and the webpage is shown on screen, so that user browses.
Inventor has found that this scheme in correlation technique at least exists as follows during the embodiment of the present invention is realized Shortcoming.
In above process, it is necessary to which DNS request message is copied into user's space from kernel spacing using socket, and Need that DNS response messages are copied into kernel spacing from user's space using socket, reproduction process twice expends system resource, And the more time can be expended, and then reduce the acquisition efficiency that terminal gets DNS response messages.
The content of the invention
To overcome problem present in correlation technique, the embodiment of the present invention provides a kind of message processing method and device.
First aspect according to embodiments of the present invention is there is provided a kind of message processing method, applied to proxy server, described Method includes:
The DNS request message sent using the kernel spacing receiving terminal based on linux, the DNS request message is carried The domain name of webpage to be visited;
Being searched using the kernel spacing in the default message list prestored includes the note of the DNS request message Record;The default message list, which is stored in a plurality of record, each record, at least includes a DNS request message and one DNS response messages, and the DNS request message that different records includes is different with DNS response messages;
If finding includes the record of the DNS request message, sent using the kernel spacing to the terminal The DNS response messages found.
Further, methods described also includes:
If not finding includes the record of the DNS request message, taken using the kernel spacing to domain name mapping Business device sends the DNS request message;
The DNS sound that domain name resolution server is returned according to the DNS request message is received using the kernel spacing Answer message;
Utilize the DNS response messages received described in the kernel spacing to terminal transmission.
Further, methods described also includes:
The DNS request message is constituted into a record with the DNS response messages received, and is stored in described pre- If in message list.
Wherein, it is described to send the DNS request message to domain name resolution server using the kernel spacing, including:
, will be described using the kernel spacing if the source IP address in the DNS request message is private network IP address Source IP address in DNS request message is revised as the public network IP address of the proxy server, recycle the kernel spacing to Domain name resolution server sends the DNS request message that have modified source IP address.
Wherein, it is described to the DNS response messages found described in terminal transmission, including:
Purpose IP address in the DNS response messages is revised as to the private network IP of the terminal using the kernel spacing Address, recycles the kernel spacing to send the DNS response messages that have modified purpose IP address to the terminal.
Second aspect according to embodiments of the present invention is there is provided a kind of message process device, applied to proxy server, described Device includes:
First receiving module, for the DNS request message sent using the kernel spacing receiving terminal based on linux, institute State the domain name that DNS request message carries webpage to be visited;
Searching modul, for being searched using the kernel spacing in the default message list prestored including described The record of DNS request message;The default message list, which is stored in a plurality of record, each record, at least includes a DNS Request message and a DNS response message, and the DNS request message that different records includes is different with DNS response messages;
First sending module, it is empty using the kernel if including the record of the DNS request message for finding Between to the terminal send described in the DNS response messages that find.
Further, described device also includes:
Second sending module, if including the record of the DNS request message for not finding, utilizes the kernel Space sends the DNS request message to domain name resolution server;
Second receiving module, please according to the DNS for receiving domain name resolution server using the kernel spacing The DNS response messages for asking message to return;
3rd sending module, is reported for being responded using the DNS received described in the kernel spacing to terminal transmission Text.
Further, described device also includes:
Memory module, for the DNS request message to be constituted into a record with the DNS response messages received, And be stored in the default message list.
Wherein, second sending module includes:
First modification unit, if being private network IP address for the source IP address in the DNS request message, utilizes institute State the public network IP address that the source IP address in the DNS request message is revised as the proxy server by kernel spacing;
Second transmitting element, for being sent with have modified source IP to domain name resolution server using the kernel spacing The DNS request message of location.
Wherein, the 3rd sending module includes:
Second modification unit, for being changed the purpose IP address in the DNS response messages using the kernel spacing For the private network IP address of the terminal;
Second transmitting element, the DNS of purpose IP address is have modified for being sent using the kernel spacing to the terminal Response message.
Technical scheme provided in an embodiment of the present invention can include the following benefits:
In embodiments of the present invention, the DNS request message sent using the kernel spacing receiving terminal based on linux, should DNS request message carries the domain name of webpage to be visited;Bag is searched in the default message list prestored using kernel spacing Include the record of the DNS request message;Default message list, which is stored in a plurality of record, each record, at least includes a DNS Request message and a DNS response message, and the DNS request message that different records includes is different with DNS response messages;If Finding includes the record of the DNS request message, then sends the DNS response messages found to terminal using kernel spacing.
The embodiment of the present invention without by socket DNS request message is copied into user's space from kernel spacing, also without DNS request message by socket need to be copied to kernel spacing from user's space, directly handling the DNS using kernel spacing please Message is sought, and then DNS response messages are obtained using kernel spacing, and DNS response messages are sent to terminal using kernel spacing, from And save system resource;And save DNS request message is copied to by socket expended needed for user's space when Between, and then improve the acquisition efficiency that terminal gets DNS response messages.
Secondly as bottom-layer network interface is located in linux kernel spacing, and because the embodiment of the present invention is using interior Nuclear space sends DNS response messages to receive and handle DNS request message and utilization kernel spacing to terminal, therefore, it can The network interface aid in treatment DNS request message of the bottom in linux kernel spacing is made full use of, so as to improve expansion Malleability and flexibility.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The embodiment of the present invention can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the present invention Example, and be used to together with specification to explain the principle of the embodiment of the present invention.
Fig. 1 is a kind of structural representation of message handling system according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of message processing method according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of message processing method according to an exemplary embodiment;
Fig. 4 is a kind of structural representation of message process device according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the embodiment of the present invention.On the contrary, they be only with As be described in detail in the appended claims, embodiment of the present invention some in terms of consistent apparatus and method example.
Fig. 1 is a kind of structural representation of message handling system according to an exemplary embodiment, as shown in figure 1, The system includes terminal 1, proxy server 2 and domain name resolution server 3.Communicated to connect between terminal 1 and proxy server 2, Data interaction can be realized by communication connection therebetween between terminal 1 and proxy server 2;Proxy server 2 and domain Communicated to connect between name resolution server 3.Can be by therebetween between proxy server 2 and domain name resolution server 3 Data interaction is realized in communication connection.
Fig. 2 is a kind of flow chart of message processing method according to an exemplary embodiment, as shown in Fig. 2 the party Method is used in proxy server 2 as shown in Figure 1, and this method comprises the following steps.
In step S101, the DNS request message sent using the kernel spacing receiving terminal based on linux, the DNS please Message is asked to carry the domain name of webpage to be visited;
In embodiments of the present invention, user is generally surfed the Net using terminal, when user needs to utilize a certain webpage of terminal access When, user needs to input the domain name of the webpage in the terminal first, for example, www.***.com or www.taobao.com Deng.Terminal obtains the domain name of the webpage of user's input, and is obtained and deposit from domain name resolution server according to the domain name of the webpage The IP address (Internet Protocol Address, Internet protocol address) of the web page server of the webpage is contained, and then IP address further according to web page server obtains the webpage from web page server, and shows on the screen of terminal the webpage, So that user browses.
Wherein, in order to the webpage of the webpage that is stored with is obtained from domain name resolution server according to the domain name of the webpage The IP address of server, terminal needs to generate DNS request message according to the domain name of the webpage, and is sent to domain name resolution server DNS request message;So that the domain Name acquisition webpage for the webpage that domain name resolution server will be carried according to DNS request message takes The IP address of business device, and IP address and the domain name generation DNS response messages of the webpage according to web page server, then to terminal Return to DNS response messages;Terminal extracts the IP address of web page server from DNS response messages again afterwards.
In embodiments of the present invention, terminal to domain name resolution server send DNS request message when, it is necessary to first by DNS Request message is sent to proxy server, and then DNS request message is forwarded to domain name resolution server by proxy server again.Phase Ying Di, domain name resolution server takes when returning to DNS response messages to terminal, it is necessary to first send DNS response messages to agency Business device, and then DNS response messages are forwarded to terminal by proxy server again.
Therefore, in embodiments of the present invention, when terminal needs to access a certain webpage, it will send and take to proxy server The DNS request message of domain name with the webpage, the domain name that proxy server carries the webpage in receive terminal transmission one DNS request message after, DNS response messages will be obtained from domain name resolution server, carries and deposits in the DNS response messages The IP address of the web page server of the webpage and the domain name of the webpage are contained, and the DNS response messages are returned to terminal.
If terminal also needs to access the webpage afterwards, terminal can also send the DNS request message to proxy server, Proxy server is still required for obtaining the DNS response messages from domain name resolution server, and returns to DNS response reports to terminal Text, terminal receives the DNS response messages again.
But, the process that proxy server obtains the DNS response messages from domain name resolution server is:
Proxy server forwards the DNS request message to domain name resolution server;Domain name resolution server receives the DNS please Seek message, and the webpage carried according to the DNS request message domain Name acquisition be stored with the webpage web page server IP Address, the IP address of web page server and the domain name of the webpage further according to the webpage generate the DNS response messages, and to agency Server returns to the DNS response messages;Proxy server receives the DNS response messages that domain name resolution server is returned.
During the entire process of the DNS response messages are obtained from domain name resolution server, proxy server needs and domain Name resolution server carries out data interaction twice, can expend network money more between proxy server and domain name resolution server Source, and communication connection between proxy server and domain name resolution server it is unstable when, it may be necessary to expend more time Proxy server can just receive the DNS response messages of domain name resolution server return, cause to obtain the DNS response messages Obtain less efficient.
Therefore, if the DNS request message of the carrying of the terminal transmission domain name is received again afterwards, in order to carry The network that height obtains the acquisition efficiency of the DNS response messages and saved between proxy server and domain name resolution server is provided Source, when proxy server receives the DNS response messages of domain name resolution server return, except forwarding the DNS to terminal Outside response message, the DNS request message and the DNS response messages can also be constituted a record by proxy server, and be stored In the default message list being locally stored.
In this way, in embodiments of the present invention, when receiving the DNS request message for the domain name for carrying webpage to be visited, generation Reason server performs step S102 without directly forwarding the DNS request message to domain name resolution server:It is empty using kernel Between in the default message list prestored search include the record of the DNS request message;Then step S103 is performed.
In step s 102, being searched using kernel spacing in the default message list prestored includes the DNS request The record of message;
Default message list, which is stored in a plurality of record, each record, at least includes a DNS request message and one DNS response messages, and the DNS request message that different records includes is different with DNS response messages;
In embodiments of the present invention, after the DNS request message is received using kernel spacing, without by DNS request Message copies to linux user's space by socket, is searched without and using user's space default what is prestored Being searched in message list includes the record of the DNS request message, without the DNS response messages in the record found is multiple again Linux kernel spacing is made, and then DNS response messages are sent to terminal without using kernel spacing.The embodiment of the present invention is Directly being searched using kernel spacing in the default message list prestored includes the record of the DNS request message.
If finding includes the record of the DNS request message, in step s 103, sent using kernel spacing to terminal The DNS response messages found.
In embodiments of the present invention, in the record including the DNS request message in default message list, also exist The domain name of webpage to be visited is at least carried in DNS response messages in DNS response messages, the record and the webpage to be visited that is stored with Web page server IP address.
Further, after the DNS response messages during proxy server sends the record found to terminal, terminal The DNS response messages of proxy server transmission will be received, are extracted in the DNS response messages then sent from proxy server Go out the IP address of the web page server for the webpage to be visited that is stored with, and according to the IP address of web page server from web page server Webpage to be visited is obtained, and then webpage to be visited is shown on the screen of terminal, so that user browses webpage to be visited.
In embodiments of the present invention, the DNS request message sent using the kernel spacing receiving terminal based on linux, should DNS request message carries the domain name of webpage to be visited;Bag is searched in the default message list prestored using kernel spacing Include the record of the DNS request message;Default message list, which is stored in a plurality of record, each record, at least includes a DNS Request message and a DNS response message, and the DNS request message that different records includes is different with DNS response messages;If Finding includes the record of the DNS request message, then sends the DNS response messages found to terminal using kernel spacing.
The embodiment of the present invention without by socket DNS request message is copied into user's space from kernel spacing, also without DNS request message by socket need to be copied to kernel spacing from user's space, directly handling the DNS using kernel spacing please Message is sought, and then DNS response messages are obtained using kernel spacing, and DNS response messages are sent to terminal using kernel spacing, from And save system resource;And save DNS request message is copied to by socket expended needed for user's space when Between, and then improve the acquisition efficiency that terminal gets DNS response messages.
Secondly as bottom-layer network interface is located in linux kernel spacing, and because the embodiment of the present invention is using interior Nuclear space sends DNS response messages to receive and handle DNS request message and utilization kernel spacing to terminal, therefore, it can The network interface aid in treatment DNS request message of the bottom in linux kernel spacing is made full use of, so as to improve expansion Malleability and flexibility.
Further, if not found in default message list includes the record of the DNS request message, agency's clothes Business device can not just perform step S103, and then terminal is with can not just obtaining being stored with the IP of the web page server of webpage to be visited Location, also can not just obtain webpage to be visited and be browsed for user, therefore, the record including the DNS request message not found In the case of, browsed to enable the terminal to obtain webpage to be visited for user, referring to Fig. 3, this method also includes:
If not finding includes the record of the DNS request message, in step s 201, using kernel spacing to domain name solution Analysis server sends the DNS request message;
If not found in default message list includes the record of the DNS request message, do not connect before illustrating The DNS request message for the domain name for carrying webpage to be visited was received, that is, being this time to receive the domain for carrying webpage to be visited first The DNS request message of name, accordingly, it would be desirable to the DNS request message be sent to domain name resolution server using kernel spacing, so that domain The domain name for the webpage to be visited that name resolution server is carried according to DNS request message, obtains the webpage for the webpage to be visited that is stored with The IP address of server, and IP address and the domain name generation DNS response messages of webpage to be visited according to web page server, and The DNS response messages of generation are returned to proxy server.
In an alternative embodiment of the invention, sometimes the IP address of terminal is private network IP address, is not public network IP address, If the IP address of terminal is private network IP address, because the source IP address carried in DNS request message is private network IP address, then exist Proxy server is sent to domain name resolution server after the DNS request message, and domain name resolution server is just responded without normal direction DNS Message is sent to proxy server, also directly can not send DNS response messages to terminal, and then proxy server is just whole without normal direction End sends DNS response messages, and terminal does not just receive DNS response messages yet.
In order to enable the terminal to receive DNS response messages in the case of being private network IP address in the IP address of terminal, Then proxy server needs that the source IP address in DNS request message is revised as to the public network IP of proxy server using kernel spacing Address, recycles kernel spacing to send the DNS request message that have modified source IP address to domain name resolution server.
In step S202, the DNS that domain name resolution server is returned according to the DNS request message is received using kernel spacing Response message;
In step S203, the DNS response messages received are sent to terminal using kernel spacing.
In an alternative embodiment of the invention, if the source IP address of DNS request message is changed by the private network IP address of terminal For the public network IP address of proxy server, then the destination address for the DNS response messages that proxy server is received is agency service The public network IP address of device, in order to enable the terminal to receive DNS response messages, proxy server needs to utilize kernel spacing will Purpose IP address in DNS response messages is revised as the private network IP address of terminal, recycles kernel spacing to be sent to terminal and changes The DNS response messages of purpose IP address.
Further, after proxy server sends the DNS response messages received using kernel spacing to terminal, eventually End will receive the DNS response messages of proxy server transmission, be carried in the DNS response messages then sent from proxy server Take out the IP address of the web page server for the webpage to be visited that is stored with, and according to the IP address of web page server from web page server It is middle to obtain webpage to be visited, and then webpage to be visited is shown on the screen of terminal, so that user browses webpage to be visited.
Further, if receiving the DNS request message of terminal transmission again afterwards, it is somebody's turn to do in order to improve to obtain The acquisition efficiency of DNS response messages and the Internet resources saved between proxy server and domain name resolution server, agency's clothes Being engaged in device can also be by one record of the DNS request message and the DNS response messages received composition, and is stored in default message row In table.In this way, when after receive again terminal transmission the DNS request message when, it is possible to according to above-mentioned steps S101~ Step S103 flow gets the DNS response messages, so as to improve the acquisition efficiency for obtaining the DNS response messages and saving Internet resources between proxy server and domain name resolution server.
Fig. 4 is a kind of block diagram of message process device according to an exemplary embodiment.Reference picture 4, the device bag Include:
First receiving module 11, for the DNS request message sent using the kernel spacing receiving terminal based on linux, The DNS request message carries the domain name of webpage to be visited;
Searching modul 12, for being searched using the kernel spacing in the default message list prestored including described The record of DNS request message;The default message list, which is stored in a plurality of record, each record, at least includes a DNS Request message and a DNS response message, and the DNS request message that different records includes is different with DNS response messages;
First sending module 13, if including the record of the DNS request message for finding, utilizes the kernel The DNS response messages found described in space to terminal transmission.
Further, described device also includes:
Second sending module, if including the record of the DNS request message for not finding, utilizes the kernel Space sends the DNS request message to domain name resolution server;
Second receiving module, please according to the DNS for receiving domain name resolution server using the kernel spacing The DNS response messages for asking message to return;
3rd sending module, is reported for being responded using the DNS received described in the kernel spacing to terminal transmission Text.
Further, described device also includes:
Memory module, for the DNS request message to be constituted into a record with the DNS response messages received, And be stored in the default message list.
Wherein, second sending module includes:
First modification unit, if being private network IP address for the source IP address in the DNS request message, utilizes institute State the public network IP address that the source IP address in the DNS request message is revised as the proxy server by kernel spacing;
Second transmitting element, for being sent with have modified source IP to domain name resolution server using the kernel spacing The DNS request message of location.
Wherein, the 3rd sending module includes:
Second modification unit, for being changed the purpose IP address in the DNS response messages using the kernel spacing For the private network IP address of the terminal;
Second transmitting element, the DNS of purpose IP address is have modified for being sent using the kernel spacing to the terminal Response message.
Technical scheme provided in an embodiment of the present invention can include the following benefits:
In embodiments of the present invention, the DNS request message sent using the kernel spacing receiving terminal based on linux, should DNS request message carries the domain name of webpage to be visited;Bag is searched in the default message list prestored using kernel spacing Include the record of the DNS request message;Default message list, which is stored in a plurality of record, each record, at least includes a DNS Request message and a DNS response message, and the DNS request message that different records includes is different with DNS response messages;If Finding includes the record of the DNS request message, then sends the DNS response messages found to terminal using kernel spacing.
The embodiment of the present invention without by socket DNS request message is copied into user's space from kernel spacing, also without DNS request message by socket need to be copied to kernel spacing from user's space, directly handling the DNS using kernel spacing please Message is sought, and then DNS response messages are obtained using kernel spacing, and DNS response messages are sent to terminal using kernel spacing, from And save system resource;And save DNS request message is copied to by socket expended needed for user's space when Between, and then improve the acquisition efficiency that terminal gets DNS response messages.
Secondly as bottom-layer network interface is located in linux kernel spacing, and because the embodiment of the present invention is using interior Nuclear space sends DNS response messages to receive and handle DNS request message and utilization kernel spacing to terminal, therefore, it can The network interface aid in treatment DNS request message of the bottom in linux kernel spacing is made full use of, so as to improve expansion Malleability and flexibility.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Those skilled in the art will readily occur to its of the present invention after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the embodiment of the present invention, these modifications, Purposes or adaptations follow the general principle of the embodiment of the present invention and including undocumented skill of the embodiment of the present invention Common knowledge or conventional techniques in art field.Description and embodiments are considered only as exemplary, the embodiment of the present invention True scope and spirit pointed out by appended claim.
It should be appreciated that the accurate knot that the embodiment of the present invention is not limited to be described above and is shown in the drawings Structure, and various modifications and changes can be being carried out without departing from the scope.The scope of the embodiment of the present invention is only by appended right It is required that to limit.

Claims (10)

1. a kind of message processing method, applied to proxy server, it is characterised in that methods described includes:
The domain name system DNS request message sent using the kernel spacing receiving terminal based on operating system linux, the DNS Request message carries the domain name of webpage to be visited;
Being searched using the kernel spacing in the default message list prestored includes the record of the DNS request message; The default message list, which is stored, at least includes a DNS request message in a plurality of record, each record and a DNS rings Message is answered, and the DNS request message that different records includes is different with DNS response messages;
If finding includes the record of the DNS request message, send described to the terminal using the kernel spacing The DNS response messages found.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
If not finding includes the record of the DNS request message, using the kernel spacing to domain name resolution server Send the DNS request message;
The DNS response reports that domain name resolution server is returned according to the DNS request message are received using the kernel spacing Text;
Utilize the DNS response messages received described in the kernel spacing to terminal transmission.
3. method according to claim 2, it is characterised in that methods described also includes:
The DNS request message is constituted into a record with the DNS response messages received, and is stored in the default report In literary list.
4. method according to claim 3, it is characterised in that described to utilize the kernel spacing to domain name resolution server The DNS request message is sent, including:
If the source IP address in the DNS request message is private network IP address, please by the DNS using the kernel spacing Ask the source IP address in message to be revised as the public network IP address of the proxy server, recycle the kernel spacing to the domain Name resolution server sends the DNS request message that have modified source IP address.
5. method according to claim 4, it is characterised in that described to be rung to the DNS found described in terminal transmission Message is answered, including:
Purpose IP address in the DNS response messages is revised as to the private network IP of the terminal using the kernel spacing Location, recycles the kernel spacing to send the DNS response messages that have modified purpose IP address to the terminal.
6. a kind of message process device, applied to proxy server, it is characterised in that described device includes:
First receiving module, for the domain name system DNS sent using the kernel spacing receiving terminal based on operating system linux Request message, the DNS request message carries the domain name of webpage to be visited;
Searching modul, for searched using the kernel spacing in the default message list prestored include the DNS please Seek the record of message;The default message list, which is stored in a plurality of record, each record, at least includes a DNS request report Wen Yuyi DNS response message, and the DNS request message that different records includes is different with DNS response messages;
First sending module, if including the record of the DNS request message for finding, using the kernel spacing to The DNS response messages found described in the terminal transmission.
7. device according to claim 6, it is characterised in that described device also includes:
Second sending module, if including the record of the DNS request message for not finding, utilizes the kernel spacing The DNS request message is sent to domain name resolution server;
Second receiving module, for receiving domain name resolution server according to the DNS request report using the kernel spacing The DNS response messages that text is returned;
3rd sending module, for utilizing the DNS response messages received described in the kernel spacing to terminal transmission.
8. device according to claim 7, it is characterised in that described device also includes:
Memory module, for the DNS request message to be constituted into a record with the DNS response messages received, and is deposited Storage is in the default message list.
9. device according to claim 8, it is characterised in that second sending module includes:
First modification unit, if being private network IP address for the source IP address in the DNS request message, using described interior Source IP address in the DNS request message is revised as the public network IP address of the proxy server by nuclear space;
Second transmitting element, source IP address is have modified for being sent using the kernel spacing to domain name resolution server DNS request message.
10. device according to claim 9, it is characterised in that the 3rd sending module includes:
Second modification unit, for the purpose IP address in the DNS response messages to be revised as into institute using the kernel spacing State the private network IP address of terminal;
Second transmitting element, the DNS that purpose IP address is have modified for being sent using the kernel spacing to the terminal is responded Message.
CN201710192563.9A 2017-03-28 2017-03-28 Message processing method and device Pending CN107154927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710192563.9A CN107154927A (en) 2017-03-28 2017-03-28 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710192563.9A CN107154927A (en) 2017-03-28 2017-03-28 Message processing method and device

Publications (1)

Publication Number Publication Date
CN107154927A true CN107154927A (en) 2017-09-12

Family

ID=59792602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710192563.9A Pending CN107154927A (en) 2017-03-28 2017-03-28 Message processing method and device

Country Status (1)

Country Link
CN (1) CN107154927A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040345A (en) * 2018-09-30 2018-12-18 郑州冰川网络技术有限公司 The parsing accelerated method and parsing accelerator of DNS cache
WO2020103159A1 (en) * 2018-11-23 2020-05-28 华为技术有限公司 Message transmitting and receiving method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185936A (en) * 2011-06-23 2011-09-14 上海牙木通讯技术有限公司 DNS (domain name system) service system and method based on Linux operation system
US20120180125A1 (en) * 2011-01-07 2012-07-12 National Tsing Hua University Method and system for preventing domain name system cache poisoning attacks
CN102882791A (en) * 2012-10-30 2013-01-16 杭州迪普科技有限公司 Method and device for processing DNS (Domain Name Server) business
CN104601742A (en) * 2014-12-29 2015-05-06 杭州华三通信技术有限公司 Message transmission method and device
CN104917851A (en) * 2015-05-08 2015-09-16 亚信科技(南京)有限公司 Information processing method and DNS buffer server
CN105847461A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 Data packet processing method and system for intelligent equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120180125A1 (en) * 2011-01-07 2012-07-12 National Tsing Hua University Method and system for preventing domain name system cache poisoning attacks
CN102185936A (en) * 2011-06-23 2011-09-14 上海牙木通讯技术有限公司 DNS (domain name system) service system and method based on Linux operation system
CN102882791A (en) * 2012-10-30 2013-01-16 杭州迪普科技有限公司 Method and device for processing DNS (Domain Name Server) business
CN104601742A (en) * 2014-12-29 2015-05-06 杭州华三通信技术有限公司 Message transmission method and device
CN104917851A (en) * 2015-05-08 2015-09-16 亚信科技(南京)有限公司 Information processing method and DNS buffer server
CN105847461A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 Data packet processing method and system for intelligent equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040345A (en) * 2018-09-30 2018-12-18 郑州冰川网络技术有限公司 The parsing accelerated method and parsing accelerator of DNS cache
CN109040345B (en) * 2018-09-30 2023-08-22 郑州冰川网络技术有限公司 Analysis accelerating method and analysis accelerating device for DNS (Domain name System) cache
WO2020103159A1 (en) * 2018-11-23 2020-05-28 华为技术有限公司 Message transmitting and receiving method and apparatus

Similar Documents

Publication Publication Date Title
KR100843828B1 (en) Method and apparatus for managing a collection of portlets in a portal server
KR100827280B1 (en) Method and apparatus for relaying session information from a portal server
KR100819021B1 (en) Method and apparatus for enabling associated portlets of a web portal to collaborate for synchronized content display
CN101355565B (en) Method and server for providing page service for various browsers
CN111399756B (en) Data storage method, data downloading method and device
CN101606371B (en) Content distribution management device, communication terminal, program, and content distribution system
CN107070988A (en) Message processing method and device
US10938776B2 (en) Apparatus and method for correlating addresses of different internet protocol versions
KR20080100218A (en) Enhanced search results
EP1784966A1 (en) System, device and method for data transfer
CN101729442A (en) Method and device for realizing content sharing
CN102143243A (en) Dynamic routing processing method and dynamic routing processing device and home gateway thereof
CN110855766A (en) Method and device for accessing Web resources and proxy server
CN1960371B (en) Method and system for accessing file of Web application program
CN107154927A (en) Message processing method and device
CN103944942A (en) Multi-WEB environment data access method and device
US9189546B2 (en) Semantic client, semantic information management server, method of generating semantic information, method of searching semantic information, and computer program recording medium for performing the methods
US7853694B2 (en) System and method for providing contents service using service relaying apparatus
CN102801745A (en) Method and system for accessing local area network WEB site by using wide area network browser
CN104980311B (en) Predict the method, apparatus and system of network access
JP2002368781A (en) User location management domain name conversion system
CN101340392A (en) Electronic magazine, electronic magazine system and dynamic content implementing method thereof
CN105760396B (en) A kind of webpage loading method and device
CN112084247B (en) Method and device for expanding application program service
JP2007299170A (en) Information providing method, system, and program

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170912