A method, device, equipment and storage medium for deploying a proxy client

By manually deploying the auxiliary client in the intranet environment and automatically installing the script using the predetermined access port to match the operating system type, the security risks of proxy client deployment in the intranet environment are solved, and efficient and secure proxy client automatic deployment is achieved.

CN116545849BActive Publication Date: 2025-09-19CSC FINANCIAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310464004.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-09-19
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

In an intranet environment, the existing technology of sending proxy client installation packages in batches through ports 22 or 445 has a major security risk and cannot effectively achieve automatic deployment of proxy clients.

Method used

By manually deploying auxiliary clients on designated devices in different network segments in the intranet environment, the proxy server determines the designated client in the same network segment as the target device, and passes the operating system type, so that the designated client executes the matching script and sends the installation package using the predetermined access port for automatic installation.

Benefits of technology

On the basis of reducing security risks, it realizes the automatic deployment of proxy clients in the intranet environment, reduces the dependence on ports 22 or 445, improves deployment efficiency and reduces security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116545849B_ABST
    Figure CN116545849B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, apparatus, device and storage medium for deploying a proxy client, and relates to the field of computer technology. The specific implementation scheme is as follows: in response to receiving a deployment instruction for deploying a proxy client for a destination device, an auxiliary client that is deployed on the designated device and is in the same network segment as the destination device is determined from various auxiliary clients as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device; the type of the operating system is passed to the designated client, so that the designated client executes a script that matches the type of the operating system, so that the destination device installs the proxy client; wherein, when the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device installs the installation package. It can be seen that through this scheme, the deployment of the proxy client in the intranet environment can be achieved on the basis of reducing security risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a deployment method, apparatus, device and storage medium for a proxy client. Background Art

[0002] Contactless automatic deployment of applications is a crucial part of the operation and maintenance system. Currently, applications are typically automatically delivered to devices via proxy clients. To achieve this, the automatic deployment of the proxy clients themselves is crucial.

[0003] In related technologies, a proxy server distributes proxy client installation packages in batches to cluster devices where the proxy client is to be deployed via port 22 or 445, and instructs them to launch the installation package to install the proxy client. Due to the high security requirements of intranet environments, if the proxy server opens port 22 or 445 to all devices within the intranet, the security risks will be significant. Therefore, this method is not suitable for intranet environments.

[0004] Therefore, how to realize the deployment of proxy clients in an intranet environment while reducing security risks has become a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The purpose of the embodiments of the present invention is to provide a method, apparatus, device, and storage medium for deploying a proxy client, so as to achieve deployment of the proxy client in an intranet environment while reducing security risks. The specific technical solution is as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for deploying a proxy client, which is applied to a proxy server, wherein the proxy server communicates with various auxiliary clients, each of which is a proxy client manually deployed on a designated device, wherein different auxiliary clients are deployed on different designated devices, and the network addresses of the different designated devices belong to different network segments in an intranet environment. The method includes:

[0007] In response to receiving a deployment instruction from a deployment agent client for a destination device, determining, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device;

[0008] Passing the type of the operating system to the designated client, so that the designated client executes a script matching the type of the operating system, so that the destination device performs installation for the proxy client;

[0009] When the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

[0010] Optionally, the designated client executes a script that matches the type of the operating system, so that the destination device performs installation of the proxy client, including:

[0011] If the operating system is a Windows type, the designated client executes a batch file script to send a first installation package and a first installation instruction of the proxy client to the destination device via a predetermined access port, so that the destination device, in response to receiving the first installation instruction, launches the first installation package after receiving the first installation package to install the proxy client; wherein the first installation package is a Windows type installation package;

[0012] If the operating system is of Linux type, the designated client executes a Java script to send a second installation package and a second installation instruction of the proxy client to the destination device using a predetermined access port, so that the destination device responds to receiving the second installation instruction and, after receiving the second installation package, starts the second installation package to install the proxy client; wherein, the second installation package is a Linux type installation package.

[0013] Optionally, before transmitting the type of the operating system to the designated client, the method further includes:

[0014] Sending a designated detection instruction to the designated client so that the designated client detects whether it is communicating with the destination device;

[0015] If yes, executing the step of transmitting the type of the operating system to the designated client;

[0016] If not, a deployment failure result is fed back to the sender of the deployment instruction.

[0017] Optionally, the method further includes:

[0018] In response to receiving a registration request sent by the destination device, recording the identifier of the destination device in a designated mapping table; wherein the registration request is a request sent by the destination device after successfully installing the installation package.

[0019] Optionally, the method further includes:

[0020] In response to receiving a check instruction from the proxy client for the destination device, querying from the designated mapping table whether there is an identifier of the destination device;

[0021] If so, a successful installation check result is fed back to the sender of the check instruction;

[0022] If it does not exist, a check result indicating installation failure is fed back to the sending end of the check instruction.

[0023] Optionally, the proxy server communicates with each auxiliary client via a custom port number.

[0024] In a second aspect, an embodiment of the present invention provides a proxy client deployment system, comprising a proxy server and an auxiliary client, wherein the proxy server communicates with each auxiliary client, each auxiliary client being a proxy client manually deployed on a designated device, different auxiliary clients being deployed on different designated devices, and the network addresses of the different designated devices being on different network segments within an intranet environment;

[0025] The proxy server is configured to, in response to receiving a deployment instruction for a deployment proxy client for a destination device, determine, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device, as a designated client; and transmit the type of the operating system to the designated client; wherein the deployment instruction carries the type of the operating system of the destination device;

[0026] The auxiliary client is used to execute a script that matches the type of operating system in response to receiving the type of operating system transmitted by the proxy server, so that the destination device installs the proxy client; wherein, when the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device installs the installation package.

[0027] In a third aspect, an embodiment of the present invention provides a proxy client deployment device, which is applied to a proxy server, wherein the proxy server communicates with various auxiliary clients, each of which is a proxy client deployed on a designated device through manual deployment, wherein different auxiliary clients are deployed on different designated devices, and the network addresses of the different designated devices belong to different network segments in an intranet environment. The device includes:

[0028] a determination module configured to, in response to receiving a deployment instruction from a deployment agent client for a destination device, determine, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device, as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device;

[0029] An installation module, configured to transmit the type of the operating system to the designated client, so that the designated client executes a script matching the type of the operating system, so that the destination device performs installation of the proxy client;

[0030] When the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

[0031] Optionally, the designated client executes a script that matches the type of the operating system, so that the destination device performs installation of the proxy client, including:

[0032] If the operating system is a Windows type, the designated client executes a batch file script to send a first installation package and a first installation instruction of the proxy client to the destination device via a predetermined access port, so that the destination device, in response to receiving the first installation instruction, launches the first installation package after receiving the first installation package to install the proxy client; wherein the first installation package is a Windows type installation package;

[0033] If the operating system is of Linux type, the designated client executes a Java script to send a second installation package and a second installation instruction of the proxy client to the destination device using a predetermined access port, so that the destination device responds to receiving the second installation instruction and, after receiving the second installation package, starts the second installation package to install the proxy client; wherein, the second installation package is a Linux type installation package.

[0034] Optionally, the device further comprises:

[0035] a detection module, configured to, before the installation module executes the transmission of the operating system type to the designated client, issue a specified detection instruction to the designated client, so that the designated client detects whether it is communicating with the destination device;

[0036] an execution module, configured to execute the steps of installing the module if yes;

[0037] The first feedback module is configured to, if not, feed back a result of deployment failure to the sending end of the deployment instruction.

[0038] Optionally, the device further comprises:

[0039] The registration module is configured to record the identifier of the destination device into a designated mapping table in response to receiving a registration request sent by the destination device; wherein the registration request is a request sent by the destination device after successfully installing the installation package.

[0040] Optionally, the device further comprises:

[0041] a query module, configured to query whether an identifier of the destination device exists in the designated mapping table in response to receiving a check instruction from the proxy client for the destination device;

[0042] A second feedback module is configured to feed back a successful installation inspection result to the sending end of the inspection instruction, if any;

[0043] The third feedback module is configured to feedback the inspection result of installation failure to the sending end of the inspection instruction if the inspection result does not exist.

[0044] Optionally, the proxy server communicates with each auxiliary client via a custom port number.

[0045] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0046] Memory for storing computer programs;

[0047] The processor is configured to implement any of the above steps of the proxy client deployment method when executing the program stored in the memory.

[0048] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned proxy client deployment methods are implemented.

[0049] Beneficial effects of the embodiments of the present invention:

[0050] The solution provided by an embodiment of the present invention manually deploys a proxy client on a designated device in a different network segment within an intranet environment as an auxiliary client. When a proxy server receives a deployment instruction for a target device, it can determine, from the auxiliary clients deployed on the designated devices in the different network segments, the auxiliary client deployed on a designated device in the same network segment as the target device to be deployed, as the designated client. The designated client is then informed of the operating system type of the target device to be deployed, allowing the designated client to execute a script matching the received operating system type. When the script is executed, it sends an installation package for the proxy client to the target device via a predetermined access port, causing the target device to install the installation package, thereby automatically installing the proxy client on the target device. With this solution, the proxy server does not need to open ports 22 or 445 to each target device. Instead, it simply uses the communication port between the auxiliary client and the proxy server to send the target device's operating system type to the designated client, causing the designated client to execute the script corresponding to the operating system type, completing the installation of the proxy client for the target device. This solution can achieve proxy client deployment within an intranet environment while reducing security risks.

[0051] Of course, it is not necessary to achieve all of the advantages described above simultaneously in order to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0053] Figure 1 A flowchart of a method for deploying a proxy client provided by an embodiment of the present invention;

[0054] Figure 2 Another flow chart of the method for deploying a proxy client provided by an embodiment of the present invention;

[0055] Figure 3 A flowchart of a specific example of a method for deploying a proxy client provided by an embodiment of the present invention;

[0056] Figure 4 A schematic diagram of the structure of a deployment system for a proxy client provided by an embodiment of the present invention;

[0057] Figure 5 A schematic diagram of the structure of a deployment device for a proxy client provided by an embodiment of the present invention;

[0058] Figure 6 A block diagram of an electronic device for implementing the proxy client deployment method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of the present invention.

[0060] The following first introduces a deployment method of a proxy client provided by an embodiment of the present invention.

[0061] A proxy client deployment method provided in an embodiment of the present invention can be applied to a proxy server, which communicates with various auxiliary clients. Each auxiliary client is a proxy client deployed on a designated device through manual deployment. Different auxiliary clients are deployed on different designated devices, and the network addresses of different designated devices belong to different network segments in the intranet environment.

[0062] Specifically, the execution subject of the proxy client deployment method can be a proxy client deployment device. Exemplarily, when the proxy client deployment method is applied to a proxy server, the proxy client deployment device can be a computer program running on the server, which can be used to implement the deployment of the proxy client.

[0063] The method for deploying a proxy client provided by an embodiment of the present invention may include:

[0064] In response to receiving a deployment instruction from a deployment agent client for a destination device, determining, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device;

[0065] Passing the type of the operating system to the designated client, so that the designated client executes a script matching the type of the operating system, so that the destination device performs installation for the proxy client;

[0066] When the script is executed, the predetermined access port is used to send the installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

[0067] The solution provided by an embodiment of the present invention manually deploys a proxy client on a designated device in a different network segment within an intranet environment as an auxiliary client. When the proxy server receives a deployment instruction for a target device, it can determine, from the auxiliary clients deployed on the designated devices in the different network segments, the auxiliary client deployed on a designated device in the same network segment as the target device to be deployed, as the designated client. The designated client is then informed of the operating system type of the target device to be deployed, allowing the designated client to execute a script matching the received operating system type. When the script is executed, it sends an installation package for the proxy client to the target device via a predetermined access port, causing the target device to install the installation package, thereby automatically installing the proxy client on the target device. With this solution, the proxy server does not need to open ports 22 or 445 to each target device. Instead, it simply uses the communication port between the auxiliary client and the proxy server to send the target device's operating system type to the designated client, causing the designated client to execute the script corresponding to the operating system type, completing the installation of the proxy client for the target device. This solution can achieve proxy client deployment within an intranet environment while reducing security risks.

[0068] The following describes a method for deploying a proxy client provided by an embodiment of the present invention in conjunction with the accompanying drawings.

[0069] like Figure 1 As shown, the proxy client deployment method provided by the embodiment of the present invention is applied to a proxy server, which communicates with various auxiliary clients. Each auxiliary client is a proxy client deployed on a designated device through manual deployment. Different auxiliary clients are deployed on different designated devices, and the network addresses of the different designated devices belong to different network segments in an intranet environment. The method may include steps S101-S102:

[0070] S101, in response to receiving a deployment instruction from a deployment agent client for a target device, determining, from among the auxiliary clients, an auxiliary client deployed on a designated device in the same network segment as the target device as a designated client; wherein the deployment instruction carries the type of the operating system of the target device;

[0071] In the embodiment of the present invention, the destination device is a device in an intranet environment to be deployed with a proxy client, and the proxy client is a client corresponding to the proxy server, that is, a client matching the proxy service provided by the proxy server.

[0072] It is understood that a cluster in an intranet environment can be composed of devices in at least one network segment, and among the devices in each network segment, there is a designated device that has been manually deployed with a proxy client, and the proxy client deployed in the designated device is an auxiliary client. For example, in actual applications, the proxy client deployment method provided by the proxy server can be encapsulated as an interface to provide services to external devices. If it is necessary to batch deploy proxy clients for various devices in the cluster in the intranet environment that do not have a proxy client deployed, the user can call the proxy client deployment method provided by the proxy server by calling the interface, and can use the operating system type of the target device to which the proxy client is to be deployed as a parameter of the interface, and pass a deployment instruction carrying the operating system type of the target device to which the proxy client is to be deployed to the proxy server. Furthermore, it should be noted that the deployment instruction for the target device can also carry an identifier of the target device, such as the IP address of the target device, so that the proxy server can determine the network segment of the target device based on the IP address of the target device. Therefore, after receiving the deployment instruction, the proxy server can identify, from among the auxiliary clients, the auxiliary client deployed on the designated device that is in the same network segment as the target device as the designated client.

[0073] For example, if devices A1, A2 and A3 are in network segment A, devices B1, B2 and B3 are in network segment B, proxy clients are pre-deployed in devices A1 and B1 through manual deployment, and devices A2, A3, B2 and B3 serve as destination devices for deploying proxy clients, then the proxy client deployed in device A1 is the designated client corresponding to destination devices A2 and A3, and the proxy client deployed in device B1 is the designated client corresponding to destination devices B2 and B3.

[0074] S102, transmitting the type of the operating system to the designated client, so that the designated client executes a script matching the type of the operating system, so that the destination device performs installation of the proxy client;

[0075] When the script is executed, the predetermined access port is used to send the installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

[0076] In this embodiment, after determining the designated client, the type of the operating system can be transmitted to the designated client so that the designated client executes a script that matches the type of the operating system. It is understood that the script that matches the type of the operating system of the target device to be deployed is a script for sending an installation package to the target device on the same network segment as the designated device on which the designated client is deployed, and for causing the target device to install the installation package. Therefore, when the designated client executes the script that matches the type of the operating system, it can use a predetermined access port to send the installation package for the proxy client to the target device, and cause the target device to install the installation package, thereby allowing the target device to automatically complete the installation of the proxy client.

[0077] For example, in actual applications, the installation package for the proxy client can be pre-stored in the designated client or in the proxy server, and then sent to the designated client through the proxy server. This is reasonable. In addition, a predetermined access port can be pre-opened between devices in the same network segment, so that when the script is executed, the designated client can send the installation package to the destination device through the predetermined access port. For example, if the operating system is Windows, the predetermined access port can be port 445; if the operating system is Linux, the predetermined access port can be port 22.

[0078] Furthermore, it is understood that if the destination devices are multiple devices located in different network segments, multiple designated clients can be determined based on the multiple destination devices located in different network segments. If any designated client receives multiple operating system types, that is, if the designated client in the network segment corresponds to multiple destination devices to be deployed, the designated client can start multiple threads and execute scripts that match the operating system type of each destination device in parallel, thereby automatically completing the deployment of the proxy client to the multiple destination devices.

[0079] For example, if the proxy client deployed in device A1 is the designated client corresponding to the destination devices A2 and A3, and the proxy client deployed in device B1 is the designated client corresponding to the destination devices B2 and B3, the proxy server can pass the types of operating systems of devices A2 and A3 to the proxy client deployed in device A1, and pass the types of operating systems of devices B2 and B3 to the proxy client deployed in device B1, so that the proxy client deployed in device A1 can respectively start the threads of the proxy client deployed in device A2 and the proxy client deployed in device A3 to execute scripts that match the types of operating systems of devices A2 and A3, and the proxy client deployed in device B1 can respectively start the threads of the proxy client deployed in devices B2 and B3 to execute scripts that match the types of operating systems of devices B2 and B3.

[0080] The solution provided by an embodiment of the present invention manually deploys a proxy client on a designated device in a different network segment within an intranet environment as an auxiliary client. When the proxy server receives a deployment instruction for a target device, it can determine, from the auxiliary clients deployed on the designated devices in the different network segments, the auxiliary client deployed on a designated device in the same network segment as the target device to be deployed, as the designated client. The designated client is then informed of the operating system type of the target device to be deployed, allowing the designated client to execute a script matching the received operating system type. When the script is executed, it sends an installation package for the proxy client to the target device via a predetermined access port, causing the target device to install the installation package, thereby automatically installing the proxy client on the target device. With this solution, the proxy server does not need to open ports 22 or 445 to each target device. Instead, it simply uses the communication port between the auxiliary client and the proxy server to send the target device's operating system type to the designated client, causing the designated client to execute the script corresponding to the operating system type, completing the installation of the proxy client for the target device. This solution can achieve proxy client deployment within an intranet environment while reducing security risks.

[0081] Optionally, in another embodiment of the present invention, the designated client executes a script that matches the type of the operating system so that the destination device performs installation of the proxy client, which may include steps A1-A2:

[0082] A1. If the operating system is Windows, the designated client executes a batch file script to send a first installation package and a first installation instruction of the proxy client to the destination device via a predetermined access port, so that the destination device, in response to receiving the first installation instruction, launches the first installation package to install the proxy client; wherein the first installation package is a Windows installation package;

[0083] A2. If the operating system is of Linux type, the designated client executes a Java script to send a second installation package and a second installation instruction of the proxy client to the destination device using a predetermined access port, so that the destination device responds to receiving the second installation instruction and, after receiving the second installation package, starts the second installation package to install the proxy client; wherein, the second installation package is a Linux type installation package.

[0084] It is understood that since commands vary across operating systems, the designated client, upon receiving the operating system type transmitted by the proxy server, may execute different scripts based on the operating system type. Furthermore, if the operating system is Windows, the predetermined access port may be port 445; if the operating system is Linux, the predetermined access port may be port 22.

[0085] If the operating system is Windows, the designated client executes a batch file script, which is an executable file consisting of a series of commands, also known as a bat script. When executed, the script sends a first installation package and a first installation instruction of the proxy client to the destination device via port 445. In response to receiving the first installation instruction, the destination device launches the first installation package to install the proxy client.

[0086] For example, in actual applications, the core logic of the bat script can be to first send the proxy client installation package to a predetermined location on the destination device using the xcopy command, then create a one-minute scheduled task for the destination device using the schtasks command, and then close the scheduled task after a one-minute wait. The scheduled task then executes the installation script in the installation package on the destination device. In other words, the first installation instruction can be a one-minute scheduled task that causes the destination device to wait one minute after receiving the first installation instruction. Upon receiving the first installation package, the destination device then launches the installation package to install the proxy client, i.e., launches the installation script in the first installation package to install the proxy client.

[0087] If the operating system is of Linux type, the designated client executes a Java script, which can directly call Linux commands. When executed, the Java script uses port 22 to send the second installation package and the second installation instruction of the proxy client to the destination device, so that the destination device responds to receiving the second installation instruction. After receiving the second installation package, the second installation package is started to install the proxy client, that is, the installation script in the second installation package is started to install the proxy client. For example, in actual application, the core logic of the Java script can be to connect to the destination device with a Linux operating system through the SSH (Secure Shell) protocol of port 22, upload the proxy client installation package to a predetermined location of the destination device, and then execute the installation script in the installation package of the Linux device.

[0088] In addition, it should be noted that the script matching the type of the operating system can be pre-stored in the designated client, or can exist in the proxy server and be sent to the designated client through the proxy server, which is reasonable.

[0089] It can be seen that through this solution, by specifying the client to execute different scripts according to different operating system types, the proxy client is automatically installed on the target device with different types of operating systems, which can reduce the cost of human deployment.

[0090] Optionally, in another embodiment of the present invention, before transmitting the type of the operating system to the designated client, the method may further include:

[0091] Sending a specified detection instruction to the specified client to enable the specified client to detect whether it is communicating with the destination device;

[0092] If yes, executing the step of delivering the type of the operating system to the designated client;

[0093] If not, a deployment failure result is fed back to the sender of the deployment instruction.

[0094] It is understandable that if the designated device on which the designated client is deployed cannot communicate with the destination device, the designated client cannot send the installation package for the proxy client to the destination device. Therefore, before transmitting the type of the operating system to the designated client, it is also possible to detect whether the designated device on which the designated client is deployed is in communication with the destination device to be deployed, so that when the designated device on which the designated client is deployed is in communication with the destination device to be deployed, the step of transmitting the type of the operating system to the designated client is performed, so that after receiving the type of the operating system, the designated client can execute a script that matches the type of the operating system, send the installation package for the proxy client to the destination device, and enable the destination device to install the installation package. If the designated device on which the designated client is deployed cannot communicate with the destination device to be deployed, the result of the failure of the proxy client deployment for the destination device can be fed back to the sender of the deployment instruction.

[0095] It can be seen that through this solution, before the type of the operating system is passed to the designated client, it is detected whether it can communicate with the destination device, and when the designated device on which the designated client is deployed cannot communicate with the destination device, the result of deployment failure is fed back, which can save the response process of the deployment instruction.

[0096] Alternatively, in another embodiment of the present invention, Figure 1 Based on the embodiment shown, Figure 2 As shown, the method may further include step S103:

[0097] S103 , in response to receiving the registration request sent by the destination device, recording the identifier of the destination device into a designated mapping table; wherein the registration request is a request sent by the destination device after successfully installing the installation package.

[0098] In this embodiment, the designated client executes a script that matches the operating system type of the destination device, causing the destination device to install the proxy client. Once the proxy client installation is complete, the proxy client is initiated to establish a communication connection with the proxy server, at which point a registration request is sent to the proxy server. Upon receiving the registration request from the destination device, the proxy server may record the identifier of the destination device in a designated mapping table. Exemplarily, the identifier of the destination device may be an IP address, a device name, or the like; the designated mapping table may be a map used to record the identifier of the destination device.

[0099] Accordingly, in this embodiment, the method may further include:

[0100] In response to receiving a check instruction from the proxy client for the destination device, querying whether there is an identifier of the destination device in the designated mapping table;

[0101] If it exists, the inspection result of successful installation is fed back to the sender of the inspection instruction;

[0102] If it does not exist, the check result indicating installation failure is fed back to the sender of the check instruction.

[0103] In this embodiment, since the proxy client is recorded in a designated mapping table on the proxy server after installation is complete on the destination device, the server can query the designated mapping table after receiving a proxy client check instruction for the destination device. If the destination device identifier is present in the designated mapping table, indicating that the proxy client is installed on the destination device, a successful installation check result can be fed back to the sender of the check instruction. If not, a failed installation check result can be fed back to the sender of the check instruction. The proxy server can then feed this check result back to the sender of the check instruction, allowing the user on the sender to understand the deployment status of the proxy client on the destination device.

[0104] For example, in actual application, when the user needs to check whether the proxy client is installed in the destination device, a check instruction for the proxy client of the destination device can be sent to the server. The check instruction can instruct the server to perform a preset number of queries, for example, query the specified mapping table once every 30 seconds. If the identification of the destination device is still not found after 5 queries, the check result of installation failure is fed back; otherwise, the check result of installation success is fed back.

[0105] It can be seen that through this solution, the deployment status of the proxy client in the destination device can be grasped in a timely manner.

[0106] Optionally, in another embodiment of the present invention, the proxy server communicates with each auxiliary client through a custom port number.

[0107] In this embodiment, the customized port number can be the communication port between the proxy server and the proxy client, such as port 2004 or port 2005, etc. It is understandable that since the importance of port 22 or port 445 is completely different from that of the customized port, that is, problems with the customized port have a much smaller impact on the devices in the intranet cluster, while problems with port 22 or port 445 have a much greater impact on the devices. Therefore, the proxy server and each auxiliary client communicate through the customized port, so that each auxiliary client does not need to open port 22 or port 445 with the proxy server, thereby further reducing the security risks of proxy client deployment in the intranet environment.

[0108] It can be seen that this solution can further reduce the security risks of proxy client deployment in the intranet environment.

[0109] In order to better understand this solution, the deployment method of the proxy client provided by the embodiment of the present invention is described below with reference to a specific example.

[0110] Figure 3 A flowchart showing a specific example of a method for deploying a proxy client provided by an embodiment of the present invention includes the following steps:

[0111] (1) Manually deploy a proxy client (corresponding to the auxiliary client mentioned above) on a device in each network segment of the intranet environment. The device where the proxy client is deployed can communicate with port 22 or port 445 of the device in the same network segment.

[0112] (2) The proxy server receives a request from the user to install a proxy client on a target device, determines from among the manually deployed proxy clients a proxy client that is deployed on a device that is in the same network segment as the target device, and designates it as the designated client, and sends a request to the designated client to install the proxy client;

[0113] (3) The proxy server transmits the operating system type of the target device to the designated client through the customized port number, so that the designated client determines the operating system type of the target device and executes the script that matches the operating system type of the target device;

[0114] (4) If the operating system of the target device is Windows, the client is designated to execute a bat script, which sends the installation package of the proxy client to the target device and configures a one-minute scheduled task. After the scheduled task is executed, the scheduled task is closed. After the target device triggers the scheduled task, the proxy installation script in the local proxy installation package is started;

[0115] (5) If the operating system of the target device is Linux, the client is designated to execute a Java script. When the Java script is executed, it connects to the target device through port 22, sends an agent installation package to the target device, and executes the installation script in the installation package;

[0116] (6) The proxy server sends a request to check whether the proxy client process on the destination device exists;

[0117] (7) The destination device checks whether the proxy client process on the local device exists and feeds back the check result.

[0118] The bat script is used to deploy the proxy client for Windows-based target devices. Its core logic involves first sending the proxy client installation package to the specified location on the target device using the xcopy command, then creating a one-minute scheduled task for the target device using the schtasks command, and then closing the scheduled task after waiting for one minute. The scheduled task executes the proxy client installation script in the proxy installation package on the target device. The java script is used to deploy the proxy client for Linux-based target devices. Its core logic involves connecting to the Linux-based target device using the SSH protocol on port 22, uploading the proxy client installation package to the predetermined location on the target device, and then executing the proxy client installation script in the installation package on the target device.

[0119] In addition, the core logic of the destination device checking whether the proxy client process of the local device exists is: a request to check whether the process exists is sent to the proxy client of the destination device through the proxy server. After receiving the request, the proxy client of the destination device checks whether the local device has a proxy client process and returns the result to the server.

[0120] It should also be noted that, after installation, the proxy client on the destination device connects to the proxy server and sends a registration request to the proxy server, causing the proxy server to record the destination device's IP address in a designated mapping table. In practical applications, the proxy server may also provide a query interface for querying the designated mapping table. Upon receiving a check instruction from the proxy client for the destination device, the proxy server can query the designated mapping table to determine whether the destination device's IP address exists. If so, it can then report a successful installation check result to the sender of the check instruction.

[0121] This solution simplifies manual steps during proxy client deployment. In practice, you only need to manually deploy the proxy client on one device in a network segment where port 22 or port 445 is accessible, eliminating the need to manually deploy the proxy client on every device. This significantly improves deployment efficiency. Furthermore, no new network access policies for port 22 or port 445 are added during the entire deployment process. Communication between the proxy client and proxy server utilizes custom ports, minimizing network intrusion and ensuring intranet security.

[0122] Corresponding to the above method embodiment, the present invention also provides a deployment system for a proxy client, such as Figure 4 As shown, it includes a proxy server 410 and an auxiliary client 420. The proxy server 410 communicates with each auxiliary client 420. Each auxiliary client 420 is a proxy client deployed on a designated device through manual deployment. Different auxiliary clients 420 are deployed on different designated devices, and the network addresses of different designated devices belong to different network segments in the intranet environment.

[0123] The proxy server 410 is configured to, in response to receiving a deployment instruction for deploying a proxy client for a target device, determine, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the target device, as a designated client; and transmit the operating system type to the designated client; wherein the deployment instruction carries the operating system type of the target device;

[0124] The auxiliary client 420 is used to execute a script that matches the type of the operating system in response to receiving the type of the operating system transmitted by the proxy server, so that the destination device installs the proxy client; wherein, when the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device installs the installation package.

[0125] It should be noted that the functions of the proxy server and the auxiliary client are described in the above method embodiments and will not be repeated here.

[0126] Corresponding to the embodiment of the above method, the embodiment of the present invention further provides a deployment device of a proxy client, which is applied to a proxy server, wherein the proxy server communicates with each auxiliary client, and each auxiliary client is a proxy client deployed on a designated device by manual deployment. Different auxiliary clients are deployed on different designated devices, and the network addresses of different designated devices belong to different network segments in the intranet environment, such as Figure 5 As shown, the device includes:

[0127] A determination module 510 is configured to, in response to receiving a deployment instruction from a deployment agent client for a destination device, determine, from among the auxiliary clients, an auxiliary client deployed on a designated device in the same network segment as the destination device, as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device;

[0128] An installation module 520 is configured to transmit the type of the operating system to the designated client, so that the designated client executes a script that matches the type of the operating system, so that the destination device performs installation of the proxy client;

[0129] When the script is executed, the predetermined access port is used to send the installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

[0130] Optionally, the designated client executes a script that matches the type of the operating system, so that the destination device performs installation of the proxy client, including:

[0131] If the operating system is a Windows type, the designated client executes a batch file script to send a first installation package and a first installation instruction of the proxy client to the destination device via a predetermined access port, so that the destination device, in response to receiving the first installation instruction, launches the first installation package after receiving the first installation package to install the proxy client; wherein the first installation package is a Windows type installation package;

[0132] If the operating system is of Linux type, the designated client executes a Java script to send a second installation package and a second installation instruction of the proxy client to the destination device using a predetermined access port, so that the destination device responds to receiving the second installation instruction and, after receiving the second installation package, starts the second installation package to install the proxy client; wherein, the second installation package is a Linux type installation package.

[0133] Optionally, the device further comprises:

[0134] a detection module, configured to, before the installation module executes the transmission of the operating system type to the designated client, issue a specified detection instruction to the designated client, so that the designated client detects whether it is communicating with the destination device;

[0135] an execution module, configured to execute the steps of installing the module if yes;

[0136] The first feedback module is configured to, if not, feed back a result of deployment failure to the sending end of the deployment instruction.

[0137] Optionally, the device further comprises:

[0138] The registration module is configured to record the identifier of the destination device into a designated mapping table in response to receiving a registration request sent by the destination device; wherein the registration request is a request sent by the destination device after successfully installing the installation package.

[0139] Optionally, the device further comprises:

[0140] a query module, configured to query whether an identifier of the destination device exists in the designated mapping table in response to receiving a check instruction from the proxy client for the destination device;

[0141] A second feedback module is configured to feed back a successful installation inspection result to the sending end of the inspection instruction, if any;

[0142] The third feedback module is configured to feedback the inspection result of installation failure to the sending end of the inspection instruction if the inspection result does not exist.

[0143] Optionally, the proxy server communicates with each auxiliary client via a custom port number.

[0144] The embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0145] Memory 603, used for storing computer programs;

[0146] The processor 601 is configured to implement the steps of the above-mentioned proxy client deployment method when executing the program stored in the memory 603;

[0147] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0148] The communication interface is used for communication between the above electronic device and other devices.

[0149] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0150] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0151] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned proxy client deployment methods are implemented.

[0152] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any one of the proxy client deployment methods in the above embodiments.

[0153] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0154] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0155] Each embodiment in this specification is described in a related manner. Similar portions between the embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system and device embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, refer to the descriptions of the method embodiments.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A method for deploying a proxy client, characterized in that: Applied to a proxy server, the proxy server communicates with various auxiliary clients, each auxiliary client being a proxy client manually deployed on a designated device, different auxiliary clients being deployed on different designated devices, and the network addresses of the different designated devices belonging to different network segments within an intranet environment, the method comprising: In response to receiving a deployment instruction from a deployment agent client for a destination device, determining, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device; Passing the type of the operating system to the designated client, so that the designated client executes a script matching the type of the operating system, so that the destination device performs installation for the proxy client; When the script is executed, the predetermined access port is used to send the installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

2. The method according to claim 1, characterized in that The designated client executes a script that matches the type of the operating system, so that the destination device performs installation of the proxy client, including: If the operating system is a Windows type, the designated client executes a batch file script to send a first installation package and a first installation instruction of the proxy client to the destination device via a predetermined access port, so that the destination device, in response to receiving the first installation instruction, launches the first installation package after receiving the first installation package to install the proxy client; wherein the first installation package is a Windows type installation package; If the operating system is of Linux type, the designated client executes a Java script to send a second installation package and a second installation instruction of the proxy client to the destination device using a predetermined access port, so that the destination device responds to receiving the second installation instruction and, after receiving the second installation package, starts the second installation package to install the proxy client; wherein, the second installation package is a Linux type installation package.

3. The method according to claim 1, characterized in that Before transmitting the type of the operating system to the designated client, the method further includes: Sending a designated detection instruction to the designated client so that the designated client detects whether it is communicating with the destination device; If yes, executing the step of transmitting the type of the operating system to the designated client; If not, a deployment failure result is fed back to the sender of the deployment instruction.

4. The method according to claim 1, wherein The method further comprises: In response to receiving a registration request sent by the destination device, recording the identifier of the destination device in a designated mapping table; wherein the registration request is a request sent by the destination device after successfully installing the installation package.

5. The method according to claim 4, characterized in that The method further comprises: In response to receiving a check instruction from the proxy client for the destination device, querying from the designated mapping table whether there is an identifier of the destination device; If so, a successful installation check result is fed back to the sender of the check instruction; If it does not exist, a check result indicating installation failure is fed back to the sending end of the check instruction.

6. The method according to any one of claims 1 to 5, characterized in that The proxy server communicates with each auxiliary client via a custom port number.

7. A deployment system for a proxy client, characterized in that: The system comprises a proxy server and auxiliary clients, wherein the proxy server communicates with each auxiliary client, and each auxiliary client is a proxy client manually deployed on a designated device, wherein different auxiliary clients are deployed on different designated devices, and the network addresses of different designated devices belong to different network segments in the intranet environment; The proxy server is configured to, in response to receiving a deployment instruction for deploying a proxy client for a destination device, determine, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device, as a designated client; Delivering the type of operating system to the designated client; wherein the deployment instruction carries the type of operating system of the destination device; The auxiliary client is used to execute a script that matches the type of operating system in response to receiving the type of operating system transmitted by the proxy server, so that the destination device installs the proxy client; wherein, when the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device installs the installation package.

8. A deployment device for a proxy client, characterized in that: Applied to a proxy server, the proxy server communicates with various auxiliary clients, each auxiliary client being a proxy client manually deployed on a designated device, different auxiliary clients being deployed on different designated devices, and the network addresses of the different designated devices belonging to different network segments in an intranet environment, the apparatus comprises: a determination module configured to, in response to receiving a deployment instruction from a deployment agent client for a destination device, determine, from among the auxiliary clients, an auxiliary client deployed on a designated device that is in the same network segment as the destination device, as the designated client; wherein the deployment instruction carries the type of the operating system of the destination device; An installation module, configured to transmit the type of the operating system to the designated client, so that the designated client executes a script matching the type of the operating system, so that the destination device performs installation of the proxy client; When the script is executed, a predetermined access port is used to send an installation package for the proxy client to the destination device, and the destination device is caused to install the installation package.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Packing method and device of client installation package, equipment and storage medium

    CN113885897A

  • Intranet upgrading method and device and computing equipment

    CN115185554A