Cross-local area network communication method, system and device, host, proxy node, storage medium and program product
By deploying containers on the host and proxy nodes and utilizing a transparent proxy mechanism, cross-LAN communication is achieved in application scenarios where there is no access to the gateway device. This solves the problem of cross-LAN communication without a gateway device and provides an efficient and seamless communication solution.
Patent Information
- Application Number
- CN202511542628.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2025-12-30
AI Technical Summary
In application scenarios where there is no access to the gateway device, existing technologies cannot enable cross-LAN communication.
By deploying application containers and sidecar containers on the host and setting up proxy containers on the proxy nodes, cross-LAN communication is achieved by using a transparent proxy mechanism to intercept and build requests.
It enables cross-LAN communication without the need for gateway devices, supports complex mesh communication scenarios, reduces implementation difficulty and risk, and achieves lightweight, seamless integration and efficient data communication.
Smart Images

Figure CN121239747A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a cross-local area network communication method, system, device, host, proxy node, storage medium and program product. Background Technology
[0002] During the delivery of market-oriented projects, customers typically have multiple isolated local area networks (LANs), creating a need for communication between electronic devices across these LANs. These LANs can also be referred to as network partitions, network zones, or clouds.
[0003] To address this, existing solutions utilize gateway devices to enable cross-LAN communication. However, many customers have high security requirements and are not permitted to access gateway devices, meaning these solutions are unsuitable for application scenarios where access to the gateway device is restricted. Summary of the Invention
[0004] This invention provides a method, system, device, host, proxy node, storage medium, and program product for cross-LAN communication, which solves the problem of being unable to perform cross-LAN communication in application scenarios where there is no access to the gateway device.
[0005] According to one aspect of the present invention, a cross-local area network communication method is provided. This method is applied to a sidecar container, which is deployed on a first host. The first host also deploys a source application container. The first host is connected to a first local area network (LAN), and a first proxy node is also connected within the LAN. A first proxy container is deployed on the first proxy node. The method includes:
[0006] Intercept the first request sent by the source application container;
[0007] In response to the first request, for the target application container to which the first request is to be received, the application container information of the target application container and the target local area network information of the second local area network where the target application container is located are determined, and a second request is constructed based on the first request, the application container information and the target local area network information.
[0008] The second request is forwarded to the first proxy container so that the first proxy container responds to the received second request and determines the second proxy container to which the second request is to be forwarded, so that the first request corresponding to the received second request is forwarded to the target application container at least through the second proxy container.
[0009] According to another aspect of the present invention, a cross-local area network communication method is provided. This method is applied to a first proxy container, which is deployed on a first proxy node. The first proxy node is connected to a first local area network (LAN). A first host is also connected within the LAN. A source application container and a sidecar container are deployed on the first host. The method includes:
[0010] Receive a second request forwarded by the sidecar container, wherein the second request is constructed by the sidecar container based on the first request, application container information and target local area network information. The first request is a request sent by the source application container and intercepted by the sidecar container. The application container information is the information of the target application container to receive the first request, and the target local area network information is the information of the second local area network where the target application container is located.
[0011] Determine the second proxy container to which the second request is to be forwarded, and forward the second request to the second proxy container, so that at least through the second proxy container, the first request corresponding to the received second request is forwarded to the target application container.
[0012] According to another aspect of the present invention, a cross-local area network (LAN) communication method is provided. This method is applied to a second proxy container, which is deployed on a second proxy node connected to a third LAN. A first proxy container, communicatively connected to the second proxy container, is deployed on a first proxy node connected to a first LAN. A first host is also connected within the first LAN, and a source application container and a sidecar container are deployed on the first host. The method includes:
[0013] Receive a second request forwarded by the first proxy container, wherein the second request is a request forwarded by the sidecar container to the first proxy container, and the second request is a request constructed by the sidecar container based on the first request, application container information and target local area network information. The first request is a request sent by the source application container and intercepted by the sidecar container. The application container information is the information of the target application container to receive the first request, and the target local area network information is the information of the second local area network where the target application container is located.
[0014] Forward the first request corresponding to the second request to the target application container.
[0015] According to another aspect of the present invention, a cross-local area network communication system is provided, which may include: a first host and a first proxy node connected to a first local area network, a second host connected to a second local area network and a second proxy node connected to a third local area network, wherein a source application container and a sidecar container are deployed on the first host, a first proxy container is deployed on the first proxy node, a target application container is deployed on the second host, and a second proxy container is deployed on the second proxy node.
[0016] Among them, the sidecar container can be used to intercept the first request issued by the source application container and respond to the first request. For the target application container that is about to receive the first request, it determines the application container information of the target application container and the target local area network information of the second local area network, and constructs a second request based on the first request, the application container information and the target local area network information, and forwards the second request to the first proxy container.
[0017] The first proxy container can be used to respond to the received second request, determine the second proxy container to which the second request should be forwarded, and forward the second request to the second proxy container;
[0018] The second proxy container can be used to forward the first request corresponding to the received second request to the target application container.
[0019] According to another aspect of the present invention, a first host is provided, which is connected to a first local area network (LAN). The first host is equipped with a sidecar container and a source application container. A first proxy node is also connected within the first LAN, and a first proxy container is deployed on the first proxy node. When the sidecar container is run, it can implement the cross-LAN communication method provided in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a first proxy node is provided, on which a first proxy container is deployed. The first proxy node is connected to a first local area network (LAN), and a first host is also connected within the LAN. The first host is equipped with a source application container and a sidecar container. When the first proxy container is run, it can implement the cross-LAN communication method provided in any embodiment of the present invention.
[0021] According to another aspect of the present invention, a second proxy node is provided, on which a second proxy container is deployed. The second proxy node is connected to a third local area network (LAN). A first proxy container, which is communicatively connected to the second proxy container, is deployed on the first proxy node. The first proxy node is connected to a first LAN. A first host is also connected within the first LAN. A source application container and a sidecar container are deployed on the first host. When the second proxy container is run, it can implement the cross-LAN communication method provided in any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon for causing a processor to execute and implement the cross-local area network communication method provided in any embodiment of the present invention.
[0023] According to another aspect of the present invention, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements the cross-local area network communication method provided in any embodiment of the present invention.
[0024] The technical solution of this invention achieves cross-LAN communication by setting up an application container and a sidecar container on a first host and a first proxy container on a first proxy node, and then through the cooperation between the application container, the sidecar container and the first proxy container. In particular, it achieves cross-LAN communication without the need for a gateway device, thereby enabling cross-LAN communication in application scenarios without gateway device operation permissions.
[0025] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of a cross-local area network communication method provided according to an embodiment of the present invention;
[0028] Figure 2 This is a flowchart of another cross-local area network communication method provided by an embodiment of the present invention;
[0029] Figure 3 This is a flowchart of another cross-local area network communication method provided by an embodiment of the present invention;
[0030] Figure 4a This is a schematic diagram of an optional example of another cross-local area network communication method provided according to an embodiment of the present invention;
[0031] Figure 4b This is a timing diagram of an optional example of another cross-local area network communication method provided according to an embodiment of the present invention;
[0032] Figure 5 This is a structural block diagram of a cross-local area network communication system provided according to an embodiment of the present invention;
[0033] Figure 6 This is a structural block diagram of a cross-local area network communication device according to an embodiment of the present invention;
[0034] Figure 7 This is a structural block diagram of another cross-local area network communication device provided according to an embodiment of the present invention;
[0035] Figure 8 This is a structural block diagram of another cross-local area network communication device provided according to an embodiment of the present invention;
[0036] Figure 9 This is a schematic diagram of the structure of a first host, a first proxy node, or a second proxy node that implements the cross-local area network communication method of this invention. Detailed Implementation
[0037] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain user personal information security and network security.
[0040] Figure 1 This is a flowchart illustrating a cross-LAN communication method provided in an embodiment of the present invention. This embodiment is applicable to cross-LAN communication scenarios, particularly those requiring no gateway device. The method can be executed by a sidecar container provided in this embodiment, which can be implemented in software and / or hardware. The sidecar container can be deployed on a first host, which can be a terminal device or a server.
[0041] Based on this, it should be noted that a source application container is also deployed on the first host. This source application container can be understood as a container that provides microservices, especially a container that provides microservices and requests the target application container. These microservices can be user services, order services, or payment services, etc., which are related to the actual situation and are not specifically limited here.
[0042] The first host is connected to the first local area network (LAN), and a first agent node is also connected within the first LAN. That is, the first host and the first agent node share the same LAN. The first agent node can be a terminal device or a server, especially a server. A first agent container is deployed on the first agent node.
[0043] The meaning of the target application container is similar to that of the source application container, and will not be repeated here. The microservices provided by the target application container can be the same as or different from those provided by the source application container, depending on the specific circumstances, and no specific limitations are made here. The target application container is deployed on a second host, which is connected to a second local area network (LAN). This second LAN is different from the first LAN; therefore, the communication process between the source application container and the target application container is cross-LAN communication.
[0044] See Figure 1 The method of this invention specifically includes the following steps:
[0045] S110, Intercept the first request issued by the source application container.
[0046] The first request can be understood as a request issued by the source application container to the target application container. The first request is intercepted (or hijacked) by the sidecar container. For example, the sidecar container can intercept the first request based on a transparent proxy mechanism. More generally, it can intercept the outgoing traffic of the source application container based on a transparent proxy mechanism. Whether it intercepts the incoming traffic of the source application container is optional and can be configured according to actual needs; no specific limitations are made here.
[0047] S120. In response to the first request, for the target application container to which the first request is to be received, determine the application container information of the target application container and the target local area network information of the second local area network where the target application container is located, and construct a second request based on the first request, the application container information and the target local area network information.
[0048] In this embodiment, since the first request is a request for the target application container, the target application container is the container that will receive the first request. Application container information can be understood as information about the target application container. In this embodiment, optionally, this information may be a port and / or Internet Protocol (IP) address, etc., which can be set according to actual needs and is not specifically limited here. The target application container is located within a second local area network (LAN), which can be determined by the sidecar container based on the application container information and predefined LAN partitioning rules. Target LAN information can be understood as information about the second LAN. In this embodiment, optionally, this information may include LAN name and / or LAN code, etc., information that can uniquely identify the second LAN, which can be set according to actual needs and is not specifically limited here.
[0049] In response to the first request, the application container information and the target local area network (LAN) information are determined. For example, to determine the target LAN information, a pre-built LAN encoding table can be obtained. This table records multiple first mapping relationships, each representing a mapping between a LAN name and its encoding. Then, for the second LAN where the target application container resides, a first target relationship matching the LAN name of the second LAN is determined from the multiple first mapping relationships. The LAN encoding in the first target relationship is then used as the target LAN information for the second LAN. For example, the English names of each LAN can be sorted alphabetically to create a LAN encoding table, with the first LAN name assigned the encoding "0", and so on, as shown in Table 1. Since the LAN name in the first target relationship matches the LAN name of the second LAN, the LAN encoding in the first target relationship can be used as the target LAN information, achieving a fast and accurate determination of the target LAN information.
[0050] Table 1 Local Area Network Coding Table
[0051]
[0052] Furthermore, a second request is constructed based on the first request, application container information, and target local area network information. In particular, the second request can be constructed based on at least a portion of the content of the first request (e.g., the data portion), application container information, and target local area network information. The second request can also be regarded as a data packet, especially a data packet that satisfies the network communication protocol described in the example below.
[0053] For example, for a predefined network communication protocol, the communication format of the network communication protocol is obtained; based on the communication format, the first request, application container information, and target LAN information are assembled to construct the second request. This example introduces a custom network communication protocol. By defining a dedicated communication format (such as communication rules and data formats), specific communication needs can be met, achieving more efficient cross-LAN communication. For example, the communication format of the custom network communication protocol (i.e., the proxy protocol) is shown in Table 2. The LAN encoding value ranges from 0 to 255, supporting a maximum of 256 LANs; the port value ranges from 0 to 65535; the IP address type is 0 or 1, where 0 represents an IPv4 address and 1 represents an IPv6 address; the IP address occupies 4 bytes if the IP address type is 0, otherwise it occupies 16 bytes; the data is the data portion of the first request.
[0054] Table 2 Proxy Protocol
[0055]
[0056] S130. The second request is forwarded to the first proxy container so that the first proxy container responds to the received second request and determines the second proxy container to which the second request is to be forwarded, so that the first request corresponding to the received second request is forwarded to the target application container at least through the second proxy container.
[0057] In this process, the sidecar container forwards the second request to the first proxy container within its current local area network (LAN). The first proxy container then responds to the received second request, determines the second proxy container to which the second request should be forwarded, and finally, at least through the second proxy container, forwards the first request corresponding to the received second request to the target application container. It should be noted that the second proxy container may be within the second LAN, in which case the first proxy container can forward the second request to it, and the second proxy container will then forward the first request corresponding to the received second request to the target application container located within the second LAN. Alternatively, the second proxy container may be within a LAN other than the second LAN (e.g., a third LAN), in which case the first proxy container can forward the second request to it, and the second proxy container will continue to forward the received second request until it is forwarded to a third proxy container within the second LAN, where the third proxy container will then forward the corresponding first request to the target application container for response.
[0058] The technical solution of this invention achieves cross-LAN communication by setting up an application container and a sidecar container on a first host and a first proxy container on a first proxy node, and then through the cooperation between the application container, the sidecar container and the first proxy container. In particular, it achieves cross-LAN communication without the need for a gateway device, thereby enabling cross-LAN communication in application scenarios without gateway device operation permissions.
[0059] Based on this, the advantages of the various technical solutions described in the embodiments of the present invention are summarized as follows:
[0060] 1. It is entirely based on software, such as using the IP address and / or custom network communication protocol described above for communication, without the need for gateway devices, thus better supporting complex mesh communication scenarios;
[0061] 2. By intercepting traffic through a transparent proxy mechanism, no code-level modifications to the application layer are required, resulting in minimal intrusion into existing applications and achieving seamless integration at the application layer.
[0062] 3. By using container networking technology, the proxy function is limited to a specific application (i.e., the application represented by the target application container described above), the scope of influence is controllable, the implementation difficulty and risk are reduced, and a lighter communication process is achieved.
[0063] 4. It does not require the local area network to be directly connected to the Internet, meaning that cross-LAN communication can be achieved even when the local area network is not directly connected to the Internet, thereby reducing the difficulty of implementation;
[0064] 5. No middleware or data storage is introduced, and data communication is real-time and efficient.
[0065] Figure 2 This is a flowchart of another cross-LAN communication method provided by an embodiment of the present invention. This embodiment is applicable to cross-LAN communication, especially to cross-LAN communication without the need for a gateway device. The method can be executed by a first proxy container provided by this embodiment. The first proxy container can be implemented in software and / or hardware and can be deployed on a first proxy node, which can be a terminal device or a server, particularly a server. Based on this, the first proxy node is connected to a first LAN, and a first host is also connected within the first LAN. The first host deploys a source application container and a sidecar container. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0066] See Figure 2 The method in this embodiment may specifically include the following steps:
[0067] S210. Receive the second request forwarded by the sidecar container, wherein the second request is constructed by the sidecar container based on the first request, application container information and target local area network information. The first request is a request sent by the source application container and intercepted by the sidecar container. The application container information is the information of the target application container to receive the first request. The target local area network information is the information of the second local area network where the target application container is located.
[0068] S220. Determine the second proxy container to which the second request is to be forwarded, and forward the second request to the second proxy container, so that at least through the second proxy container, the first request corresponding to the received second request is forwarded to the target application container.
[0069] Since the second request needs to be forwarded to the target application container through the second proxy container, the second proxy container can be determined based on the target application container's target local area network information. In other words, the first proxy container can extract the target local area network information from the second request and then determine the second proxy container based on the target local area network information.
[0070] Optionally, a pre-configured local area network (LAN) routing table can be obtained, wherein the LAN routing table records multiple second mapping relationships, which represent the mapping relationship between LAN information and proxy container information; then, in response to the existence of a second target relationship that matches the target LAN information in the multiple second mapping relationships, the proxy container represented by the proxy container information in the second target relationship is used as the second proxy container to which the second request is to be forwarded.
[0071] The local area network (LAN) routing table is pre-configured. For example, taking the second mapping relationship where LAN information is represented by LAN name and proxy container information by IP address, the network topology configuration can be obtained. This network topology configuration can be represented based on the following format: LAN name of LAN a [IP of proxy container of LAN a: port of proxy container of LAN a] - LAN name of LAN b [IP of proxy container of LAN b: port of proxy container of LAN b], for example, in example c below: routes:
[0072] - "a[127.0.0.1:19011]-b[127.0.0.2:19011]"
[0073] - "b[127.0.0.2:19011]-c[127.0.0.3:19011]"
[0074] - …
[0075] Based on this, a local area network routing table as shown in Table 3 can be constructed. The first column can represent the name of the target local area network to which the final jump is made, and the second column can represent the IP address of the proxy container to which the next hop is made in order to jump from the current local area network (i.e., the local area network where you are currently located) to the target local area network.
[0076] Table 3 Local Area Network Routing Table
[0077]
[0078] If a second target relationship exists among multiple second mapping relationships that matches the target LAN information (i.e., the LAN information in the second target relationship matches the target LAN information), the proxy container represented by the proxy container information in the second target relationship can be used as the second proxy container. Optionally, if no second target relationship exists among multiple second mapping relationships, the shortest path algorithm (e.g., Dijkstra's algorithm) can be used based on the network topology configuration to determine the shortest path from the current LAN (i.e., the first LAN) to the target LAN (i.e., the second LAN), and then the second proxy container can be determined based on the shortest path. Optionally, the LAN name of the second LAN and the IP address of the second proxy container can be added as a second mapping relationship to Table 3 for subsequent application. Alternatively, if the target LAN cannot be reached from the current LAN, i.e., the shortest path cannot be determined, the second request can be rejected.
[0079] The technical solution of this invention achieves cross-LAN communication by setting up an application container and a sidecar container on a first host and a first proxy container on a first proxy node, and then through the cooperation between the application container, the sidecar container and the first proxy container. In particular, it achieves cross-LAN communication without the need for a gateway device, thereby enabling cross-LAN communication in application scenarios without gateway device operation permissions.
[0080] Figure 3This is a flowchart illustrating another cross-LAN communication method provided by an embodiment of the present invention. This embodiment is applicable to cross-LAN communication, particularly to cross-LAN communication without the need for a gateway device. The method can be executed by a second proxy container provided by this embodiment. This second proxy container can be implemented in software and / or hardware and can be deployed on a second proxy node, which can be a terminal device or a server, particularly a server. Based on this, a first proxy container, communicatively connected to the second proxy container, is deployed on a first proxy node. The first proxy node is connected to a first LAN, which also connects to a first host. The first host deploys a source application container and a sidecar container. Furthermore, the second proxy node is connected to a third LAN, which is a LAN other than the first LAN; that is, it can be the same as or different from the second LAN, without specific limitations. The explanations of terms identical or corresponding to those in the above embodiments are not repeated here.
[0081] See Figure 3 The method in this embodiment may specifically include the following steps:
[0082] S310. Receive a second request forwarded by the first proxy container, wherein the second request is a request forwarded by the sidecar container to the first proxy container, and the second request is a request constructed by the sidecar container based on the first request, application container information and target LAN information. The first request is a request sent by the source application container and intercepted by the sidecar container. The application container information is the information of the target application container to receive the first request, and the target LAN information is the information of the second LAN where the target application container is located.
[0083] S320: Forward the first request corresponding to the second request to the target application container.
[0084] As explained above, the second proxy container may or may not be a proxy container within the second local area network. Depending on the situation, the first request can be forwarded to the target application container in a corresponding manner.
[0085] Therefore, target LAN information can be extracted from the second request. Then, based on the matching between the target LAN information and the third LAN, the first request is forwarded to the target application container. This matching can indicate whether the second proxy container is a proxy container within the second LAN. For example, if the target LAN information matches the third LAN, indicating that the second proxy container is within the second LAN, the second proxy container can directly forward the first request to the target application container located on the same LAN as itself. As another example, if the target LAN information does not match the third LAN, indicating that the second proxy container is not within the second LAN, the second proxy container can determine the third proxy container to which the second request should be forwarded (this determination process is similar to the determination process of the second proxy container itself), and then forward the second request to the third proxy container. This ensures that, at least through the third proxy container, the first request corresponding to the received second request is forwarded to the target application container. This implementation process is similar to the above and will not be repeated here.
[0086] Based on this, optionally, according to the example above, if the second request is assembled based on a custom network communication protocol communication format 1, that is, the communication format 1 of the second request is no longer the same as the communication format 2 of the first request, then the second request can be converted based on the communication format 1 to obtain the first request under the communication format 2, that is, to obtain the first request that can be understood by the target application container, and then the first request is forwarded to the target application container for response.
[0087] The technical solution of this invention sets up an application container and a sidecar container on a first host, sets up a first proxy container on a first proxy node, and sets up a second proxy container on a second proxy node. Then, through the cooperation between the application container, the sidecar container, the first proxy container, and the second proxy container, cross-LAN communication is achieved. In particular, cross-LAN communication is achieved without the need for a gateway device, thereby enabling cross-LAN communication in application scenarios where there is no access to a gateway device.
[0088] Based on this, in order to better understand the various technical solutions described above as a whole, the following examples illustrate them. For examples, see [link to example]. Figure 4a and Figure 4bIn the diagram, LAN A corresponds to the first LAN described above, LAN B corresponds to the third LAN described above, and LAN C corresponds to the second LAN described above; host 1 corresponds to the first host described above, and host 3 corresponds to the second host described above; the application container deployed on host 1 corresponds to the source application container described above, and the application container deployed on host 3 corresponds to the target application container described above; proxy node A corresponds to the first proxy node described above, proxy node B corresponds to the third proxy node described above, and proxy node C corresponds to the second proxy node described above. Based on this, the specific implementation process is as follows:
[0089] Container startup process:
[0090] First, a sidecar container (shown in the diagram) is started. This sidecar container uses the Linux system's tproxy for transparent proxying, intercepting the outbound traffic of the source application container and directing it to the sidecar container. When the source application container starts, it uses the `join` command to join the local network A where the sidecar container resides, sharing the same network. The sidecar container does not intercept inbound traffic.
[0091] For any proxy container (i.e., the proxy container in the diagram), upon startup, it sorts the English names of the local area network (LAN) alphabetically and creates a LAN encoding table. The first character in the sorted table has an encoding of 0, and so on, supporting a maximum of 256 characters. The proxy container can also initialize a LAN routing table, used to look up the next hop when forwarding requests.
[0092] Based on this, the traffic forwarding process (i.e., the request forwarding process) is as follows:
[0093] Starting up a sidecar container and using transparent proxies:
[0094] A sidecar container is automatically deployed before or after the application container starts. This sidecar container uses the tproxy mechanism to implement transparent proxying, which can seamlessly intercept traffic entering and leaving the application container and redirect it to the sidecar container for processing.
[0095] Identification of the target local area network and packet construction:
[0096] After the sidecar container receives the traffic (i.e. the first request), it calculates the target local area network (i.e. the second local area network described above) where the target application container is located based on the IP address and the predefined local area network division rules.
[0097] Construct a proxy protocol packet (i.e., the second request) containing the IP address, port, and target LAN information, and forward it to the proxy container on proxy node A in the current LAN (i.e., LAN A) for further processing.
[0098] Route lookup and request forwarding:
[0099] After receiving the second request, the proxy container looks up the next-hop IP address in its local area network routing table based on the target local area network information.
[0100] If there is no matching record in the routing table (i.e., the second target relationship described above), the proxy container will use the shortest path algorithm to calculate the shortest path from the current LAN to the target LAN based on the network topology configuration.
[0101] If the target LAN cannot be reached, the second request is rejected; if a reachable path exists, the next-hop information (i.e., the next-hop IP address) is added to the LAN routing table, and the second request is forwarded to the next hop.
[0102] For the second request within the current local area network, the proxy container performs a conversion from the proxy protocol to the Transmission Control Protocol (TCP) and sends the converted TCP request (i.e., the first request) to the target machine (i.e., the host where the target application container is deployed).
[0103] This completes cross-LAN communication.
[0104] Figure 5 This is a structural block diagram of a cross-LAN communication system provided in an embodiment of the present invention. This embodiment is applicable to cross-LAN communication, especially to cross-LAN communication without the need for a gateway device. This cross-LAN communication system belongs to the same inventive concept as the cross-LAN communication methods in the above embodiments. Details not described in detail in the embodiments of this cross-LAN communication system can be found in the embodiments of the above cross-LAN communication methods.
[0105] See Figure 5 The cross-LAN communication system described in this embodiment of the invention includes a first host 410 and a first proxy node 420 connected to a first LAN, a second host 440 connected to a second LAN, and a second proxy node 430 connected to a third LAN. An active application container 4101 and a sidecar container 4102 are deployed on the first host 410. A first proxy container 4201 is deployed on the first proxy node 420. A target application container 4401 is deployed on the second host 440, and a second proxy container 4301 is deployed on the second proxy node 430.
[0106] Sidecar container 4102 can be used to intercept the first request issued by the source application container 4101 and respond to the first request. For the target application container 4401 that is about to receive the first request, it determines the application container information of the target application container 4401 and the target local area network information of the second local area network. Based on the first request, the application container information and the target local area network information, it constructs a second request and forwards the second request to the first proxy container 4201.
[0107] The first proxy container 4201 can be used to respond to the received second request, determine the second proxy container 4301 to which the second request should be forwarded, and forward the second request to the second proxy container 4301;
[0108] The second proxy container 4301 is used to forward the first request corresponding to the received second request to the target application container 4401.
[0109] Optionally, for the construction process of the second request, the sidecar container 4102 is specifically used for:
[0110] For a predefined network communication protocol, obtain the communication format of the network communication protocol;
[0111] Based on the communication format, the first request, application container information, and target local area network information are assembled to construct the second request.
[0112] Based on this, optionally, in the process of determining the target local area network information, the sidecar container 4102 is specifically used for:
[0113] Obtain a pre-built local area network (LAN) encoding table, which records multiple first mapping relationships. Each first mapping relationship represents the mapping relationship between the LAN name and the LAN encoding.
[0114] For the second local area network where the target application container 4401 is located, a first target relationship matching the local area network name of the second local area network is determined from multiple first mapping relationships, and the local area network code in the first target relationship is used as the target local area network information of the second local area network.
[0115] Based on any of the above systems, optionally, the application container information includes a port and / or an Internet Protocol address; and / or, the first request is intercepted based on a transparent proxy mechanism.
[0116] Optionally, regarding the determination process of the second proxy container 4301, the first proxy container 4201 is specifically used for:
[0117] Extract the target local area network information from the second request;
[0118] Based on the target local area network information, the second proxy container 4301 to which the second request is to be forwarded is determined.
[0119] Based on this, optionally, regarding the determination process of the second proxy container 4301, the first proxy container 4201 is further specifically used for:
[0120] Obtain the pre-configured local area network routing table, which records multiple second mapping relationships. The second mapping relationship represents the mapping relationship between local area network information and proxy container information.
[0121] In response to the existence of a second target relationship that matches the target LAN information in multiple second mapping relationships, the proxy container represented by the proxy container information in the second target relationship is used as the second proxy container 4301 to which the second request is to be forwarded.
[0122] Based on this, optionally, regarding the determination process of the second proxy container 4301, the first proxy container 4201 is further specifically used for:
[0123] In response to the absence of a second target relationship among multiple second mapping relationships, determine the shortest path from the first local area network to the second local area network;
[0124] Based on the shortest path, determine the second proxy container 4301 to which the second request should be forwarded.
[0125] Optional, the second proxy container 4301 is specifically used for:
[0126] Extract the target local area network information from the second request;
[0127] Based on the matching between the target LAN information and the third LAN, the first request corresponding to the second request is forwarded to the target application container 4401.
[0128] Based on this, optionally, for the forwarding process of the first request, the second proxy container 4301 is further specifically used for:
[0129] In response to a match between the target LAN information and the third LAN, the first request corresponding to the second request is forwarded to the target application container 4401; and / or,
[0130] In response to the mismatch between the target LAN information and the third LAN, the third proxy container to which the second request is to be forwarded is determined, and the second request is forwarded to the third proxy container, so that at least through the third proxy container, the first request corresponding to the received second request is forwarded to the target application container 4401.
[0131] Optionally, the second request is a request constructed by the sidecar container 4102 based on the communication format, assembling the first request, application container information and target local area network information. The first request corresponding to the second request is obtained by converting the second request through the communication format, which is a predefined network communication protocol format.
[0132] The cross-LAN communication system provided in this invention achieves cross-LAN communication through the cooperation of its various components, especially without the need for a gateway device. This enables cross-LAN communication in application scenarios where there is no access to a gateway device.
[0133] The cross-LAN communication system provided in the embodiments of the present invention can execute the cross-LAN communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0134] It is worth noting that in the above embodiments of the cross-LAN communication system, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0135] Figure 6 This is a structural block diagram of a cross-LAN communication device provided in an embodiment of the present invention. This device is used to execute the cross-LAN communication method provided in any of the above embodiments. This device and the cross-LAN communication methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the cross-LAN communication device can be found in the embodiments of the above-described cross-LAN communication methods. See also... Figure 6 The device can be configured on a sidecar container, which is deployed on a first host. The first host also deploys a source application container. The first host is connected to a first local area network (LAN), and a first proxy node is also connected within the LAN. A first proxy container is deployed on the first proxy node. Specifically, the device may include: a first request interception module 510, a second request construction module 520, and a first forwarding module 530.
[0136] The first request interception module 510 is used to intercept the first request sent by the source application container.
[0137] The second request construction module 520 is used to respond to the first request, for the target application container to receive the first request, determine the application container information of the target application container and the target local area network information of the second local area network where the target application container is located, and construct the second request based on the first request, the application container information and the target local area network information.
[0138] The first forwarding module 530 is used to forward the second request to the first proxy container so that the first proxy container responds to the received second request, determines the second proxy container to which the second request is to be forwarded, and forwards the first request corresponding to the received second request to the target application container through at least the second proxy container.
[0139] Optionally, the second request building module 520 may include:
[0140] The communication format acquisition unit is used to acquire the communication format of a predefined network communication protocol.
[0141] The second request construction unit is used to assemble the first request, application container information, and target local area network information based on the communication format to construct the second request.
[0142] Optionally, the aforementioned cross-local area network communication device may further include:
[0143] The LAN encoding table acquisition module is used to acquire a pre-built LAN encoding table, wherein the LAN encoding table records multiple first mapping relationships, and the first mapping relationship represents the mapping relationship between the LAN name and the LAN encoding.
[0144] The second request construction module 520 may include:
[0145] The target LAN information obtaining unit is used to determine, from multiple first mapping relationships, a first target relationship that matches the LAN name of the second LAN where the target application container is located, and use the LAN code in the first target relationship as the target LAN information of the second LAN.
[0146] Optionally, based on any of the above cross-LAN communication devices, the application container information includes the port and / or Internet Protocol address; the first request is intercepted based on a transparent proxy mechanism.
[0147] The cross-LAN communication device provided in this embodiment of the invention enables cross-LAN communication in application scenarios where there is no access to a gateway device through the cooperation of its various modules.
[0148] The cross-LAN communication device provided in the embodiments of the present invention can execute the cross-LAN communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0149] It is worth noting that in the embodiments of the above-mentioned cross-local area network communication device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0150] Figure 7 This is a structural block diagram of another cross-LAN communication device provided in an embodiment of the present invention. This device is used to execute the cross-LAN communication method provided in any of the above embodiments. This device belongs to the same inventive concept as the cross-LAN communication methods of the above embodiments. Details not described in detail in the embodiments of the cross-LAN communication device can be found in the embodiments of the above-described cross-LAN communication methods. See also... Figure 7 The device can be configured in a first proxy container, which is deployed on a first proxy node. The first proxy node is connected to a first local area network (LAN). A first host is also connected to the first LAN. The first host has a source application container and a sidecar container deployed on it. The device may include a first receiving module 610 and a second forwarding module 620.
[0151] The first receiving module 610 is used to receive the second request forwarded by the sidecar container. The second request is constructed by the sidecar container based on the first request, application container information and target local area network information. The first request is a request sent by the source application container and intercepted by the sidecar container. The application container information is the information of the target application container to receive the first request. The target local area network information is the information of the second local area network where the target application container is located.
[0152] The second forwarding module 620 is used to determine the second proxy container to which the second request is to be forwarded, and to forward the second request to the second proxy container, so as to forward the first request corresponding to the received second request to the target application container through at least the second proxy container.
[0153] Optionally, the second forwarding module 620 may include:
[0154] The first submodule for extracting target local area network information is used to extract target local area network information from the second request;
[0155] The second proxy container determination submodule is used to determine the second proxy container to which the second request should be forwarded, based on the target local area network information.
[0156] Optionally, the aforementioned cross-local area network communication device may further include:
[0157] The LAN routing table acquisition module is used to acquire a pre-configured LAN routing table, which records multiple second mapping relationships. The second mapping relationship represents the mapping relationship between LAN information and proxy container information.
[0158] The second proxy container determination submodule may include:
[0159] The second proxy container receiving unit is used to respond to the existence of a second target relationship that matches the target local area network information in multiple second mapping relationships, and to use the proxy container represented by the proxy container information in the second target relationship as the second proxy container to which the second request is to be forwarded.
[0160] In addition, the optional second proxy container determination submodule may also include:
[0161] The shortest path determination unit is used to determine the shortest path from the first local area network to the second local area network in response to the absence of a second target relationship among multiple second mapping relationships;
[0162] The second proxy container determination unit is used to determine the second proxy container to which the second request should be forwarded based on the shortest path.
[0163] The cross-LAN communication device provided in this embodiment of the invention enables cross-LAN communication in application scenarios where there is no access to a gateway device through the cooperation of its various modules.
[0164] The cross-LAN communication device provided in the embodiments of the present invention can execute the cross-LAN communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0165] It is worth noting that in the embodiments of the above-mentioned cross-local area network communication device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0166] Figure 8 This is a structural block diagram of another cross-LAN communication device provided in an embodiment of the present invention. This device is used to execute the cross-LAN communication method provided in any of the above embodiments. This device belongs to the same inventive concept as the cross-LAN communication methods of the above embodiments. Details not described in detail in the embodiments of the cross-LAN communication device can be found in the embodiments of the above-described cross-LAN communication methods. See also... Figure 8The device can be configured in a second proxy container, which is deployed on a second proxy node. The second proxy node is connected to a third local area network. A first proxy container that communicates with the second proxy container is deployed on the first proxy node. The first proxy node is connected to a first local area network. A first host is also connected to the first local area network. The first host has a source application container and a sidecar container deployed on it. Specifically, the device may include a second receiving module 710 and a third forwarding module 720.
[0167] The second receiving module 710 is used to receive a second request forwarded by the first proxy container. The second request is a request forwarded by the sidecar container to the first proxy container. The second request is a request constructed by the sidecar container based on the first request, application container information and target local area network information. The first request is a request sent by the source application container and intercepted by the sidecar container. The application container information is the information of the target application container to receive the first request. The target local area network information is the information of the second local area network where the target application container is located.
[0168] The third forwarding module 720 is used to forward the first request corresponding to the second request to the target application container.
[0169] Optionally, the third forwarding module 720 may include:
[0170] The second submodule for extracting target local area network information is used to extract target local area network information from the second request;
[0171] The first request forwarding submodule is used to forward the first request corresponding to the second request to the target application container based on the matching between the target local area network information and the third local area network.
[0172] Based on this, the optional first request forwarding submodule may include:
[0173] The first forwarding unit is configured to, in response to a match between the target local area network information and the third local area network, forward the first request corresponding to the second request to the target application container; and / or,
[0174] The second forwarding unit is used to determine the third proxy container to which the second request should be forwarded in response to a mismatch between the target local area network information and the third local area network, and to forward the second request to the third proxy container so that the first request corresponding to the received second request can be forwarded to the target application container at least through the third proxy container.
[0175] Optionally, the second request is a request constructed by the sidecar container based on the communication format, assembling the first request, application container information, and target LAN information. The first request corresponding to the second request is obtained by converting the second request through the communication format, which is a predefined network communication protocol format.
[0176] The cross-LAN communication device provided in this embodiment of the invention enables cross-LAN communication in application scenarios where there is no access to a gateway device through the cooperation of its various modules.
[0177] The cross-LAN communication device provided in the embodiments of the present invention can execute the cross-LAN communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0178] It is worth noting that in the embodiments of the above-mentioned cross-local area network communication device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0179] Figure 9 A schematic diagram of a first host, first proxy node, or second proxy node (collectively referred to below as electronic devices) 10, which can be used to implement embodiments of the present invention, is shown. Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0180] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0181] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0182] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as cross-local area network communication methods.
[0183] In some embodiments, the cross-LAN communication method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the cross-LAN communication method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the cross-LAN communication method by any other suitable means (e.g., by means of firmware).
[0184] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips or system-on-a-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0185] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0186] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0187] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0188] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0189] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0190] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0191] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0192] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method of communicating across a local area network, characterized by, The application is applied to a sidecar container deployed on a first host, wherein a source application container is also deployed on the first host, the first host is connected to a first local area network, a first proxy node is also connected in the first local area network, a first proxy container is deployed on the first proxy node, and the method comprises the following steps: intercepting a first request sent by the source application container; in response to the first request, determining application container information of a target application container to be received and target local area network information of a second local area network where the target application container is located, and constructing a second request according to the first request, the application container information and the target local area network information; forwarding the second request to the first proxy container, so that the first proxy container determines a second proxy container to which the second request is to be forwarded, and forwards the first request corresponding to the received second request to the target application container through at least the second proxy container.
2. The method of claim 1, wherein, According to the first request, the application container information and the target local area network information, a second request is constructed, which comprises the following steps: for a pre-defined network communication protocol, obtaining a communication format of the network communication protocol; based on the communication format, assembling the first request, the application container information and the target local area network information to construct a second request.
3. The method of claim 1, wherein, The method further comprises the following steps: obtaining a pre-constructed local area network coding table, wherein a plurality of first mapping relationships are recorded in the local area network coding table, and the first mapping relationship represents the mapping relationship between the local area network name and the local area network code; the determination of the target local area network information of the second local area network where the target application container is located comprises the following steps: for the second local area network where the target application container is located, determining a first target relationship matching the local area network name of the second local area network from a plurality of first mapping relationships, and taking the local area network code in the first target relationship as the target local area network information of the second local area network.
4. The method according to any one of claims 1 to 3, characterized in that, The application container information includes port and / or Internet protocol address; and the first request is intercepted based on a transparent proxy mechanism.
5. A method of communicating across a local area network, characterized by, The application is applied to a first proxy container deployed on a first proxy node, wherein the first proxy node is connected to a first local area network, a first host is also connected in the first local area network, a source application container and a sidecar container are deployed on the first host, and the method comprises the following steps: receiving a second request forwarded by the sidecar container, wherein the second request is constructed by the sidecar container according to a first request, application container information and target local area network information, the first request is a request intercepted by the sidecar container after being sent by the source application container, the application container information is information of a target application container to be received, and the target local area network information is information of a second local area network where the target application container is located; determine a second proxy container to which the second request is to be forwarded, and forward the second request to the second proxy container, so as to forward, by at least the second proxy container, the first request corresponding to the received second request to the target application container.
6. The method of claim 5, wherein, The determining the second proxy container to which the second request is to be forwarded comprises: extracting the target local area network information from the second request; determining the second proxy container to which the second request is to be forwarded according to the target local area network information.
7. The method of claim 6, wherein, The method further comprises: obtaining a pre-configured local area network routing table, wherein the local area network routing table records a plurality of second mapping relationships, and the second mapping relationship represents a mapping relationship between local area network information and proxy container information; The determining the second proxy container to which the second request is to be forwarded according to the target local area network information comprises: in response to the existence of a second target relationship matching the target local area network information in the plurality of second mapping relationships, taking a proxy container represented by proxy container information in the second target relationship as the second proxy container to which the second request is to be forwarded.
8. The method of claim 7, wherein, The determining the second proxy container to which the second request is to be forwarded according to the target local area network information further comprises: in response to the non-existence of the second target relationship in the plurality of second mapping relationships, determining a shortest path from the first local area network to the second local area network; determining the second proxy container to which the second request is to be forwarded according to the shortest path.
9. A method of communicating across a local area network, characterized by, application in a second proxy container, the second proxy container is deployed on a second proxy node, the second proxy node is connected to a third local area network, a first proxy container in communication connection with the second proxy container is deployed on a first proxy node, the first proxy node is connected to a first local area network, a first host connected in the first local area network further has a source application container and a sidecar container deployed thereon, and the method comprises: receiving a second request forwarded by the first proxy container, wherein the second request is a request forwarded by the sidecar container to the first proxy container, the second request is a request constructed by the sidecar container according to a first request, application container information and target local area network information, the first request is a request intercepted by the sidecar container after being issued by the source application container, the application container information is information of a target application container to be received by the first request, and the target local area network information is information of a second local area network in which the target application container is located; forwarding the first request corresponding to the second request to the target application container.
10. The method of claim 9, wherein, The forwarding the first request corresponding to the second request to the target application container comprises: extracting the target local area network information from the second request; forwarding the first request corresponding to the second request to the target application container according to matching between the target local area network information and the third local area network.
11. The method of claim 10, wherein, The forwarding the first request corresponding to the second request to the target application container according to matching between the target local area network information and the third local area network comprises: forward the first request corresponding to the second request to the target application container in response to the target local area network information matching the third local area network; and / or determine a third proxy container to which the second request is to be forwarded in response to the target local area network information not matching the third local area network, and forward the second request to the third proxy container, so as to forward the first request corresponding to the received second request to the target application container through at least the third proxy container.
12. The method of claim 11, wherein, The second request is a request built by the sidecar container based on a communication format, the first request corresponding to the second request being obtained by converting the second request through the communication format, and the communication format being a format of a pre-defined network communication protocol.
13. A cross-local area network communication system, characterized by The first host is connected to a first local area network, and the first proxy node is connected to the first host. The second host is connected to a second local area network. The second proxy node is connected to the third local area network. The source application container and the sidecar container are deployed on the first host. The first proxy container is deployed on the first proxy node. The target application container is deployed on the second host. The second proxy container is deployed on the second proxy node. The sidecar container is configured to intercept a first request sent by the source application container, and in response to the first request, determine application container information of a target application container and target local area network information of a second local area network in which the target application container is located, and build a second request according to the first request, the application container information, and the target local area network information, and forward the second request to the first proxy container. The first proxy container is configured to determine the second proxy container to which the second request is to be forwarded in response to the received second request, and forward the second request to the second proxy container. The second proxy container is configured to forward the first request corresponding to the received second request to the target application container.
14. A communication device across a local area network, characterized by The sidecar container is deployed on the first host, and the source application container is also deployed on the first host. The first host is connected to the first local area network, and the first proxy node is also connected in the first local area network. The first proxy node is connected to the first host, and the first proxy container is deployed on the first proxy node. The device comprises: A first request interception module is configured to intercept a first request sent by the source application container. A second request building module is configured to, in response to the first request, determine application container information of a target application container and target local area network information of a second local area network in which the target application container is located, and build a second request according to the first request, the application container information, and the target local area network information. The first forwarding module is configured to forward the second request to the first proxy container, so that the first proxy container, in response to the received second request, determines a second proxy container to which the second request is to be forwarded, and forwards the first request corresponding to the received second request to the target application container through at least the second proxy container.
15. A communication device across a local area network, characterized by The first proxy container is deployed on a first proxy node, the first proxy node is connected to a first local area network, and a first host connected in the first local area network has a source application container and a sidecar container deployed thereon. The first receiving module is configured to receive a second request forwarded by the sidecar container, wherein the second request is constructed by the sidecar container according to a first request, application container information, and target local area network information, the first request is a request intercepted by the sidecar container after being sent by the source application container, the application container information is information of a target application container to be received by the first request, and the target local area network information is information of a second local area network in which the target application container is located. The second forwarding module is configured to determine a second proxy container to which the second request is to be forwarded, and forward the second request to the second proxy container, so that the first request corresponding to the received second request is forwarded to the target application container through at least the second proxy container.
16. A communication device across a local area network, characterized by The second proxy container is deployed on a second proxy node, the second proxy node is connected to a third local area network, and the first proxy container in communication connection with the second proxy container is deployed on a first proxy node, the first proxy node is connected to a first local area network, and a first host connected in the first local area network has a source application container and a sidecar container deployed thereon. The second receiving module is configured to receive a second request forwarded by the first proxy container, wherein the second request is a request forwarded by the sidecar container to the first proxy container, and the second request is a request constructed by the sidecar container according to a first request, application container information, and target local area network information, the first request is a request intercepted by the sidecar container after being sent by the source application container, the application container information is information of a target application container to be received by the first request, and the target local area network information is information of a second local area network in which the target application container is located. The third forwarding module is configured to forward the first request corresponding to the second request to the target application container.
17. A first host, wherein the first host comprises: comprises: at least one processor; and a memory in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the cross-local area network communication method according to any one of claims 1-4.
18. A first agent node, comprising: comprises: at least one processor; and a memory in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the cross-local area network communication method according to any one of claims 1-4. The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the cross-local area network communication method according to any one of claims 5-8.
19. A second agent node, comprising: Comprise: at least one processor; and a memory in communication with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the cross-local area network communication method according to any one of claims 9-12.
20. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling a processor to implement, when executed, the cross-local area network communication method according to any one of claims 1-4, or the cross-local area network communication method according to any one of claims 5-8, or the cross-local area network communication method according to any one of claims 9-12.
21. A computer program product, characterised in that, The computer program product comprises a computer program for enabling a processor to implement, when executed, the cross-local area network communication method according to any one of claims 1-4, or the cross-local area network communication method according to any one of claims 5-8, or the cross-local area network communication method according to any one of claims 9-12.