CN111262958A - Internal and external website interaction method, device, equipment and computer readable storage medium - Google Patents

Internal and external website interaction method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111262958A
CN111262958A CN202010029184.XA CN202010029184A CN111262958A CN 111262958 A CN111262958 A CN 111262958A CN 202010029184 A CN202010029184 A CN 202010029184A CN 111262958 A CN111262958 A CN 111262958A
Authority
CN
China
Prior art keywords
ipv6 address
client
address
receiving
sending
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.)
Granted
Application number
CN202010029184.XA
Other languages
Chinese (zh)
Other versions
CN111262958B (en
Inventor
方鹏斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202010029184.XA priority Critical patent/CN111262958B/en
Publication of CN111262958A publication Critical patent/CN111262958A/en
Application granted granted Critical
Publication of CN111262958B publication Critical patent/CN111262958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/251Translation of Internet protocol [IP] addresses between different IP versions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • H04L61/2528Translation at a proxy

Landscapes

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

Abstract

The invention relates to the technical field of computers, and discloses an internal and external website interaction method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving an ipv6 address acquisition request sent by a client, and sending an ipv6 address acquisition request to a DNS server; if the ipv6 address fed back by the DNS server is not received, sending an ipv4 address acquisition request to the DNS server; receiving an ipv4 address fed back by the DNS, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client; receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client. The invention reduces the cost of the intranet ipv6 address upgrading stage.

Description

Internal and external website interaction method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for interaction between an internal website and an external website.
Background
With the rapid development of Internet technology, ipv4(Internet Protocol Version 4, fourth edition of Internet Protocol) addresses are consumed quickly, and because ipv4 addresses are about to be exhausted, ipv6(Internet Protocol Version 6, ipv6 is the next generation IP Protocol designed by IETF (Internet Engineering Task Force) and used for replacing the existing Version IP Protocol (ipv 4)) addresses is imperative.
The push of the ipv6 address needs to perform internal ipv6 address upgrade, during the process of internal ipv6 address upgrade and modification, the problem that an external network ipv4 address cannot be accessed occurs, in order to avoid the problem that the internal ipv6 address upgrade cannot access the external network ipv4 address, transition of an internal ipv6 address upgrade stage is realized, currently, NAT64(NAT64 is a stateful network address and protocol conversion technology, NAT64 can realize network address and protocol conversion of ipv6 and ipv4 under different network protocols) gateway devices and DNS64(DNS64 mainly cooperates with NAT64 to work, mainly synthesizes an a record ipv4 address in address query information into an AAAA record ipv6 address, returns the synthesized AAAA record user to an ipv6 side user) device, and jointly deploys a gateway 64 device and a DNS64 device, which results in high hardware cost, complex network topology, complex deployment, and great difficulty in operation and maintenance.
Disclosure of Invention
The invention mainly aims to provide an internal and external website interaction method, device, equipment and computer readable storage medium, and aims to solve the technical problems of high hardware cost, complex network topology, complex deployment operation and high operation and maintenance difficulty when the current intranet ipv6 address is upgraded.
In order to achieve the above object, the present invention provides an internal and external website interaction method, which is applied to a proxy server, and comprises the following steps:
receiving an ipv6 address acquisition request sent by a client, and sending an ipv6 address acquisition request to a DNS server;
if the ipv6 address fed back by the DNS server is not received, sending an ipv4 address acquisition request to the DNS server;
receiving an ipv4 address fed back by the DNS, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client;
receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client.
In an embodiment, the step of receiving an ipv6 address obtaining request sent by a client and sending the ipv6 address obtaining request to a DNS server includes:
receiving an address translation rule configuration request and outputting a configuration window of address translation;
and receiving a DNS64 conversion rule and a NAT64 conversion rule in the configuration window, and storing the DNS64 conversion rule and the NAT64 conversion rule.
In an embodiment, the step of receiving the ipv4 address fed back by the DNS server, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client includes:
receiving an ipv4 address fed back by the DNS server, and converting the ipv4 address according to a preset DNS64 conversion rule to obtain an ipv6 address;
and sending the converted ipv6 address to the client.
In an embodiment, the step of receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client includes:
receiving an access request initiated by the client to the ipv6 address, analyzing the ipv6 address, and judging whether the ipv6 address contains a preset prefix;
if the ipv6 address contains a preset prefix, processing the ipv6 address according to a preset NAT64 conversion rule, deleting the preset prefix in the ipv6 address, and obtaining an ipv4 address;
initiating an access request to a web server corresponding to the ipv4 address;
and receiving an access result fed back by the web server corresponding to the ipv4 address, and returning the access result to the client.
In an embodiment, after the step of receiving an ipv6 address obtaining request sent by a client and sending the ipv6 address obtaining request to a DNS server, the method includes:
if the ipv6 address fed back by the DNS server is received, sending the ipv6 address to the client;
the step of receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client includes:
receiving an access request initiated by the client to the ipv6 address, analyzing the ipv6 address, and judging whether the ipv6 address contains a preset prefix;
if the ipv6 address does not contain the preset prefix, initiating an access request to a web server corresponding to the ipv6 address, obtaining an access result, and sending the access result to the client.
In an embodiment, the step of receiving an ipv6 address obtaining request sent by a client and sending the ipv6 address obtaining request to a DNS server includes:
receiving an ipv6 address acquisition request sent by a client, and judging whether the current internet ipv6 is in an upgrading stage;
if the current process is in an upgrading stage of processing intranet ipv6, converting the ipv6 address acquisition request into an ipv4 address acquisition request, and executing the step of sending the ipv4 address acquisition request to the DNS server;
and if the current state is not in the process of upgrading the intranet ipv6, sending the ipv6 address acquisition request to a DNS server.
In an embodiment, the step of receiving an ipv6 address obtaining request sent by a client and sending the ipv6 address obtaining request to a DNS server includes:
receiving an ipv6 address acquisition request sent by a client, and judging whether the current mode is a double-address acquisition mode;
if the current mode is in a double-address acquisition mode, generating an ipv4 address acquisition request, and sending the ipv6 address acquisition request and the ipv4 address acquisition request to a DNS (domain name system) server at the same time;
and if the current mode is not in the double-address acquisition mode, sending the ipv6 address acquisition request to a DNS server.
In addition, to achieve the above object, the present invention further provides an internal and external website interaction apparatus, including:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for receiving an ipv6 address acquisition request sent by a client and sending the ipv6 address acquisition request to a DNS (domain name server);
a second sending module, configured to send an ipv4 address obtaining request to the DNS server if the ipv6 address fed back by the DNS server is not received;
the conversion sending module is used for receiving the ipv4 address fed back by the DNS server, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client;
and the receiving and returning module is used for receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result and returning the access result to the client.
In addition, to achieve the above object, the present invention further provides an internal and external website interaction device, including: the system comprises a memory, a processor and an internal and external website interaction program which is stored on the memory and can run on the processor, wherein the internal and external website interaction program realizes the steps of the internal and external website interaction method when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, in which an internal and external website interaction program is stored, and when being executed by a processor, the internal and external website interaction program implements the steps of the internal and external website interaction method described above.
The invention provides an internal and external website interaction method, device, equipment and a computer readable storage medium. In the embodiment, a proxy server is deployed in advance, the proxy server receives an ipv6 address acquisition request sent by a client, and the proxy server sends the ipv6 address acquisition request to a DNS server; if the ipv6 address fed back by the DNS server is not received, sending an ipv4 address acquisition request to the DNS server; receiving an ipv4 address fed back by the DNS, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client; receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client. In this embodiment, only the proxy server is deployed, the proxy server implements the processing of the address acquisition request and the address conversion, and the joint deployment of the NAT64 gateway device and the DNS64 device is not required, so that the hardware cost is reduced, the network topology structure is simplified, the deployment and deployment operations are simpler, and the operation and maintenance difficulty is effectively reduced.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first exemplary method of interacting between internal and external websites according to the present invention;
FIG. 3 is a flowchart illustrating a second exemplary method for interacting between internal and external websites according to the present invention;
fig. 4 is a functional module diagram of an embodiment of the internal and external website interaction apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention. The internal and external website interaction equipment (called proxy server) in the embodiment of the invention can be a PC or a server.
As shown in fig. 1, the internal and external website interaction device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include an operating system, a network communication module, a user interface module, and a computer program for interaction with internal and external websites.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a computer program for internal and external website interaction stored in the memory 1005 and perform operations in the internal and external website interaction method described below.
Based on the hardware structure, the embodiment of the internal and external website interaction method is provided.
The first embodiment of the internal and external website interaction method of the invention comprises the following steps:
receiving an ipv6 address acquisition request sent by a client, and sending an ipv6 address acquisition request to a DNS server;
if the ipv6 address fed back by the DNS server is not received, sending an ipv4 address acquisition request to the DNS server;
receiving an ipv4 address fed back by the DNS, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client;
receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client.
In this embodiment, the internal and external website interaction method is applied to a proxy server, and in this embodiment, a proxy platform is set up in advance in the proxy server, specifically, the method includes:
step a1, receiving address conversion rule configuration request, outputting address conversion configuration window;
step a2, receiving the DNS64 conversion rule and the NAT64 conversion rule in the configuration window, and storing the DNS64 conversion rule and the NAT64 conversion rule.
Namely, a DNS64 conversion rule and a NAT64 conversion rule are predefined in the proxy server, wherein the NAT64 conversion rule has a stateful network address and protocol conversion rule, and the NAT64 can implement ipv6 and ipv4 network address and protocol conversion under different network protocols; the DNS64 conversion rule is matched with NAT64 to work, mainly synthesizes A record ipv4 address in the address query information into AAAA record ipv6 address, and returns the synthesized AAAA record user to ipv6 side user; specifically, a developer triggers an address translation rule configuration request, a proxy server receives the address translation rule configuration request, and the proxy server outputs an address translation configuration window; the method comprises the steps that a developer inputs a DNS64 conversion rule and a NAT64 conversion rule in a configuration window, a proxy server receives the DNS64 conversion rule and the NAT64 conversion rule input by the developer in the configuration window, and the proxy server stores the DNS64 conversion rule and the NAT64 conversion rule so that the proxy server processes an address acquisition request according to the stored DNS64 conversion rule and the NAT64 conversion rule.
In this embodiment, a DNS64 translation rule and a NAT64 translation rule are predefined in a proxy server, so that a DNS64 device and a NAT64 device are combined into one through a deployed proxy server, so that network address translation can be implemented only by deploying one device, hardware cost is reduced, a network topology structure is simplified, deployment and deployment operations are simpler, and meanwhile, operation and maintenance difficulty is effectively reduced, specifically:
referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of an internal and external website interaction method according to the present invention, where the internal and external website interaction method includes:
step S10, receiving an ipv6 address acquisition request sent by the client, and sending the ipv6 address acquisition request to the DNS server.
The internal and external website interaction method in the embodiment is applied to the proxy server, the proxy server is a hardware carrier of the proxy platform, and the proxy platform in the embodiment is used as an intermediate platform to be in butt joint with an enterprise intranet and an external network.
The proxy server receives an ipv6 address acquisition request sent by a client, and sends an ipv6 address acquisition request to a DNS server (the DNS server is an abbreviation of a computer Domain Name System (or Domain Name service)), and the DNS server is composed of a Domain Name resolver and a Domain Name server.
After receiving the ipv6 address acquisition request, the DNS server queries whether a DNS64 address exists, if so, feeds back the ipv6 address to the proxy server, and if not, feeds back a null value to the proxy server.
Step S20, if the ipv6 address fed back by the DNS server is not received, send an ipv4 address acquisition request to the DNS server.
The proxy server receives feedback information of the DNS server, if the feedback information is a null value, the proxy server judges that the ipv6 address fed back by the DNS server is not received, and the proxy server sends an ipv4 address acquisition request to the DNS server so that the ipv4 address fed back by the DNS server is obtained.
In this embodiment, when the proxy server determines that the ipv6 address is not received, the proxy server sends an ipv4 address acquisition request to the DNS server, so that the ipv4 address fed back by the DNS server, that is, the DNS server receives the ipv4 address acquisition request sent by the proxy server, and the DNS server sends an ipv4 address to the proxy server according to the ipv4 address acquisition request.
Step S30, receiving the ipv4 address fed back by the DNS server, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client.
The method includes that the proxy server receives an ipv4 address fed back by the DNS server, and the proxy server converts an ipv4 address into an ipv6 address, and specifically includes:
step b1, receiving an ipv4 address fed back by the DNS server, and converting the ipv4 address according to a preset DNS64 conversion rule to obtain an ipv6 address;
step b2, sending the converted ipv6 address to the client.
Namely, the proxy server receives an ipv4 address fed back by the DNS server, the proxy server converts the ipv4 address according to a preset DNS64 conversion rule to obtain an ipv6 address, that is, the proxy server adds a fixed 96-bit prefix to the ipv4 address to convert the ipv4 address into an ipv6 address, and the proxy server feeds back the ipv6 address to the client, so that the client performs network access according to the ipv6 address.
Step S40, receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client.
In this embodiment, the method for receiving an access request initiated by a client to an ipv6 address by a proxy server, where the proxy server initiates the access request according to the ipv6 address, obtains an access result, and returns the access result to the client includes:
step c1, receiving an access request initiated by the client to the ipv6 address, analyzing the ipv6 address, and judging whether the ipv6 address contains a preset prefix;
step c2, if the ipv6 address contains a preset prefix, processing the ipv6 address according to a preset NAT64 conversion rule, deleting the preset prefix in the ipv6 address, and obtaining an ipv4 address;
step c3, an access request is sent to the web server corresponding to the ipv4 address;
and c4, receiving an access result fed back by the web server corresponding to the ipv4 address, and returning the access result to the client.
That is, in this embodiment, the proxy server receives an access request initiated by the client to the ipv6 address, and the server parses the ipv6 address, and determines whether the ipv6 address contains a preset prefix (the preset prefix is a prefix that is preset to be added to the ipv4 address according to the DNS64 conversion rule); if the ipv6 address contains the preset prefix, the proxy server judges that the ipv6 address is obtained by converting the ipv4 address according to the DNS64 conversion rule, at this time, the proxy server performs reverse processing, that is, the proxy server processes the ipv6 address according to the preset NAT64 conversion rule, deletes the preset prefix in the ipv6 address, and obtains the ipv4 address.
The proxy server initiates an access request to a web server corresponding to the ipv4 address; the proxy server receives the access result fed back by the web server corresponding to the ipv4 address, and returns the access result to the client according to the original link.
In this embodiment, only the proxy server is deployed, the proxy server implements the processing of the address acquisition request and the address conversion, and the joint deployment of the NAT64 gateway device and the DNS64 device is not required, so that the hardware cost is reduced, the network topology structure is simplified, the deployment and deployment operations are simpler, and the operation and maintenance difficulty is effectively reduced
Further, referring to fig. 3, a second embodiment of the internal and external website interaction method of the present invention is provided based on the first embodiment of the internal and external website interaction method of the present invention.
The present embodiment differs from the first embodiment in steps subsequent to step S10 in that:
step S50, if the ipv6 address fed back by the DNS server is received, sending the ipv6 address to the client.
The proxy server receives the ipv6 address fed back by the DNS server, and the proxy server sends the ipv6 address to the client so that the client can make an access request to the ipv6 address.
The method comprises the steps that the proxy server receives an access request initiated by the client to the ipv6 address, the proxy server initiates the access request according to the ipv6 address, obtains an access result and returns the access result to the client, and the method comprises the following steps:
step S41, receiving an access request initiated by the client to the ipv6 address, analyzing the ipv6 address, and judging whether the ipv6 address contains a preset prefix;
step S42, if the ipv6 address does not contain the preset prefix, initiating an access request to the web server corresponding to the ipv6 address, obtaining an access result, and sending the access result to the client.
That is, the proxy server receives an access request initiated by a client to an ipv6 address, the proxy server analyzes the ipv6 address, and the proxy server determines whether the ipv6 address contains a preset prefix (the preset prefix is a prefix preset to be added to the ipv4 address according to a DNS64 conversion rule); if the ipv6 address does not contain the preset prefix, the proxy server judges that the ipv6 address is the ipv6 address returned by the DNS server, and the proxy server initiates an access request to the web server corresponding to the ipv6 address, obtains an access result, and sends the access result to the client.
In this embodiment, the proxy server determines that the ipv6 address is the ipv6 address fed back by the DNS server by parsing the ipv6 address, and the proxy server can directly perform network access, so that the network access is more convenient.
Further, based on the above-mentioned embodiment of the internal and external website interaction method of the present invention, a third embodiment of the internal and external website interaction method of the present invention is provided.
This embodiment is a refinement of step S10 in the first embodiment, and is different from the above embodiments in that:
receiving an ipv6 address acquisition request sent by a client, and judging whether the current internet ipv6 is in an upgrading stage;
if the current process is in an upgrading stage of processing intranet ipv6, converting the ipv6 address acquisition request into an ipv4 address acquisition request, and executing the step of sending the ipv4 address acquisition request to the DNS server;
and if the current state is not in the process of upgrading the intranet ipv6, sending the ipv6 address acquisition request to a DNS server.
That is, in this embodiment, the proxy server receives an ipv6 address acquisition request sent by the client, and the proxy server determines whether the current proxy server is in an intranet ipv6 upgrading stage; the proxy server judges that the internet ipv6 upgrading stage is processed currently, converts the ipv6 address acquisition request into an ipv4 address acquisition request, and executes the first embodiment: the step of sending an ipv4 address acquisition request to the DNS server; receiving an ipv4 address fed back by the DNS, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client; receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client.
The proxy server judges that the upgrading stage of the intranet ipv6 is not processed currently, and the proxy server judges that the ipv6 address acquisition request is sent to the DNS server, so that the DNS server feeds back the ipv6 address, and the DNS server can quickly feed back the ipv6 address.
In this embodiment, the proxy server determines that the ipv6 cannot be used in the upgrading stage of the intranet ipv6, and at this time, the proxy server directly sends an ipv4 address acquisition request to the DNS server, so that the DNS server feeds back an ipv4 address, and the sending operation of the address acquisition request is reduced.
Further, based on the above-mentioned embodiment of the internal and external website interaction method of the present invention, a fourth embodiment of the internal and external website interaction method of the present invention is provided.
This embodiment is a refinement of step S10 in the first embodiment, and is different from the above embodiments in that:
receiving an ipv6 address acquisition request sent by a client, and judging whether the current mode is a double-address acquisition mode;
if the current mode is in a double-address acquisition mode, generating an ipv4 address acquisition request, and sending the ipv6 address acquisition request and the ipv4 address acquisition request to a DNS (domain name system) server at the same time;
and if the current mode is not in the double-address acquisition mode, sending the ipv6 address acquisition request to a DNS server.
That is, in this embodiment, the proxy server receives an ipv6 address acquisition request sent by the client, and the proxy server determines whether the current mode is a dual address acquisition mode; the proxy server judges that the current mode is in a double-address acquisition mode, generates an ipv4 address acquisition request, and simultaneously sends the ipv6 address acquisition request and the ipv4 address acquisition request to the DNS server; if the current mode is not in the double-address acquisition mode, the proxy server sends an ipv6 address acquisition request to the DNS server so that the DNS server feeds back an ipv6 address.
In this embodiment, the proxy server sets a dual-address acquisition mode, the dual-address acquisition mode can simultaneously send an ipv6 address acquisition request and an ipv4 address acquisition request to the DNS server, and the proxy server performs fast processing according to information fed back by the DNS server first, thereby improving the processing efficiency of the address acquisition request.
Referring to fig. 4, the present invention further provides an internal and external website interaction apparatus, including:
the first sending module 10 is configured to receive an ipv6 address acquisition request sent by a client, and send the ipv6 address acquisition request to a DNS server;
a second sending module 20, configured to send an ipv4 address obtaining request to the DNS server if the ipv6 address fed back by the DNS server is not received;
the conversion sending module 30 is configured to receive an ipv4 address fed back by the DNS server, convert the ipv4 address into an ipv6 address, and send the converted ipv6 address to the client;
and the receiving and returning module 40 is configured to receive an access request initiated by the client to the ipv6 address, initiate the access request according to the ipv6 address, obtain an access result, and return the access result to the client.
In an embodiment, the internal and external website interaction apparatus includes:
the output prompting module is used for receiving the address conversion rule configuration request and outputting the configuration window of the address conversion;
and the receiving and storing module is used for receiving the DNS64 conversion rule and the NAT64 conversion rule in the configuration window and storing the DNS64 conversion rule and the NAT64 conversion rule.
In an embodiment, the conversion sending module 30 includes:
the receiving and converting unit is used for receiving the ipv4 address fed back by the DNS server and converting the ipv4 address according to a preset DNS64 conversion rule to obtain an ipv6 address;
an address sending unit, configured to send the converted ipv6 address to the client.
In one embodiment, the receiving return module 40 includes:
a receiving and analyzing unit, configured to receive an access request initiated by the client to the ipv6 address, analyze the ipv6 address, and determine whether the ipv6 address includes a preset prefix;
the deleting and converting unit is used for processing the ipv6 address according to a preset NAT64 conversion rule if the ipv6 address contains a preset prefix, deleting the preset prefix in the ipv6 address, and obtaining an ipv4 address;
a request sending unit, configured to initiate an access request to a web server corresponding to the ipv4 address;
and the receiving and returning unit is used for receiving the access result fed back by the web server corresponding to the ipv4 address and returning the access result to the client.
In an embodiment, the internal and external website interaction apparatus includes:
a receiving and sending module, configured to send the ipv6 address to the client if the ipv6 address fed back by the DNS server is received;
the reception return module 40 includes:
a receiving and analyzing unit, configured to receive an access request initiated by the client to the ipv6 address, analyze the ipv6 address, and determine whether the ipv6 address includes a preset prefix;
and the request initiating unit is used for initiating an access request to a web server corresponding to the ipv6 address if the ipv6 address does not contain a preset prefix, obtaining an access result and sending the access result to the client.
In one embodiment, the first sending module 10 includes:
the first judgment unit is used for receiving an ipv6 address acquisition request sent by a client and judging whether the current client is in an intranet ipv6 upgrading stage;
a request conversion unit, configured to, if the current process is at an intranet ipv6 upgrade stage, convert the ipv6 address acquisition request into an ipv4 address acquisition request, and execute the step of sending an ipv4 address acquisition request to the DNS server;
and the request sending unit is used for sending the ipv6 address acquisition request to the DNS if the current internet ipv6 upgrading stage is not processed.
In one embodiment, the first sending module 10 includes:
the second judgment unit is used for receiving an ipv6 address acquisition request sent by the client and judging whether the current mode is a double-address acquisition mode;
the device comprises a request generating unit, a DNS server and a DNS processing unit, wherein the request generating unit is used for generating an ipv4 address acquisition request and simultaneously sending the ipv6 address acquisition request and the ipv4 address acquisition request to the DNS server if the device is in a double-address acquisition mode currently;
and the request sending unit is used for sending the ipv6 address acquisition request to the DNS if the DNS is not in the dual-address acquisition mode currently.
The internal and external website interaction device in the embodiment is arranged in the proxy server, the proxy server realizes the processing of the address acquisition request and the address conversion by deploying the proxy server, and the joint deployment of NAT64 gateway equipment and DNS64 equipment is not needed, so that the hardware cost is reduced, the network topology structure is simplified, the deployment and deployment operation is simpler, and the operation and maintenance difficulty is effectively reduced.
The method executed by each program module can refer to each embodiment of the internal and external website interaction method of the present invention, and is not described herein again.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores therein an internal and external website interaction program, and the internal and external website interaction program implements the steps of the internal and external website interaction method as described above when executed by a processor.
The method implemented when the internal and external website interaction program running on the processor is executed may refer to each embodiment of the internal and external website interaction method of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An internal and external website interaction method is characterized in that the internal and external website interaction method is applied to a proxy server, and the internal and external website interaction method comprises the following steps:
receiving an ipv6 address acquisition request sent by a client, and sending an ipv6 address acquisition request to a DNS server;
if the ipv6 address fed back by the DNS server is not received, sending an ipv4 address acquisition request to the DNS server;
receiving an ipv4 address fed back by the DNS, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client;
receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client.
2. The method for interacting between internal and external websites according to claim 1, wherein the step of receiving the ipv6 address acquisition request sent by the client and sending the ipv6 address acquisition request to the DNS server is preceded by the step of:
receiving an address translation rule configuration request and outputting a configuration window of address translation;
and receiving a DNS64 conversion rule and a NAT64 conversion rule in the configuration window, and storing the DNS64 conversion rule and the NAT64 conversion rule.
3. The method for interacting between internal and external websites according to claim 1, wherein the step of receiving the ipv4 address fed back by the DNS server, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client comprises:
receiving an ipv4 address fed back by the DNS server, and converting the ipv4 address according to a preset DNS64 conversion rule to obtain an ipv6 address;
and sending the converted ipv6 address to the client.
4. The method for interacting between internal and external websites of claim 1, wherein the step of receiving the access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client comprises:
receiving an access request initiated by the client to the ipv6 address, analyzing the ipv6 address, and judging whether the ipv6 address contains a preset prefix;
if the ipv6 address contains a preset prefix, processing the ipv6 address according to a preset NAT64 conversion rule, deleting the preset prefix in the ipv6 address, and obtaining an ipv4 address;
initiating an access request to a web server corresponding to the ipv4 address;
and receiving an access result fed back by the web server corresponding to the ipv4 address, and returning the access result to the client.
5. The method for interacting between internal and external websites according to claim 1, wherein the step of receiving the ipv6 address acquisition request sent by the client and sending the ipv6 address acquisition request to the DNS server is followed by:
if the ipv6 address fed back by the DNS server is received, sending the ipv6 address to the client;
the step of receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result, and returning the access result to the client includes:
receiving an access request initiated by the client to the ipv6 address, analyzing the ipv6 address, and judging whether the ipv6 address contains a preset prefix;
if the ipv6 address does not contain the preset prefix, initiating an access request to a web server corresponding to the ipv6 address, obtaining an access result, and sending the access result to the client.
6. The method for interacting internal and external websites according to claim 1, wherein the step of receiving an ipv6 address acquisition request sent by a client and sending the ipv6 address acquisition request to a DNS server comprises:
receiving an ipv6 address acquisition request sent by a client, and judging whether the current internet ipv6 is in an upgrading stage;
if the current process is in an upgrading stage of processing intranet ipv6, converting the ipv6 address acquisition request into an ipv4 address acquisition request, and executing the step of sending the ipv4 address acquisition request to the DNS server;
and if the current state is not in the process of upgrading the intranet ipv6, sending the ipv6 address acquisition request to a DNS server.
7. The method for interacting an internal website and an external website according to any one of claims 1 to 6, wherein the step of receiving an ipv6 address acquisition request sent by a client and sending the ipv6 address acquisition request to a DNS server comprises:
receiving an ipv6 address acquisition request sent by a client, and judging whether the current mode is a double-address acquisition mode;
if the current mode is in a double-address acquisition mode, generating an ipv4 address acquisition request, and sending the ipv6 address acquisition request and the ipv4 address acquisition request to a DNS (domain name system) server at the same time;
and if the current mode is not in the double-address acquisition mode, sending the ipv6 address acquisition request to a DNS server.
8. An internal and external website interaction device, comprising:
the system comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for receiving an ipv6 address acquisition request sent by a client and sending the ipv6 address acquisition request to a DNS (domain name server);
a second sending module, configured to send an ipv4 address obtaining request to the DNS server if the ipv6 address fed back by the DNS server is not received;
the conversion sending module is used for receiving the ipv4 address fed back by the DNS server, converting the ipv4 address into an ipv6 address, and sending the converted ipv6 address to the client;
and the receiving and returning module is used for receiving an access request initiated by the client to the ipv6 address, initiating the access request according to the ipv6 address, obtaining an access result and returning the access result to the client.
9. An internal and external website interaction device, comprising: a memory, a processor and a domestic and foreign web site interaction program stored on the memory and executable on the processor, the domestic and foreign web site interaction program when executed by the processor implementing the steps of the domestic and foreign web site interaction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which an internal and external website interaction program is stored, the internal and external website interaction program, when executed by a processor, implementing the steps of the internal and external website interaction method according to any one of claims 1 to 7.
CN202010029184.XA 2020-01-09 2020-01-09 Internal and external website interaction method, device, equipment and computer readable storage medium Active CN111262958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010029184.XA CN111262958B (en) 2020-01-09 2020-01-09 Internal and external website interaction method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010029184.XA CN111262958B (en) 2020-01-09 2020-01-09 Internal and external website interaction method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111262958A true CN111262958A (en) 2020-06-09
CN111262958B CN111262958B (en) 2023-02-03

Family

ID=70953136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010029184.XA Active CN111262958B (en) 2020-01-09 2020-01-09 Internal and external website interaction method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111262958B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1729673A (en) * 2002-12-20 2006-02-01 皇家飞利浦电子股份有限公司 System and method for establishing communication between a client and a server in a heterogenous IP network
US20070124487A1 (en) * 2005-11-28 2007-05-31 Hitachi Communication Technologies, Ltd. DNS server
CN102739809A (en) * 2011-04-07 2012-10-17 中国电信股份有限公司 DNS64 database, server, system and IPv4/IPv6 communication method
US20130232278A1 (en) * 2012-03-02 2013-09-05 Futurewei Technologies, Inc. IPv4 Data Center Support for IPv4 and IPv6 Visitors
WO2014056441A1 (en) * 2012-10-10 2014-04-17 中国移动通信集团公司 Method and device for configuring ipv6 transition technique on cpe
CN103888554A (en) * 2014-03-24 2014-06-25 广州杰赛科技股份有限公司 IPv4 and IPv6 compatible domain name resolution method and system
US20140258491A1 (en) * 2013-03-11 2014-09-11 Bluebox Security Inc. Methods and apparatus for hostname selective routing in dual-stack hosts
CN106713528A (en) * 2017-03-15 2017-05-24 烽火通信科技股份有限公司 Home gateway and method of IPv6 host to access network server
CN110417932A (en) * 2019-07-30 2019-11-05 睿哲科技股份有限公司 Based on IPv6 exterior chain resource graded device, electronic equipment and computer-readable medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1729673A (en) * 2002-12-20 2006-02-01 皇家飞利浦电子股份有限公司 System and method for establishing communication between a client and a server in a heterogenous IP network
US20070124487A1 (en) * 2005-11-28 2007-05-31 Hitachi Communication Technologies, Ltd. DNS server
CN102739809A (en) * 2011-04-07 2012-10-17 中国电信股份有限公司 DNS64 database, server, system and IPv4/IPv6 communication method
US20130232278A1 (en) * 2012-03-02 2013-09-05 Futurewei Technologies, Inc. IPv4 Data Center Support for IPv4 and IPv6 Visitors
WO2014056441A1 (en) * 2012-10-10 2014-04-17 中国移动通信集团公司 Method and device for configuring ipv6 transition technique on cpe
US20140258491A1 (en) * 2013-03-11 2014-09-11 Bluebox Security Inc. Methods and apparatus for hostname selective routing in dual-stack hosts
CN103888554A (en) * 2014-03-24 2014-06-25 广州杰赛科技股份有限公司 IPv4 and IPv6 compatible domain name resolution method and system
CN106713528A (en) * 2017-03-15 2017-05-24 烽火通信科技股份有限公司 Home gateway and method of IPv6 host to access network server
CN110417932A (en) * 2019-07-30 2019-11-05 睿哲科技股份有限公司 Based on IPv6 exterior chain resource graded device, electronic equipment and computer-readable medium

Also Published As

Publication number Publication date
CN111262958B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US10516611B2 (en) Preferential selection of IP protocol version with domain name matching on proxy servers
JP6912469B2 (en) Access request conversion method and device
US8326955B2 (en) Configuration of user terminal settings in communications system
US7600011B1 (en) Use of a domain name server to direct web communications to an intermediation platform
CN107613037B (en) Domain name redirection method and system
CN102546850B (en) Support the IPv4 content providing of IPv6, device and server
CN102833364A (en) Domain name resolution agent method and gateway device
CN107729014B (en) Page jump method and structure based on Android
WO2020206660A1 (en) Network resource request method and apparatus, electronic device and storage medium
CN112583952B (en) Redirection scheduling processing method, device and system, related equipment and storage medium
CN107124483A (en) Domain name analytic method and server
CN112104640B (en) Data processing method, device and equipment of gateway and readable storage medium
US20100161804A1 (en) System and method for providing device file using device identifier
CN106412000A (en) Domain name query processing method
CN104079682A (en) Address translation method and device based on domain name system (DNS)
CN110677512B (en) Address resolution method and device
CN111262958B (en) Internal and external website interaction method, device, equipment and computer readable storage medium
US9021061B2 (en) Method and apparatus for accommodating overlapping wireless networks
CN113271326B (en) Network protocol address scheduling method and device and electronic equipment
CN113014664A (en) Gateway adaptation method, device, electronic equipment and storage medium
CN112559472A (en) File transmission method and device, computer equipment and storage medium
US9026611B2 (en) DNS name resolution system, override agent, and DNS name resolution method
CN112073548B (en) Method and apparatus for solving skylight problems
WO2009158337A2 (en) Connectivity in a peer network
CN114650271B (en) Global load DNS neighbor site learning method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant