Data processing method, system, proxy device, and terminal device

By configuring terminal parameters and VPN client to intercept DNS requests, ensuring that the domain name resolution request is sent to the correct domain name server through the virtual network card, solving the problem that the terminal cannot correctly resolve the domain name within the VPN, and achieving the correctness and compatibility of domain name resolution.

CN114710560BActive Publication Date: 2024-11-12ARRAY NETWORKS BEIJING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210247850.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2024-11-12
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

The operating system restrictions of some terminals result in the inability to set the priority of network cards for sending DNS requests, resulting in the intranet domain names of VPNs being unable to be correctly resolved, and the physical network cards are higher than the virtual network cards by default, resulting in the intranet name being wrongly resolved into a public IP address and unable to access intranet resources.

Method used

Configure terminal parameters to direct all domain name resolution requests to the virtual network card, and intercept these requests through the VPN client. According to the preset domain name server address relationship information, the request is sent to the corresponding domain name server to ensure the correctness of domain name resolution.

Benefits of technology

It effectively avoids the problem of domain name being misresolved, ensures the correctness of domain name resolution, and the solution is simple and easy to implement, with strong compatibility and wide application scope.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114710560B_ABST
    Figure CN114710560B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method, system, proxy device, and terminal device. The method includes: configuring the parameters corresponding to the terminal to realize that after the terminal accesses the virtual private network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance; intercepting the domain name resolution request issued by the virtual network card; and sending the domain name resolution request to the corresponding domain name server according to the preset correspondence information between the parameters and the domain name server address. The technical solution provided by the embodiment of the present application can effectively avoid the problem of incorrect domain name resolution, thereby ensuring the correctness of domain name resolution, and the whole solution is simple and easy to implement. In addition, it has strong compatibility and a wide range of applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, system, proxy device, and terminal device. Background Art

[0002] Domain name resolution refers to the process of converting domain names to IP (Internet Protocol) addresses, which is usually completed by DNS servers (i.e., domain name servers). VPN (Virtual Private Network) is a private intranet dedicated line virtualized in a public network. After a terminal accesses a VPN network, when accessing VPN intranet resources, the virtual network card in the terminal usually sends a DNS request (i.e., domain name resolution request) to its configured intranet DNS server. The intranet DNS server resolves the NPV intranet domain name to be resolved into an intranet IP address and then feeds it back to the terminal, so that the terminal can access intranet resources through the intranet IP address.

[0003] However, due to limitations in the operating systems of some terminals, it is impossible to set the network card that sends DNS requests, and the priority of the physical network card in the terminal is higher than that of the virtual network card by default. This results in the DNS request for the VPN intranet domain name being sent by the physical network card to its configured public network DNS server for resolution, making it impossible to resolve the intranet domain name or incorrectly resolving it into a public network IP address, resulting in the terminal being unable to correctly access intranet resources. Summary of the invention

[0004] The present application provides a data processing method, system, proxy device, and terminal device that solve the above-mentioned problems or at least partially solve the above-mentioned problems.

[0005] In one embodiment of the present application, a data processing method is provided. The method comprises:

[0006] Configure parameters corresponding to the terminal so that after the terminal accesses the virtual private network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance;

[0007] Intercepting the domain name resolution request sent by the virtual network card;

[0008] According to the preset corresponding relationship information between the parameters and the domain name server address, the domain name resolution request is sent to the corresponding domain name server.

[0009] In another embodiment of the present application, a data processing method is also provided. The method comprises:

[0010] Establish a network connection with a virtual private network;

[0011] According to the parameters configured by the proxy device for itself, the domain name resolution request initiated by itself is directed to the virtual network card in itself;

[0012] The domain name resolution request is sent out through the virtual network card so that the proxy device intercepts the domain name resolution request and sends the domain name resolution request to the corresponding domain name server according to the preset corresponding relationship information between the parameters and the domain name server address.

[0013] In another embodiment of the present application, a data processing system is also provided. The system includes:

[0014] The proxy device is used to configure the parameters corresponding to the terminal so that after the terminal device accesses the virtual private network, all domain name resolution requests initiated by the terminal device are directed to the virtual network card of the terminal device for issuance; intercept the domain name resolution request issued by the virtual network card; and send the domain name resolution request to the corresponding domain name server according to the preset corresponding relationship information between the parameters and the domain name server address;

[0015] The terminal device is used to establish a network connection with a virtual private network; according to the parameters configured by the proxy device for itself, the domain name resolution request initiated by itself is directed to the virtual network card in itself for issuance.

[0016] In another embodiment of the present application, a proxy device is provided. The proxy device includes: a memory and a processor, wherein the memory is used to store one or more computer programs; the processor is coupled to the memory and is used to execute the one or more computer programs stored in the memory to implement the steps in the data processing method provided in the first embodiment of the present application.

[0017] In another embodiment of the present application, a terminal device is provided. The terminal device includes: a memory and a processor, wherein the memory is used to store one or more computer programs; the processor is coupled to the memory and is used to execute the one or more computer programs stored in the memory to implement the steps in the data processing method provided in the second embodiment of the present application.

[0018] In the technical solutions provided by the embodiments of the present application, the proxy device can configure the parameters corresponding to the terminal, so that after the terminal accesses the virtual private network, the domain name resolution request initiated by the terminal is directed to the virtual network card of the terminal for issuance; further, the proxy device can intercept the domain name resolution request issued by the virtual network card of the terminal, and send the domain name resolution request to the corresponding domain name server for resolution according to the corresponding relationship information between the preset parameters and the domain name server address. This solution can effectively avoid the problem of incorrect domain name resolution, thereby ensuring the correctness of domain name resolution, and the whole solution is simple and easy to implement, and it also has strong compatibility and a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A schematic diagram of a conventional DNS request;

[0021] Figure 2 A flowchart of a data processing method provided in one embodiment of the present application;

[0022] Figure 3 A schematic diagram of a DNS request provided in accordance with an embodiment of the present application;

[0023] Figure 4a A schematic diagram of the data message format corresponding to the DNS request and DNS response provided in an embodiment of the present application;

[0024] Figure 4b A schematic diagram of the format of a flag field provided in an embodiment of the present application;

[0025] Figure 5 A flowchart of a data processing method provided in another embodiment of the present application;

[0026] Figure 6 A structural block diagram of a data processing device provided in one embodiment of the present application;

[0027] Figure 7 A structural block diagram of a data processing device provided in another embodiment of the present application;

[0028] Figure 8 A structural block diagram of a proxy device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0029] Before introducing the technical solutions provided by the embodiments of the present application, some special terms involved in the present application are first explained.

[0030] DNS (Domain Name System) is a distributed database on the Internet that maps domain names and IP addresses. It allows users to directly use easy-to-remember and meaningful domain names to access the Internet, without having to remember IP number strings that can be directly read by machines. DNS usually adopts a "client / server" architecture model. The mapping of domain names to IP addresses is usually stored in a DNS server (domain name server, that is, a server that provides domain name resolution). The process of determining the IP address corresponding to a specified domain name through the mapping in the DNS server is called domain name resolution. In the above, the domain name is the name of a computer or computer group on the Internet, which is composed of a string of words or abbreviations separated by dots, and is used to identify the location of the computer when data is transmitted. Each domain name corresponds to a unique IP address.

[0031] The DNS protocol is an application layer protocol built on the UDP protocol (or TCP protocol). It is mainly responsible for converting domain names into machine-readable IP addresses. It uses port 53 by default. Once port 53 is blocked, domain name resolution will be impossible, and the domain name cannot be used to access the network.

[0032] DNS proxy is used to forward DNS requests (i.e., domain name resolution requests) and domain name resolution responses (also called reply messages) between DNS clients and DNS servers. For a detailed description of the forwarding function of DNS proxy, please refer to the relevant content below. The above-mentioned DNS client refers to any device that needs to resolve a domain name. For example, a DNS client can be a terminal device used by a user, such as a PC (personal computer), a smartphone, a tablet computer, etc.

[0033] VPN (Virtual Private Network) is a remote access technology, which refers to the establishment of a dedicated data communication network in a public network by relying on ISP (Internet Service Provider) and other NSP (Network Service Provider). In a virtual private network, the connection between any two nodes does not have the end-to-end physical link required by a traditional private network, but is dynamically formed using the resources of a certain public network. A virtual private network can achieve interconnection between components and resources of different networks, can use the infrastructure of the Internet or other public Internet networks to create tunnels for users, and provide the same security and functional guarantees as a quasi-network.

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0035] In some processes described in the specification, claims and the above-mentioned figures of this application, multiple operations appearing in a specific order are included, and these operations may not be executed or executed in parallel in the order in which they appear in this article. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to different types. The term "or / and" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example: A or / and B, indicating that A can exist alone, A and B can exist at the same time, and B can exist alone; the character " / " in this application generally indicates that the front and back associated objects are an "or" relationship. It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such product or system. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the product or system including the elements. In addition, the following embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0036] At present, when users access Internet resources through DNS clients, they can directly enter a domain name (such as www.example.com) that is easy to remember through the domain name system. Then the DNS server in the network resolves the domain name into the correct IP address, and then obtains Internet resources according to the IP address resolved by the DNS server. Specifically, the specific interaction between the DNS client and the DNS server is as follows: the DNS client sends a DNS request carrying the domain name to be resolved to the DNS server to obtain the IP address corresponding to the domain name. After receiving the DNS request, the DNS server searches according to the domain name in the DNS request, and sometimes needs to request the superior DNS server; after the DNS server finally obtains the IP address corresponding to the domain name requested by the DNS client, it puts the corresponding IP address in the DNS response and feeds it back to the DNS client, so that the DNS client can request network services from this IP address after obtaining this IP address. In the case of setting up a DNS proxy, the DNS client does not send a DNS request directly to the DNS server, but treats the DNS proxy as a DNS server and sends the DNS request to the DNS proxy, and obtains the corresponding IP address through the interaction between the DNS proxy and the DNS server. After using the DNS proxy, when the address of the DNS server changes, you only need to change the configuration on the DNS proxy, without changing the configuration of each DNS client in the LAN, which simplifies network management.

[0037] In the domain name resolution process described above, when the DNS client is connected to the VPN network and uses VPN to access intranet resources, in order to ensure the correct resolution of the domain name, you can usually configure an intranet DNS server for the corresponding virtual network card in the DNS client and set the priority of the virtual network card, so that when the DNS terminal accesses the VPN intranet resources, it first sends the DNS request through the virtual network card to the configured intranet DNS server, and the intranet DNS server resolves the intranet domain name to be resolved in the DNS request into the corresponding intranet IP address and then feeds it back to the DNS client. However, if Figure 1As shown, if some DNS clients connected to the VPN network are not allowed to set the priority of the network card due to the limitations of the operating system, and the priority of the physical network card in the DNS client is higher than the virtual network card by default, this will cause the domain name that the DNS client needs to resolve, whether it is a VPN intranet domain name or a public network domain name, to be sent by the physical network card to the public network DNS server configured for resolution. The public network DNS server generally does not store the mapping relationship between the VPN intranet IP address and the domain name, so it is impossible to resolve the intranet IP address corresponding to the intranet domain name or resolve the intranet domain name into a public network IP address, resulting in the failure of the VPN intranet domain name resolution, and the DNS client cannot access the intranet resources normally. In solving the above problems, the existing scheme mainly modifies the priority of the physical network card of the DNS client by manual changes such as modifying the registry and modifying the number of network card hops, so as to achieve the priority use of the intranet DNS server to resolve the DNS request for the VPN intranet domain name. However, the above existing scheme has problems such as complex configuration, and in actual applications, due to the limitations of the operating system, there is still a problem that the priority of the physical network card cannot be modified using the above conventional method.

[0038] In order to solve the above problems, the present application provides a data processing technology solution. In the data processing solution provided by the present application, a VPN client (i.e., a virtual private network client) acts as a DNS proxy, and the DNS server addresses corresponding to the physical network card and the virtual network card in the DNS client are configured as the same false address through the VPN client, and a route pointing to the virtual network card is set for the false address, and the route will be added to the routing table of the DNS client when the DNS client accesses the VPN network. Through the above configuration of the DNS client, the DNS client can send a DNS request to the false address, and according to the route set for the false address, the DNS request will be processed and issued through the virtual network card. The VPN client can intercept the DNS request issued by the virtual network card, and according to the correspondence between the false address preset therein and the real domain name server address, the DNS request is sent to the corresponding domain name server for domain name resolution, so that the domain name in the DNS request can be correctly resolved.

[0039] The data processing technical solutions provided in each embodiment of the present application are described in detail below.

[0040] Figure 2A flow chart of a data processing method provided by an embodiment of the present application is shown. The data processing method is applied to a proxy device, and the proxy device is a VPN client. The VPN client may refer to client software that provides VPN access services to users, such as a web client or an APP application. In specific implementation, the VPN client may be built into the terminal, or placed in other external devices and connected to the terminal through respective wired or wireless means, or may even be partially built into the terminal, while other parts are placed in other external devices and connected to the terminal device. This embodiment does not limit the inclusion relationship between the VPN client and the terminal, as long as the purpose of transmitting data between the VPN client and the terminal can be achieved. For an introduction to the terminal, please refer to the relevant content below. Figure 2 As shown, the data processing method includes the following steps:

[0041] 101. Configure parameters corresponding to the terminal so that after the terminal accesses a virtual private network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance;

[0042] 102. Intercepting the domain name resolution request sent by the virtual network card;

[0043] 103. Send the domain name resolution request to a corresponding domain name server according to the preset corresponding relationship information between the parameters and the domain name server address.

[0044] In the above 101, the terminal is the DNS client described above, but different expressions are used in different description scenarios. The terminal can be any device that needs to resolve the domain name, and can access the intranet service after it is connected to the virtual private network (i.e., VPN network); wherein the intranet can be a set local area network, such as an enterprise intranet, a school intranet, or an intranet of a government unit, etc., and the intranet service may include domain name resolution services and application services, which are provided by the intranet domain name server and the intranet source server respectively arranged in the intranet. The above VPN network can be implemented based on but not limited to SD-WAN (Software DefinedWAN, software defined wide area network) technology. In specific implementation, the terminal can be any electronic device with network access function, more specifically any electronic device that can access the VPN network and access intranet resources, for example, the terminal can be but not limited to smart phones, tablet computers, laptops, desktop computers, smart wearable devices (such as smart watches, smart reality glasses), etc.

[0045] In this embodiment, in order to simplify network management, when the terminal accesses the VPN network to access intranet resources, the VPN client is used as a proxy to forward data (such as DNS requests, domain name resolution responses) between the terminal and the DNS server. However, considering that in actual applications, after the terminal accesses the VPN network, the physical network card and the virtual network card in the terminal are usually configured with a public DNS server and an intranet DNS server respectively. The public DNS server stores the mapping relationship between the public IP address and the domain name, and the intranet DNS server stores the mapping relationship between the intranet IP address and the domain name. Therefore, in order to ensure that the terminal can access the intranet resources normally, the terminal needs to send a DNS request to the intranet DNS server through the virtual network card, so that the intranet DNS server can correctly resolve the domain name to be resolved into the corresponding intranet IP address. However, based on the relevant description above, it can be seen that in the case of limitations in the terminal's operating system, etc., the DNS request sent by the terminal, whether it is for the VPN intranet domain name or the public domain name, will be sent by the physical network card to its configured public DNS server for resolution, which may easily cause the VPN intranet domain name resolution to fail, and the terminal cannot access the intranet resources normally. In order to solve the above problems, see Figure 3 As shown, in addition to the data forwarding function, the VPN client in this embodiment also has the function of configuring the corresponding parameters of the terminal so that after the terminal accesses the VPN network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance. Specifically, the VPN client can configure the domain name server addresses corresponding to the physical network card and the virtual network card of the terminal to be the same false address, and set the route corresponding to the false address to point to the virtual network card, so that the destination address of all DNS requests sent by the terminal is this false address, and the terminal sends the DNS request through the virtual network card therein according to the route corresponding to the false address. Subsequently, the VPN client can intercept the DNS request issued by the virtual network card of the terminal, and forward the DNS request to the corresponding DNS server for resolution, so as to ensure that the domain name to be resolved can be correctly resolved. Based on this,

[0046] That is, in a specific achievable technical solution, the “configuring parameters corresponding to the terminal” in the above 101 may include the following steps:

[0047] 1011. Configure the domain name server addresses corresponding to the physical network card and the virtual network card in the terminal to be the same false address;

[0048] 1012. Set a designated route for the false address; wherein the designated route is used to direct a domain name resolution request whose destination address is the false address to the virtual network card;

[0049] 1013. When the terminal accesses a virtual private network, add the designated route to a routing table of the terminal.

[0050] In the above 1011, the same false address configured for the domain name server address corresponding to the physical network card and the virtual network card in the terminal can be flexibly set according to the actual situation, as long as it is guaranteed to comply with the IP address format. For example, the false address can be 1.2.3.4. In the process of configuring the false address, it can be manually triggered by the administrator, or automatically triggered by the VPN client, which is not limited here. For example, in a specific example, when the VPN client is started, it can immediately call the corresponding computer program stored in itself to reconfigure the domain name server address corresponding to the physical network card and the virtual network card in the terminal, so as to configure them into the same false address (such as 1.2.3.4).

[0051] In the above 1012 to 1013, after completing the configuration of the domain name server address corresponding to the physical network card and the virtual network card of the terminal through the above step 1011, when the terminal accesses network resources, whether sending a DNS request for an intranet domain name or a public network domain name, the destination address carried in the DNS request is the false address. In this case, in order to make the DNS request sent through the virtual network card, a designated route pointing to the virtual network card of the terminal can be set for the false address, and the routing table of the terminal can be modified when the terminal accesses the VPN network to add the designated route to the routing table of the terminal. In this way, when the terminal initiates a DNS request with a destination address as a false address, the DNS request will be directed to the virtual network card of the terminal according to the designated route corresponding to the false address in the routing table. For the specific implementation of setting a designated route pointing to the virtual network card of the terminal for the false address, please refer to the existing content.

[0052] It should be noted that the DNS request initiated by the terminal may be generated by an application such as a browser running on the terminal. The data message format corresponding to the DNS request (or DNS response) can be found in Figure 4a The format shown. Figure 4a As shown in FIG. 1 , the message is composed of a 12-byte header and 4 variable-length fields; the flag field in the 12-byte field is 16 bits and is divided into the following: Figure 4b Several subfields are shown. Figure 4b Among the fields shown, QR is a 1-bit field that defines whether the message is a request or a response. When QR is 0, it indicates a request, and when it is 1, it indicates a response. Figure 4a and Figure 4b For the meaning of other fields in the data format shown in , please refer to the existing content.

[0053] It should be noted that after the terminal accesses the VPN network, it does not mean that the terminal can only access the intranet resources. In some embodiments, the user can set the terminal so that the terminal connected to the VPN network can access the intranet resources without affecting the access to the public network resources. That is to say, when the terminal accesses the VPN network, it can initiate a DNS request for the intranet domain name or the public network domain name. This embodiment does not limit this. However, after the VPN client configures the corresponding parameters of the terminal as described above, the DNS request initiated by the terminal, whether it is for the intranet domain name or the public network domain name, is directed to the virtual network card of the terminal for processing and issuance.

[0054] After the DNS request initiated by the terminal is directed to the virtual network card of the terminal, the virtual network card will first encapsulate the DNS request to generate a corresponding encapsulated data packet before sending out the received DNS request, and then send the generated encapsulated data packet to the domain name resolution port (also called the source port) of the terminal for sending out. In the above, the encapsulation processing of the DNS request can be but is not limited to being implemented based on the UDP protocol, and the domain name resolution port of the terminal is usually port 53. Based on this, in the above 102, the VPN client can monitor whether the virtual network card of the terminal sends out a DNS request by monitoring port 53 of the terminal, and when the virtual network card of the terminal is monitored to send out a DNS request, the DNS request sent by the virtual network card of the terminal is intercepted. That is, a feasible technical solution for the above 102 "intercepting the domain name resolution request sent by the virtual network card" is:

[0055] 1021. Monitor the domain name resolution port of the terminal to determine whether the virtual network card sends a domain name resolution request according to the monitoring result;

[0056] 1022. When it is determined that the virtual network card sends a domain name resolution request, intercept the domain name resolution request sent by the virtual network card.

[0057] In the specific implementation, the terminal's domain name resolution port is monitored according to the port number corresponding to the same false address and domain name resolution port configured for the terminal's physical network card and virtual network card, so as to intercept the DNS request sent by the terminal's virtual network card. For example, following the above example, assuming that the false address is 1.2.3.4 and the domain name resolution port is port 53, the VPN client can intercept the DNS request sent by the terminal's virtual network card through "1.2.3.4:53". It should be noted that: since the virtual network card encapsulates the DNS request before sending it out, the DNS request intercepted here is actually the encapsulated DNS request, that is, the encapsulated data packet mentioned above; the encapsulated data packet contains but is not limited to the source port (such as port 53), the protocol version (such as UDP protocol), the source address (i.e., the address of the terminal), the destination address (i.e., the false address), etc. The specific data format of the encapsulated data packet can be referred to the existing content, and will not be described in detail here.

[0058] See also Figure 3 As shown, in order to ensure that the VPN client can forward the intercepted DNS request to the corresponding domain name server for correct resolution, in the technical solution provided by this embodiment, the VPN client is preset with the corresponding relationship information between the parameter and the domain name server address (which is the real domain name server address), specifically, the corresponding relationship information between the false address and the domain name server address is preset. After the VPN client intercepts the DNS request sent by the virtual network card of the terminal, it can forward the DNS request to the corresponding DNS server for domain name resolution based on the corresponding relationship information preset in itself. In the above, the corresponding relationship information includes the corresponding relationship between the false address and at least one domain name server address and also includes the priority of at least one domain name server. On the basis of determining at least one domain name server address corresponding to the false address according to the corresponding relationship in the corresponding relationship information, the VPN client can further select a domain name server address from at least one domain name server as the target domain name server address according to the priority of at least one domain name server address, so as to send the intercepted DNS request to the domain name server corresponding to the target domain name server address for resolution. That is, the correspondence information in the above 103 includes the correspondence between the false address and the at least one domain name server address, and the priority of the at least one domain name server; accordingly, the above 103 "sending the domain name resolution request to the corresponding domain name server according to the preset correspondence information between the parameters and the domain name server address" may specifically include:

[0059] 1031. Determine at least one domain name server address corresponding to the false address based on the corresponding relationship;

[0060] 1032. Select a domain name server address from the at least one domain name server address as a target domain name server address according to the priority;

[0061] 1033. Send the domain name resolution request to a domain name server corresponding to the target domain name server address.

[0062] In the specific implementation, it can be known from the above contents related to step 101 that, through the configuration of the corresponding parameters of the terminal by the VPN client, the DNS request initiated by the terminal, whether for the intranet domain name or the public domain name, is directed to the virtual network card of the terminal for processing and issuance. Therefore, the DNS request intercepted by the VPN client may be a DNS request for the intranet domain name or a DNS request for the public domain name. Therefore, in order to ensure that the DNS request sent by the terminal can be correctly resolved, at least one domain name server address corresponding to the set false address needs to ensure that all types of DNS requests can be resolved. Generally, in addition to the mapping relationship between the intranet IP address and the domain name as described above, the intranet DNS server also stores the mapping relationship between most of the public IP addresses and domain names. Based on this, in some embodiments, the domain name server type corresponding to at least one domain name server address in the corresponding relationship information preset in the VPN client can be all intranet DNS servers. Of course, in some other embodiments, the domain name server type corresponding to at least one domain name server address can be part of the intranet DNS server and part of the public DNS server. This embodiment does not specifically limit the type of domain name server corresponding to at least one domain name server address, as long as it can ensure that the domain name server corresponding to at least one domain name server address can correctly resolve the type of DNS request of the terminal. However, considering that when the terminal accesses a VPN network, the terminal mostly accesses intranet resources, for this reason, when the type of domain name server corresponding to the at least one domain name server address includes both an intranet DNS server and a public network DNS server, the priority of the domain name server address corresponding to the intranet DNS server can be higher than the domain name server address corresponding to the public network DNS server.

[0063] In the process of selecting a domain name server address from the at least one domain name server address as the target domain name server address according to the priority of at least one domain name server address, a domain name server address with the highest priority may be first selected as the target domain name server address. That is to say, the above 1032 "selecting a domain name server address from the at least one domain name server address as the target domain name server address according to the priority" may be implemented by the following steps:

[0064] 10321. According to the priority, select a domain name server address with the highest priority from the at least one domain name server address as the target domain name server address.

[0065] After determining the target domain name server address, Figure 3 As shown, the VPN client can forward the intercepted DNS request to the domain name server corresponding to the target server address for resolution. While forwarding, the VPN client can also record the source port (i.e. port 53) corresponding to the DNS request, so that after receiving the DNS response fed back by the domain name server, the DNS response can be sent to the source port of the DNS request cached by the terminal, thereby realizing the feedback of the DNS response to the terminal through the source port, so that the terminal can access the corresponding network resources based on the IP address carried in the DNS response.

[0066] After forwarding the DNS request to the domain name server corresponding to the target domain name server address, if the domain name server stores the mapping relationship between the corresponding domain name and the IP address, it will generally quickly make a corresponding DNS response and feedback to the VPN client; on the contrary, if the mapping relationship between the corresponding domain name and the IP address is not stored, the VPN client will not be able to receive the corresponding DNS response even after a long wait, and this will also cause the terminal to access network resources at a reduced rate. In order to avoid the VPN client from having the above-mentioned useless long wait, which causes the terminal to access network resources at a reduced rate, in this embodiment, a set time is set. If the VPN client detects that it has not received the DNS response fed back by the domain name server corresponding to the target domain name server address within the set time, it will re-select a new domain name server address from the at least one domain name server address as the target server address according to the priority of at least one domain name server address, and re-forward the DNS request to the domain name server corresponding to the newly selected domain name server address for resolution. That is, in the technical solution provided by this embodiment, the above 103 may also include the following steps:

[0067] 1034. Detect whether a domain name resolution response fed back by the domain name server corresponding to the target domain name server address is received within a set time;

[0068] 1035. If the domain name resolution response is not received, return to execute the step of selecting a domain name server address from the at least one domain name server address as the target domain name server address according to the priority; if the domain name resolution response is received, send the domain name resolution response to the terminal.

[0069] In specific implementation, the above-mentioned set time can be flexibly set according to actual conditions. For example, the set time can be 1 second, 3 seconds, 4 seconds, etc., which is not limited here. If the corresponding DNS response is not received within the set time, a domain name server address with a priority only lower than the last selected domain name server address among at least one domain name resolution server address can be used as the new target domain name resolution server address according to the priority of at least one domain name resolution server address, and the DNS request is re-forwarded to the domain name server corresponding to the new target domain name server address for resolution. If a responsive DNS response is received within the set time, the DNS response is forwarded to the terminal. For the specific implementation of forwarding the DNS response to the terminal, please refer to the relevant content above.

[0070] In combination with the content related to the above 103, for example, assuming that domain name server address 1, domain name server address 2, domain name server address 3 and domain name server address 1, these four domain name server addresses have a corresponding relationship with the false address (such as 1.2.3.4). For the convenience of description, the above four domain name server addresses are referred to as address 1, address 2, address 3 and address 4, respectively, and the priorities of address 1, address 2, address 3 and address 4 gradually decrease. According to the priorities of address 1, address 2, address 3 and address 4, the VPN client will first forward the intercepted DNS request to the domain name resolution server corresponding to address 1 with the highest priority for resolution. If the corresponding DNS response is not received within the set time, the DNS request will be re-forwarded to the domain name resolution server corresponding to address 2 with a priority only lower than address 1 for resolution, and so on, until the corresponding DNS response is received.

[0071] The technical contents provided by the above embodiments can be summarized as follows: Figure 3 The interactive process among the terminal, VPN client and DNS server is shown. That is, in this embodiment, the VPN client can configure the corresponding parameters of the terminal while acting as a DNS proxy, so that all DNS requests initiated by the terminal are processed and sent out by the virtual network card of the terminal; the VPN client can intercept the DNS request sent by the virtual network card of the terminal, and when forwarding the intercepted DNS request, it can also determine the priority order of forwarding the DNS request to the corresponding DNS server. By adopting the above technical means, this solution can effectively avoid the problem of incorrect resolution of domain names.

[0072] In summary, the technical solution provided in this embodiment, by configuring the parameters corresponding to the terminal, realizes that after the terminal accesses the virtual private network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance; further, the domain name resolution request issued by the virtual network card of the terminal can be intercepted, and the domain name resolution request can be sent to the corresponding domain name server according to the correspondence information between the preset parameters and the domain name server address. The adoption of this solution can effectively avoid the problem of incorrect domain name resolution, thereby ensuring the correctness of domain name resolution, and the whole solution is simple and easy to implement. In addition, this solution also has strong compatibility and a wide range of applications, and can support most platforms. Specifically, the supported platforms include but are not limited to Windows, MacOS, Linux, iOS, Android, etc.

[0073] Another embodiment of the present application also provides a data processing method. The data processing method is as follows Figure 5 In the flowchart shown, the execution subject of the method is a terminal device (that is, the DNS client described above). In specific implementation, the terminal device can be any electronic device with network access function, more specifically, any electronic device that can access the VPN network and access intranet resources. For example, the terminal can be but not limited to a smart phone, tablet computer, laptop computer, desktop computer, smart wearable device (such as smart watch, smart reality glasses), etc. For a detailed introduction to the terminal device, please refer to the relevant content above. Figure 5 As shown, the data processing method provided in this embodiment includes the following steps:

[0074] 201. Establishing a network connection with a virtual private network;

[0075] 202. Direct the domain name resolution request initiated by the proxy device to the virtual network card in the proxy device according to the parameters configured by the proxy device for the proxy device;

[0076] 203. The domain name resolution request is sent out through the virtual network card, so that the proxy device intercepts the domain name resolution request and sends the domain name resolution request to a corresponding domain name server according to the preset correspondence information between the parameters and the domain name server address.

[0077] In the above 201, the specific method for the terminal device to establish a network connection with a virtual private network (VPN) can be found in the existing content and will not be described in detail here.

[0078] In the above 202, the proxy device is a virtual private network client (i.e., VPN client), and the specific introduction of the VPN client can be found in the above related content. In addition, the specific implementation of the above 202 to 203 can also be found in the above related content, and no further specific description is given here.

[0079] Furthermore, a feasible technical solution for “issuing the domain name resolution request through the virtual network card” in the above 203 is:

[0080] 2031. The domain name resolution request is encapsulated and processed by the virtual network card and then sent out.

[0081] For the specific implementation of the above 2031, please refer to the relevant content above.

[0082] An embodiment of the present application also provides a data processing system. The structure of the data processing system is as follows Figure 3 Specifically, the data processing system includes: an agent device 200 and a terminal device 100; wherein,

[0083] The proxy device 200 is used to configure the parameters corresponding to the terminal so as to realize that after the terminal device accesses the virtual private network, all domain name resolution requests initiated by the terminal device are directed to the virtual network card of the terminal device for issuance; intercept the domain name resolution request issued by the virtual network card; and send the domain name resolution request to the corresponding domain name server according to the preset corresponding relationship information between the parameters and the domain name server address;

[0084] The terminal device 100 is used to establish a network connection with a virtual private network; according to the parameters configured by the proxy device for itself, the domain name resolution request initiated by itself is directed to the virtual network card in itself for issuance.

[0085] The above proxy device is a virtual private network client (i.e. VPN client)

[0086] It should be noted here that: the data processing system provided in the above embodiment can implement the technical solutions described in the above method embodiments. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above corresponding method embodiments, which will not be repeated here.

[0087] Figure 6 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present application. Figure 6 As shown, the device includes: a configuration module 31, an interception module 32 and a sending module 33. Among them,

[0088] The configuration module 31 is used to configure the parameters corresponding to the terminal so that after the terminal accesses the virtual private network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance;

[0089] An interception module 32, used for intercepting the domain name resolution request sent by the virtual network card;

[0090] The sending module 33 is used to send the domain name resolution request to the corresponding domain name server according to the preset corresponding relationship information between the parameters and the domain name server address.

[0091] Furthermore, the above-mentioned configuration module 31, when used to configure the parameters corresponding to the terminal, is specifically used to: configure the domain name server addresses corresponding to the physical network card and the virtual network card in the terminal to be the same false address; set a designated route for the false address; wherein the designated route is used to direct the domain name resolution request with the destination address as the false address to the virtual network card; when the terminal accesses a virtual private network, the designated route is added to the routing table of the terminal.

[0092] Furthermore, the above-mentioned correspondence information includes the correspondence between the false address and at least one domain name server address, and the priority of the at least one domain name server address; accordingly, the above-mentioned sending module 33, when used to send the domain name resolution request to the corresponding domain name server according to the correspondence information between the preset parameters and the domain name resolution server address, is specifically used to: determine at least one domain name server address corresponding to the false address based on the correspondence; select a domain name server address from the at least one domain name server address as the target domain name server address according to the priority; and send the domain name resolution request to the domain name server corresponding to the target domain name server address.

[0093] Furthermore, the above-mentioned sending module 33, when used to select a domain name server address from the at least one domain name server address as the target domain name server address according to the priority, is specifically used to: select a domain name server address with the highest priority from the at least one domain name server address as the target domain name server address according to the priority.

[0094] Furthermore, the device provided in this embodiment also includes:

[0095] A detection module, used to detect whether a domain name resolution response fed back by a domain name server corresponding to the target domain name server address is received within a set time;

[0096] The execution sending module is used for returning to the step of selecting a domain name server address from the at least one domain name server address as the target domain name server address according to the priority if the domain name resolution response is not received; and sending the domain name resolution response to the terminal if the domain name resolution response is received.

[0097] Furthermore, the virtual network card of the terminal may encapsulate the domain name resolution request before sending the domain name resolution request.

[0098] It should be noted here that: the data processing device provided in the above embodiment can realize the above Figure 2 The technical solution described in the data processing method embodiment shown in the figure, the specific implementation principle of each module or unit can be found in the above Figure 2 The corresponding contents in the data processing method embodiment shown will not be repeated here.

[0099] Figure 7 FIG. 2 shows a schematic diagram of the structure of a data processing device provided by another embodiment of the present application. Figure 7 As shown, the device includes: an establishment module 41, a direction module 42 and an issuance module 43.

[0100] Establishing module 41, used to establish a network connection with a virtual private network;

[0101] A directing module 42, used to direct the domain name resolution request initiated by the proxy device to the virtual network card in the proxy device according to the parameters configured by the proxy device for the proxy device;

[0102] The issuing module 43 is used to issue the domain name resolution request through the virtual network card so that the proxy device intercepts the domain name resolution request and sends the domain name resolution request to the corresponding domain name server according to the preset corresponding relationship information between the parameters and the domain name server address.

[0103] Furthermore, when the issuing module 43 is used to issue the domain name resolution request through the virtual network card, it is specifically used to: encapsulate the domain name resolution request through the virtual network card and then issue it.

[0104] Furthermore, the above-mentioned proxy device is a virtual private network client.

[0105] It should be noted here that: the data processing device provided in the above embodiment can realize the above Figure 5 The technical solution described in the data processing method embodiment shown in the figure, the specific implementation principle of each module or unit can be found in the above Figure 5 The corresponding contents in the data processing method embodiment shown will not be repeated here.

[0106] Figure 8 The schematic diagram of the structure of the proxy device provided by an embodiment of the present application is shown. The proxy device includes a memory 51 and a processor 52. The memory 51 is used to store one or more computer instructions, and the processor 52 is coupled to the memory 51 and is used for one or more computer instructions (such as computer instructions for implementing data storage logic) to implement the above Figure 2 The steps in the data processing method embodiment are shown.

[0107] The above-mentioned memory 51 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0108] Further, if Figure 8 As shown, the proxy device also includes: a communication component 53, a power component 54, an audio component 55 and other components. Figure 8 Only some components are shown schematically, which does not mean that the proxy device only includes Figure 8 Components shown.

[0109] Another embodiment of the present application further provides a terminal device, the structure of which is similar to Figure 8 The schematic diagram of the structure of the proxy device is shown. Specifically, the terminal device includes a memory and a processor. The memory is used to store one or more computer instructions; the processor, coupled to the memory, is used to execute the at least one or more computer instructions (such as computer instructions for implementing data storage logic) to implement Figure 5 It should be noted that the terminal device includes the steps or functions of the data processing method shown. Figure 5 In addition to the components shown, it also includes Figure 5 Components such as physical network cards and virtual network cards not shown.

[0110] Another embodiment of the present application provides a computer program product (no corresponding figure is shown in the drawings of the specification). The computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is enabled to implement the steps of the roaming processing method provided in the above embodiments.

[0111] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the steps or functions in the roaming processing method provided in the above embodiments can be implemented.

[0112] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method, characterized in that: include: The domain name server addresses corresponding to the physical network card and the virtual network card in the terminal are configured as the same false address, and the route corresponding to the false address is set to point to the virtual network card, so that after the terminal accesses the virtual private network, all domain name resolution requests initiated by the terminal are directed to the virtual network card of the terminal for issuance; intercepting the domain name resolution request sent by the virtual network card; According to the preset correspondence relationship information between the false address and at least one domain name server address, a domain name server address is selected from the at least one domain name server address as the target domain name server address; wherein the target domain name server address is selected from the at least one domain name server address according to the priority order of the at least one domain name server after determining the at least one domain name server address preset for the false address and the priority order of the at least one domain name server address according to the correspondence relationship information; Sending the domain name resolution request to a domain name server corresponding to the target domain name server address; Among them, at least part of the at least one domain name server address is an intranet domain name server address; if the at least one domain name server address also includes a public domain name server address, the priority of the intranet domain name server address is higher than the priority of the public domain name server address.

2. The method according to claim 1, characterized in that Setting the route corresponding to the false address to point to the virtual network card includes: Setting a designated route for the false address; wherein the designated route is used to direct a domain name resolution request whose destination address is the false address to the virtual network card; When the terminal accesses a virtual private network, the designated route is added to a routing table of the terminal.

3. The method according to claim 2, characterized in that The correspondence information includes a correspondence between the false address and at least one domain name server address, and a priority of the at least one domain name server address; And, according to the preset correspondence relationship information between the false address and the domain name resolution server address, selecting a domain name server address from the at least one domain name server address as the target domain name server address, including: Based on the corresponding relationship, determining at least one domain name server address corresponding to the false address; According to the priority, a domain name server address is selected from the at least one domain name server address as the target domain name server address.

4. The method according to claim 3, characterized in that According to the priority, selecting a domain name server address from the at least one domain name server address as a target domain name server address includes: According to the priority, a domain name server address with the highest priority is selected from the at least one domain name server address as the target domain name server address.

5. The method according to claim 3, characterized in that: Also includes: Detecting whether a domain name resolution response fed back by a domain name server corresponding to the target domain name server address is received within a set time; If the domain name resolution response is not received, return to the step of selecting a domain name server address from the at least one domain name server address as the target domain name server address according to the priority; if the domain name resolution response is received, send the domain name resolution response to the terminal.

6. The method according to any one of claims 1 to 5, characterized in that The virtual network card of the terminal will encapsulate the domain name resolution request before sending it out.

7. A data processing method, characterized in that: include: Establish a network connection with a virtual private network; According to the parameters configured by the proxy device for itself, the domain name resolution request initiated by itself is directed to the virtual network card in itself; wherein the parameters include the same false address configured for the domain name server address corresponding to the physical network card and the virtual network, and the route corresponding to the false address points to the virtual network card; The domain name resolution request is sent through the virtual network card so that the proxy device intercepts the domain name resolution request, determines at least one domain name server address preset for the false address and a priority order of the at least one domain name server address, selects a domain name server address from the at least one domain name server address as a target domain name server address according to the priority order of the at least one domain name server, and sends the domain name resolution request to a domain name server corresponding to the target domain name server address; Among them, at least part of the at least one domain name server address is an intranet domain name server address; if the at least one domain name server address also includes a public domain name server address, the priority of the intranet domain name server address is higher than the priority of the public domain name server address.

8. The method according to claim 7, characterized in that Sending the domain name resolution request through the virtual network card includes: The domain name resolution request is encapsulated and processed by the virtual network card and then sent out.

9. The method according to claim 7, characterized in that: The proxy device is a virtual private network client.

10. A data processing system, characterized in that: include: The proxy device is used to configure the domain name server addresses corresponding to the physical network card and the virtual network card in the terminal to be the same false address, and set the route corresponding to the false address to point to the virtual network card, so that after the terminal device accesses the virtual private network, the domain name resolution request initiated by the terminal device is directed to the virtual network card of the terminal device for issuance; intercept the domain name resolution request issued by the virtual network card; Determine a priority order of at least one domain name server address preset for the false address and the at least one domain name server address, and select a domain name server address from the at least one domain name server address as a target domain name server address according to the priority order of the at least one domain name server; The domain name resolution request is sent to a domain name server corresponding to the target domain name server address; wherein at least part of the at least one domain name server address is an intranet domain name server address; if the at least one domain name server address also includes a public network domain name server address, the priority of the intranet domain name server address is higher than the priority of the public network domain name server address The terminal device is used to establish a network connection with a virtual private network; according to the false address and its corresponding route configured by the proxy device for itself, the domain name resolution request initiated by itself is directed to the virtual network card in itself for issuance.

11. The system according to claim 10, characterized in that The proxy device is a virtual private network client.

12. A proxy device, characterized in that: include: A memory and a processor, wherein The memory is used to store one or more computer programs; The processor, coupled to the memory, is configured to execute the one or more computer programs stored in the memory, so as to implement the steps in the method according to any one of claims 1 to 6.

13. A terminal device, characterized in that: include: Virtual network card, memory and processor, wherein: The memory is used to store one or more computer programs; The processor, coupled to the memory, is configured to execute the one or more computer programs stored in the memory to implement the steps in the method of any one of claims 7 to 9.