Server access method and device
By establishing a signature-verified proxy link between the client device and the proxy server, the client device's need to access the cloud hosting server is solved, secure and stable data communication is achieved, and the security of the link and the reliability of access are ensured. sex.
Patent Information
- Application Number
- CN202310330990.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technologies are difficult to effectively solve the need for client devices to access cloud hosting servers, and are particularly deficient in ensuring the security and stability of data communications.
By establishing a proxy link between the client device and the proxy server, the private key signature verification mechanism is used to ensure the security of the proxy link. After the link identification passes the verification, an access request is sent to the cloud hosting server through the proxy link. , enabling client devices to access cloud hosting servers.
It enables client devices to safely and stably access cloud hosting servers to meet access requirements, and improves the security of data communication through the private key signature verification mechanism to avoid potential intrusion risks.
Smart Images

Figure CN118740926A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software development, and in particular to a server access method and device. Background Art
[0002] Cloud hosting is a serverless container hosting technology provided by cloud development, which supports hosting any containerized application. Cloud hosting can solve the problems caused by backend service development, deployment, operation and maintenance for software developers, so that mini program developers can focus more on business development. Summary of the invention
[0003] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a method and device for accessing a server.
[0004] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present disclosure are as follows:
[0005] In a first aspect, an embodiment of the present disclosure provides a server access method, including:
[0006] In response to a start operation inputted to the access plug-in, a proxy link establishment request is sent to the proxy server, wherein the proxy link establishment request is used to request the proxy server to establish a proxy link with the cloud hosting server, and return a link identifier corresponding to the proxy link;
[0007] Receiving a link identifier sent by the proxy server;
[0008] Sending an access request carrying the link identifier to the proxy server, wherein the access request is used to request the proxy server to send the access request to the cloud hosting server through the proxy link if the link identifier passes verification;
[0009] An access response corresponding to the access request and sent by the proxy server is received.
[0010] As an optional implementation of the embodiment of the present disclosure, before sending the proxy link establishment request to the proxy server, the method further includes:
[0011] Obtaining a private key signature, and adding the private key signature to the proxy link establishment request;
[0012] The proxy link establishment request is specifically used to establish a proxy link with the cloud hosting server when the private key signature passes the signature verification, and return a link identifier corresponding to the proxy link.
[0013] As an optional implementation of the embodiment of the present disclosure, the client device is further installed with an integrated development environment; the sending of the access request carrying the link identifier to the proxy server includes:
[0014] Obtaining a debugging request of the integrated development environment through the access plug-in, wherein the debugging request is used to request debugging of the target software deployed in the cloud hosting server;
[0015] The access request is generated by adding the link identifier to the debugging request through the access plug-in, and the access request is sent to the proxy server through the access plug-in.
[0016] As an optional implementation of the embodiment of the present disclosure, the receiving the access response sent by the proxy server includes:
[0017] Receiving, through the access plug-in, the access response carrying the debugging data sent by the proxy server;
[0018] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0019] As an optional implementation of the embodiment of the present disclosure, a debugging channel is established between the access plug-in and the integrated development environment; after receiving the access response carrying the debugging data sent by the proxy server through the access plug-in, the method further includes:
[0020] sending the access response to the integrated development environment using the debug channel through the access plug-in;
[0021] The debugging data is displayed through the integrated development environment.
[0022] As an optional implementation of the embodiment of the present disclosure, the method further includes:
[0023] In response to a closing operation input to the access plug-in, sending a proxy link disconnection request carrying the link identifier and the private key signature to the proxy server;
[0024] The proxy link disconnection request is used to request the proxy server to disconnect the proxy link corresponding to the link identifier when the private key signature passes the signature verification.
[0025] In a second aspect, an embodiment of the present disclosure provides a server access method, including:
[0026] receiving a proxy link establishment request sent by a client device;
[0027] In response to the proxy link establishment request, establish a proxy link with the cloud hosting server, and generate a corresponding link identifier of the proxy link;
[0028] Sending the link identifier to the client device;
[0029] Receiving an access request carrying the link identifier sent by the client device;
[0030] In the case where the link identifier passes the verification, sending the access request to the cloud hosting server through the proxy link;
[0031] Receiving an access response corresponding to the access request sent by the cloud hosting server;
[0032] The access response is sent to the client device.
[0033] As an optional implementation of the embodiment of the present disclosure, the proxy link establishment request also carries a private key signature; the response to the proxy link establishment request to establish a proxy link with the cloud hosting server and generate a corresponding link identifier of the proxy link includes:
[0034] When the private key signature passes the signature verification, a proxy link is established with the cloud hosting server, and a corresponding link identifier of the proxy link is generated.
[0035] As an optional implementation of the embodiment of the present disclosure, the access request is used to request the proxy server to debug the target software deployed in the cloud hosting server when the link identifier passes the verification; the receiving unit is specifically used to receive the access response carrying the debugging data sent by the cloud hosting server;
[0036] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0037] As an optional implementation of the embodiment of the present disclosure,
[0038] The receiving unit is further configured to receive a proxy link disconnection request sent by the client device and carrying the link identifier and the private key signature;
[0039] The processing unit is further configured to disconnect the proxy link corresponding to the link identifier when the private key signature passes the signature verification.
[0040] In a third aspect, an embodiment of the present disclosure provides a client device, including:
[0041] A sending unit, configured to send a proxy link establishment request to a proxy server, wherein the proxy link establishment request is used to request the proxy server to establish a proxy link with a cloud hosting server, and return a link identifier corresponding to the proxy link;
[0042] A receiving unit, configured to receive a link identifier sent by the proxy server;
[0043] The sending unit is further configured to send an access request carrying the link identifier to the proxy server, wherein the access request is used to request the proxy server to send the access request to the cloud hosting server through the proxy link when the link identifier is verified, receive an access response corresponding to the access request sent by the cloud hosting server, and return the access response;
[0044] The receiving unit is further configured to receive the access response sent by the proxy server.
[0045] As an optional implementation of the embodiment of the present disclosure, the client device further includes:
[0046] A signature acquisition unit, used to acquire a private key signature before sending the proxy link establishment request to the proxy server, and add the private key signature to the proxy link establishment request;
[0047] The proxy link establishment request is specifically used to establish a proxy link with the cloud hosting server when the private key signature passes the signature verification, and return a link identifier corresponding to the proxy link.
[0048] As an optional implementation of the embodiment of the present disclosure, the client device is also installed with an integrated development environment; the sending unit is specifically used to obtain a debugging request of the integrated development environment through the access plug-in, add the link identifier to the debugging request through the access plug-in to generate the access request, and send the access request to the proxy server through the access plug-in;
[0049] The debugging request is used to request debugging of the target software deployed in the cloud hosting server.
[0050] As an optional implementation of the embodiment of the present disclosure, the receiving unit is specifically configured to receive, through the access plug-in, the access response carrying the debugging data sent by the proxy server;
[0051] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0052] As an optional implementation of the embodiment of the present disclosure, a debugging channel is established between the access plug-in and the integrated development environment; the receiving unit is further used to send the access response carrying the debugging data sent by the proxy server through the access plug-in to the integrated development environment using the debugging channel through the access plug-in; and display the debugging data through the integrated development environment.
[0053] As an optional implementation of the embodiment of the present disclosure, the sending unit is further used to send a proxy link disconnection request carrying the link identifier and the private key signature to the proxy server in response to a closing operation input to the access plug-in;
[0054] The proxy link disconnection request is used to request the proxy server to disconnect the proxy link corresponding to the link identifier when the private key signature passes the signature verification.
[0055] In a fourth aspect, an embodiment of the present disclosure provides a proxy server, including:
[0056] A receiving unit, configured to receive a proxy link establishment request sent by a client device;
[0057] A processing unit, configured to establish a proxy link with a cloud hosting server and generate a corresponding link identifier of the proxy link;
[0058] A sending unit, configured to send the link identifier to the client device;
[0059] The receiving unit is further configured to receive an access request carrying the link identifier sent by the client device;
[0060] The sending unit is further configured to send the access request to the cloud hosting server through the proxy link if the link identifier passes the verification;
[0061] The receiving unit is further configured to receive an access response corresponding to the access request sent by the cloud hosting server;
[0062] The sending unit is further configured to send the access response to the client device.
[0063] As an optional implementation of the embodiment of the present disclosure, the proxy link establishment request also carries a private key signature; the processing unit is specifically used to establish a proxy link with the cloud hosting server when the private key signature passes the signature verification, and generate a corresponding link identifier of the proxy link.
[0064] As an optional implementation of the embodiment of the present disclosure, the access request is used to request the proxy server to debug the target software deployed in the cloud hosting server when the link identifier passes the verification; the receiving unit is specifically used to receive the access response carrying the debugging data sent by the cloud hosting server;
[0065] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0066] As an optional implementation of the embodiment of the present disclosure,
[0067] The receiving unit is further configured to receive a proxy link disconnection request sent by the client device and carrying the link identifier and the private key signature;
[0068] The processing unit is further configured to disconnect the proxy link corresponding to the link identifier when the private key signature passes the signature verification.
[0069] In a fifth aspect, an electronic device is provided, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements any of the above-mentioned server access methods when executed by the processor.
[0070] In a sixth aspect, a computer-readable storage medium is provided, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the server access method described in any one of the above is implemented.
[0071] In a seventh aspect, a computer program product is provided, wherein a computer program is stored in the computer program product, and when the computer program is executed by a processor, the server access method described in any one of the above items is implemented.
[0072] After receiving the startup operation for the access plug-in input, the server access method provided by the embodiment of the present disclosure first responds to the startup operation for the access plug-in input, sends a proxy link establishment request to the proxy server for requesting the proxy server to establish a proxy link with the cloud hosting server, and returns a link identifier corresponding to the proxy link, then receives the link identifier sent by the proxy server, and then sends an access request carrying the link identifier to the proxy server, so that the proxy server sends the access request to the cloud hosting server through the proxy link when the link identifier is verified, and returns an access response corresponding to the access request. Since data communication can be performed between the client device and the proxy server, and data communication can be performed between the proxy server and the cloud hosting server through the proxy link, in the server access method provided by the embodiment of the present disclosure, the client device can access the cloud hosting server through the proxy server, which solves the problem of meeting the need for the client device to access the cloud hosting server. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0074] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0075] Figure 1 An architectural diagram of a server access method provided in an embodiment of the present disclosure;
[0076] Figure 2 This is one of the flow charts of the server access method according to the embodiment of the present disclosure;
[0077] Figure 3 This is one of the interactive flow charts of the server access method of the embodiment of the present disclosure;
[0078] Figure 4 This is the second interactive flow chart of the server access method of the embodiment of the present disclosure;
[0079] Figure 5 This is the third interactive flow chart of the server access method of the embodiment of the present disclosure;
[0080] Figure 6 One of the schematic structural diagrams of the client device provided in the embodiment of the present disclosure;
[0081] Figure 7A second schematic structural diagram of a client device provided in an embodiment of the present disclosure;
[0082] Figure 8 A schematic structural diagram of a proxy server provided in an embodiment of the present disclosure;
[0083] Fig. 9 A hardware structure diagram of an electronic device provided for some embodiments of the present disclosure. DETAILED DESCRIPTION
[0084] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0085] In the following description, many specific details are set forth to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0086] In the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0087] The following first describes the scenario architecture of the cloud hosting server access method provided by the embodiment of the present disclosure. Figure 1 As shown, the scenario architecture of the cloud hosting server access method includes: a client device 11, an authentication server 12, a proxy server 13 and a cloud hosting server 14.
[0088] The client device 11 is equipped with an access plug-in. When receiving a startup operation for inputting the access plug-in, the client device 11 first sends a verification request to the authentication server 12. When receiving the verification request sent by the client device 11, the authentication server 12 verifies the verification request, and generates a private key signature based on the pre-configured private key when the verification is passed, and sends the private key signature to the client 11. After receiving the private key signature sent by the authentication server 12, the client device 11 sends a proxy link establishment request carrying the private key signature to the proxy server 13. The proxy server 13 stores the public key corresponding to the private key pre-configured in the authentication server 12, and verifies the private key signature carried in the proxy link establishment request through the public key. If the private key signature verification fails, the proxy server 13 does not establish a proxy link with the cloud hosting server 14. If the private key signature verification passes, the proxy server 13 establishes a proxy link with the cloud hosting server 14, generates a link identifier corresponding to the established proxy link, and sends the link identifier to the client device 11. After receiving the link identifier, the client device 11 adds the link identifier to the access request needed to access the cloud hosting server 14, and sends the access request with the link identifier to the proxy server 13 first. Each time the proxy server 13 receives an access request sent by the client device 11, it will first verify the link identifier carried in the access request. Only when the link identifier passes the verification will the access request be sent to the cloud hosting server 14 through the proxy link corresponding to the link identifier. After receiving the access request, the cloud hosting server 14 generates an access response corresponding to the access request based on the data in the database, cache, configuration center, etc., and sends the access response to the proxy server 13. After receiving the access response, the proxy server 13 forwards the access response to the client device 11. At this point, the client device 11 is able to access the cloud hosting server 14.
[0089] The present disclosure provides a server access method, the execution subject of the server access method can be a client device, referring to Figure 2 As shown, the server access method includes the following steps:
[0090] S101. In response to a start operation input to an access plug-in, a proxy link establishment request is sent to a proxy server.
[0091] The proxy link establishment request is used to request the proxy server to establish a proxy link with the cloud hosting server, and return a link identifier corresponding to the proxy link.
[0092] Exemplarily, the link identifier in the embodiment of the present application may be a session identifier (session_id).
[0093] In some embodiments, a method in which a client device sends a proxy link establishment request to a proxy server may include: the client device sends a proxy link establishment request to the proxy server through a communication link between the client device and the proxy server; wherein the communication link between the client device and the proxy server may be any communication link, and the embodiments of the present disclosure do not limit this, and data transmission between the client device and the proxy server shall prevail.
[0094] S102: Receive a link identifier sent by the proxy server.
[0095] Exemplarily, the link identifier may be obtained by calculating one or more of the link information such as the establishment time and the physical port of the proxy link using a hash algorithm to obtain a unique identifier of the proxy link.
[0096] S103: Send an access request carrying the link identifier to the proxy server.
[0097] The access request is used to request the proxy server to send the access request to the cloud hosting server through the proxy link when the link identifier passes the verification.
[0098] That is, one of the functions of the proxy server in the embodiment of the present disclosure is to verify the link identifier carried in the access request sent by the client device, and if successful, forward the access request to the cloud hosting server.
[0099] S104: Receive an access response corresponding to the access request and sent by the proxy server.
[0100] The proxy server obtains the access response by forwarding the access request to the cloud management server and receiving the access response sent by the cloud management server.
[0101] After receiving the startup operation for the access plug-in input, the server access method provided by the embodiment of the present disclosure first responds to the startup operation for the access plug-in input, sends a proxy link establishment request to the proxy server for requesting the proxy server to establish a proxy link with the cloud hosting server, and returns a link identifier corresponding to the proxy link, then receives the link identifier sent by the proxy server, and then sends an access request carrying the link identifier to the proxy server, so that the proxy server sends the access request to the cloud hosting server through the proxy link when the link identifier is verified, and returns an access response corresponding to the access request. Since data communication can be performed between the client device and the proxy server, and data communication can be performed between the proxy server and the cloud hosting server through the proxy link, in the server access method provided by the embodiment of the present disclosure, the client device can access the cloud hosting server through the proxy server, which solves the problem of meeting the need for the client device to access the cloud hosting server.
[0102] The present disclosure provides a method for accessing a server. Figure 3 As shown, the server access method includes the following steps:
[0103] S201. The client device obtains a private key signature in response to a startup operation input to an access plug-in.
[0104] That is, an access plug-in is installed in the client device, and when a startup operation input for the access plug-in is received, a private key signature is generated.
[0105] In some embodiments, the implementation method of obtaining and generating the private key signature may include: generating an asymmetric key pair including a public key and a private key, and configuring the public key and the private key of the asymmetric key pair to the client device and the proxy server respectively, when the private key signature needs to be generated, the client device encrypts the preset plaintext with the configured private key to obtain the private key signature. In response, the proxy server can decrypt the private key signature with the configured public key after receiving it, and judge whether the private key signature is verified according to whether the decrypted plaintext is the same as the preset plaintext.
[0106] S202: The client device sends a proxy link establishment request carrying the private key signature to the proxy server.
[0107] Correspondingly, the proxy server receives the proxy link establishment request carrying the private key signature sent by the client device.
[0108] S203: The proxy server performs signature verification on the private key signature.
[0109] As described in the above example, the implementation method of the proxy server performing signature verification on the private key signature may include: decrypting the private key signature by using the secret key corresponding to the private key signature to obtain a decrypted plaintext; determining whether the decrypted plaintext is consistent with the preset plaintext; if they are consistent, determining that the private key signature has passed the signature verification; if they are inconsistent, determining that the private key signature has not passed the signature verification.
[0110] In some embodiments, when the private key signature fails to pass signature verification, the proxy server discards the proxy link establishment request.
[0111] In some embodiments, when the private key signature fails to pass the signature verification, the proxy server discards the proxy link establishment request and outputs a reminder message.
[0112] In the above step S203, if the private key signature passes the signature verification, the following steps S204 and S205 are executed:
[0113] S204: The proxy server establishes a proxy link with the cloud hosting server.
[0114] In some embodiments, the implementation method of establishing a proxy link between a proxy server and a cloud hosting server may include: the proxy server sends a proxy link establishment request carrying information such as an Internet Protocol (IP) address, a Media Access Control (MAC) address, a physical port, etc. to the cloud hosting server, and establishes a proxy link with the cloud hosting server.
[0115] S205: The proxy server generates a corresponding link identifier of the proxy link.
[0116] The embodiment of the present disclosure does not limit the implementation method of generating the corresponding link identifier of the proxy link, and the proxy server is capable of generating a unique link identifier of the proxy link. Exemplarily, a hash algorithm can be used to calculate one or more of the link information such as the establishment time and physical port of the proxy link to obtain the corresponding link identifier of the proxy link.
[0117] S206: The proxy server sends the link identifier to the client device.
[0118] Correspondingly, the client device receives the link identifier sent by the proxy server.
[0119] In some embodiments, the proxy server and the client device may also agree on a symmetric key or an asymmetric encryption key, and the proxy server first uses the key to encrypt the link identifier, and then sends the ciphertext obtained by encrypting the link identifier to the client device. After receiving the ciphertext, the client device decrypts the ciphertext according to the key to obtain the link identifier.
[0120] S207: The client device sends an access request carrying the link identifier to the proxy server.
[0121] Correspondingly, the proxy server receives the access request carrying the link identifier sent by the client device.
[0122] S208: The proxy server verifies the link identifier.
[0123] That is, the proxy server verifies whether the link identifier carried in the access request is consistent with the link identifier sent to the client device; if they are consistent, it is determined that the link identifier verification has passed, and if they are inconsistent, it is determined that the link identifier verification has failed.
[0124] It should be noted that the proxy server may serve multiple client devices at the same time. When the proxy server serves multiple client devices, when it receives an access request carrying the link identifier sent by a client device, it can first send the link identifier to the client device, and then verify the link identifier carried in the access request sent by the client based on the link identifier sent by the client device.
[0125] In the above step S208, if the link identifier passes the verification, the following step S209 is executed:
[0126] S209: The proxy server sends the access request to the cloud hosting server through the proxy link.
[0127] Correspondingly, the cloud hosting server receives the access request sent by the proxy server.
[0128] S210: The cloud hosting server generates an access response corresponding to the access request.
[0129] S211. The cloud hosting server sends the access response to the proxy server through the proxy link.
[0130] Correspondingly, the proxy server receives the access response sent by the cloud hosting server through the proxy link.
[0131] S212: The proxy server sends the access response to the client device.
[0132] Correspondingly, the client device receives the access response sent by the proxy server.
[0133] The access method of the cloud hosting server provided in the embodiment of the present application first responds to the startup operation input for the access plug-in, obtains the private key signature, then sends a proxy link establishment request carrying the private key signature to the proxy server, receives the link identifier sent by the proxy server, and then sends an access request carrying the link identifier to the proxy server, so that the proxy server sends the access request to the cloud hosting server through the proxy link when the link identifier is verified, and returns the access response corresponding to the access request. First, since the proxy server can access the cloud hosting server through the proxy link, the client device can notify the proxy server, so the access method of the cloud hosting server provided in the embodiment of the present application can realize the client's access to the cloud hosting server. Secondly, the proxy server will only establish a proxy link with the cloud hosting server if the private key signature carried in the proxy link establishment request sent by the client is verified, and will only forward the access request to the cloud hosting server if the link identifier carried in the access request sent by the client is verified.
[0134] As an extension and refinement of the above embodiment, the present disclosure provides a method of Figure 3 The server access method shown is applied to the server access method under the test field of the software deployed in the cloud hosting server. In the embodiment of the present disclosure, the client device is installed with an access plug-in and an integrated development environment (IDE). Figure 4 As shown, the server access method includes the following steps:
[0135] S301: The client device receives a startup operation input for accessing a plug-in.
[0136] Exemplarily, the start operation may specifically be a touch click operation, a double click operation, a drag operation, etc., input to the access plug-in, which is not limited in the embodiment of the present disclosure.
[0137] It should be noted that after the access plug-in is started, the microservice application will be run in the client device, so receiving the startup operation input for the access plug-in can also be called receiving the startup operation input for the microservice corresponding to the access plug-in. The access plug-in and the microservice corresponding to the access plug-in in the embodiments of the present disclosure represent the same concept to a certain extent and can be replaced with each other.
[0138] S302: The client device establishes a debugging channel between the access plug-in and the integrated development environment.
[0139] S303: The client device sends a verification request to the authentication server.
[0140] S304: The authentication server verifies the verification request.
[0141] In the above step S304, if the verification is passed, the following step S305 is executed:
[0142] S305: The authentication server sends the private key signature to the client device.
[0143] S306: The client device sends a proxy link establishment request carrying the private key signature to the proxy server.
[0144] Correspondingly, the proxy server receives the proxy link establishment request carrying the private key signature sent by the client device.
[0145] S307: The proxy server performs signature verification on the private key signature.
[0146] As described in the above example, the proxy server performs signature verification on the private key signature.
[0147] In the above step S307, if the private key signature passes the signature verification, the following steps S308 and S309 are executed:
[0148] S308: The proxy server establishes a proxy link with the cloud hosting server.
[0149] S309: The proxy server generates a corresponding link identifier of the proxy link.
[0150] S310: The proxy server sends the link identifier to the client device.
[0151] Correspondingly, the client device receives the link identifier sent by the proxy server.
[0152] At this point, the communication link between the client device and the cloud hosting server has been opened, and the client device can communicate data through the proxy server and the proxy link between the proxy server and the cloud hosting server.
[0153] S311. The client device obtains a debugging request of the integrated development environment through the access plug-in.
[0154] The debugging request is used to request debugging of the target software deployed in the cloud hosting server.
[0155] In some embodiments, port forwarding technology can be used to detect access requests on the port through which the integrated development environment sends access requests to the cloud hosting server. When an access request on the port through which the access request is sent to the cloud hosting server is detected, traffic corresponding to the access request is intercepted to obtain the debugging request.
[0156] S312: The client device adds the link identifier to the debugging request through the access plug-in to generate the access request.
[0157] That is, the access request and the debugging request are both used to request debugging of the target software deployed in the cloud hosting server, the debugging request is received by the cloud hosting server, and the access request is received by the proxy server, and the proxy server is required to forward the request to the cloud hosting server, and compared with the access request, the debugging request adds the link identifier.
[0158] S313: The client device sends the access request to the proxy server through the access plug-in.
[0159] Correspondingly, the proxy server receives the access request carrying the link identifier sent by the client device.
[0160] S314: The proxy server verifies the link identifier.
[0161] In the above step S314, if the link identifier passes the verification, the following step S315 is executed:
[0162] S315: The proxy server sends the access request to the cloud hosting server through the proxy link.
[0163] Correspondingly, the cloud hosting server receives the access request sent by the proxy server.
[0164] S316: The cloud hosting server generates an access response corresponding to the access request.
[0165] S317: The cloud hosting server sends the access response to the proxy server through the proxy link.
[0166] S318: The proxy server sends the access response to the client device.
[0167] Correspondingly, the client device receives the access response carrying the debugging data sent by the proxy server through the access plug-in.
[0168] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0169] S319: The client device sends the access response to the integrated development environment using the debugging channel through the access plug-in.
[0170] S320: The client device displays the debugging data through the integrated development environment.
[0171] Through the above embodiments, the user can perform operations such as continuous debugging results and breakpoint debugging on the software deployed in the cloud hosting server in the client device, thereby realizing online debugging of the software deployed in the cloud hosting server in the client device.
[0172] In the above Figure 3 or Figure 4 Based on the embodiment shown, refer to Figure 5 As shown, the server access method provided by the embodiment of the present disclosure may also include the following steps:
[0173] S401: The client device receives a close operation inputted for an access plug-in.
[0174] That is, the user may further input a closing operation to the access plug-in after completing access to the cloud hosting server.
[0175] S402: In response to a closing operation input to the access plug-in, the client device sends a proxy link disconnection request carrying the link identifier and the private key signature to the proxy server.
[0176] Correspondingly, the proxy server receives the proxy link disconnection request carrying the link identifier and the private key signature.
[0177] S403: The proxy server performs signature verification on the private key signature.
[0178] In the above step S403, if the private key signature passes the signature verification of the proxy server, the following step S404 is executed:
[0179] S404: The proxy server disconnects the proxy link corresponding to the link identifier.
[0180] On the one hand, since the proxy server will disconnect the proxy link corresponding to the link identifier only when the private key signature carried in the proxy link disconnection request passes the signature verification of the proxy server, the above embodiment can prevent the proxy link established by the client device request from being disconnected by an intruder, thereby improving the stability of access to the cloud hosting server.
[0181] On the other hand, after completing the access to the cloud hosting server, the user can disconnect the proxy link established by requesting to close the access plug-in.
[0182] Based on the same inventive concept, as an implementation of the above method, the embodiment of the present disclosure also provides a client device and a proxy server. This embodiment corresponds to the above method embodiment. For ease of reading, this embodiment will no longer repeat the details of the above method embodiment one by one, but it should be clear that the client device and proxy server in this embodiment can correspond to the implementation of all the contents in the above method embodiment.
[0183] The present disclosure provides a client device, Figure 6 is a schematic diagram of the structure of the client device, such as Figure 6 As shown, the client device 600 includes:
[0184] A sending unit 61 is used to send a proxy link establishment request to the proxy server in response to a start operation inputted to the access plug-in, wherein the proxy link establishment request is used to request the proxy server to establish a proxy link with the cloud hosting server, and return a link identifier corresponding to the proxy link;
[0185] A receiving unit 62 receives a link identifier sent by the proxy server;
[0186] The sending unit 61 is further configured to send an access request carrying the link identifier to the proxy server, wherein the access request is used to request the proxy server to send the access request to the cloud hosting server through the proxy link when the link identifier is verified, receive an access response corresponding to the access request sent by the cloud hosting server, and return the access response;
[0187] The receiving unit 62 is further configured to receive the access response sent by the proxy server.
[0188] As an optional implementation of the present disclosure, refer to Figure 7 As shown, the client device 600 also includes:
[0189] The signature acquisition unit 63 is used to acquire a private key signature before sending the proxy link establishment request to the proxy server, and add the private key signature to the proxy link establishment request;
[0190] The proxy link establishment request is specifically used to establish a proxy link with the cloud hosting server when the private key signature passes the signature verification, and return a link identifier corresponding to the proxy link.
[0191] As an optional implementation of the embodiment of the present disclosure, the signature acquisition unit 63 is specifically used to send a verification request to the authentication server, requesting the authentication server to return the private key signature if the verification request passes the verification; and receive the private key signature sent by the authentication server.
[0192] As an optional implementation of the embodiment of the present disclosure, the client device is also installed with an integrated development environment; the sending unit 61 is specifically used to obtain a debugging request of the integrated development environment through the access plug-in, add the link identifier to the debugging request through the access plug-in to generate the access request, and send the access request to the proxy server through the access plug-in;
[0193] The debugging request is used to request debugging of the target software deployed in the cloud hosting server.
[0194] As an optional implementation of the embodiment of the present disclosure, the receiving unit 62 is specifically configured to receive, through the access plug-in, the access response carrying the debugging data sent by the proxy server;
[0195] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0196] As an optional implementation of the embodiment of the present disclosure, a debugging channel is established between the access plug-in and the integrated development environment; the receiving unit 62 is also used to send the access response carrying the debugging data sent by the proxy server through the access plug-in to the integrated development environment using the debugging channel through the access plug-in; and display the debugging data through the integrated development environment.
[0197] As an optional implementation of the embodiment of the present disclosure, the sending unit 61 is further configured to send a proxy link disconnection request carrying the link identifier and the private key signature to the proxy server in response to a closing operation input to the access plug-in;
[0198] The proxy link disconnection request is used to request the proxy server to disconnect the proxy link corresponding to the link identifier when the private key signature passes the signature verification.
[0199] The present disclosure provides a proxy server. Figure 8 is a schematic diagram of the structure of the proxy server, such as Figure 8 As shown, the proxy server 800 includes:
[0200] The receiving unit 81 is used to receive a proxy link establishment request sent by a client device;
[0201] The processing unit 82 is used to establish a proxy link with the cloud hosting server and generate a corresponding link identifier of the proxy link;
[0202] A sending unit 83, configured to send the link identifier to the client device;
[0203] The receiving unit 81 is further configured to receive an access request carrying the link identifier sent by the client device;
[0204] The sending unit 83 is further configured to send the access request to the cloud hosting server through the proxy link if the link identifier passes the verification;
[0205] The receiving unit 81 is further configured to receive an access response corresponding to the access request sent by the cloud hosting server;
[0206] The sending unit 83 is further configured to send the access response to the client device.
[0207] As an optional implementation of the embodiment of the present disclosure, the proxy link establishment request also carries a private key signature; the processing unit 82 is specifically used to establish a proxy link with the cloud hosting server when the private key signature passes the signature verification, and generate a corresponding link identifier of the proxy link.
[0208] As an optional implementation of the embodiment of the present disclosure, the access request is used to request the proxy server to debug the target software deployed in the cloud hosting server when the link identifier is verified; the receiving unit 81 is specifically used to receive the access response carrying debugging data sent by the cloud hosting server;
[0209] The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
[0210] As an optional implementation of the embodiment of the present disclosure,
[0211] The receiving unit 81 is further configured to receive a proxy link disconnection request sent by the client device and carrying the link identifier and the private key signature;
[0212] The processing unit 82 is further configured to disconnect the proxy link corresponding to the link identifier when the private key signature passes the signature verification.
[0213] The client device and proxy server provided in this embodiment can execute the server access method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0214] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device. Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as Fig. 9 As shown, the electronic device provided in this embodiment includes: a memory 901 and a processor 902, wherein the memory 901 is used to store a computer program, and the processor 902 is used to execute the server access method provided in the above embodiment when executing the computer program.
[0215] Based on the same inventive concept, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computing device implements the server access method provided in the above embodiment.
[0216] Based on the same inventive concept, an embodiment of the present disclosure further provides a computer program product. When the computer program product is executed on a computer, the computing device implements the server access method provided in the above embodiment.
[0217] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0218] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0219] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0220] Computer readable media include permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0221] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure rather than to limit the same. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A server access method, characterized in that: include: In response to a start operation inputted to the access plug-in, a proxy link establishment request is sent to the proxy server, wherein the proxy link establishment request is used to request the proxy server to establish a proxy link with the cloud hosting server, and return a link identifier corresponding to the proxy link; Receiving a link identifier sent by the proxy server; Sending an access request carrying the link identifier to the proxy server, wherein the access request is used to request the proxy server to send the access request to the cloud hosting server through the proxy link if the link identifier passes verification; An access response corresponding to the access request and sent by the proxy server is received.
2. The method according to claim 1, characterized in that Before sending the proxy link establishment request to the proxy server, the method further includes: Obtaining a private key signature, and adding the private key signature to the proxy link establishment request; The proxy link establishment request is specifically used to establish a proxy link with the cloud hosting server when the private key signature passes the verification, and return a link identifier corresponding to the proxy link.
3. The method according to claim 1, characterized in that: The client device is also installed with an integrated development environment; the sending of the access request carrying the link identifier to the proxy server includes: Obtaining a debugging request of the integrated development environment through the access plug-in, wherein the debugging request is used to request debugging of target software deployed in the cloud hosting server; The access request is generated by adding the link identifier to the debugging request through the access plug-in, and the access request is sent to the proxy server through the access plug-in.
4. The method according to claim 3, characterized in that The receiving the access response sent by the proxy server includes: Receiving, through the access plug-in, the access response carrying the debugging data sent by the proxy server; The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
5. The method according to claim 4, characterized in that A debugging channel is established between the access plug-in and the integrated development environment; after receiving the access response carrying the debugging data sent by the proxy server through the access plug-in, the method further includes: sending the access response to the integrated development environment using the debug channel through the access plug-in; The debugging data is displayed through the integrated development environment.
6. The method according to claim 2, characterized in that The method further comprises: In response to a closing operation input to the access plug-in, sending a proxy link disconnection request carrying the link identifier and the private key signature to the proxy server; The proxy link disconnection request is used to request the proxy server to disconnect the proxy link corresponding to the link identifier when the private key signature passes the verification.
7. A server access method, characterized in that: include: receiving a proxy link establishment request sent by a client device; In response to the proxy link establishment request, establish a proxy link with the cloud hosting server, and generate a corresponding link identifier of the proxy link; Sending the link identifier to the client device; Receiving an access request carrying the link identifier sent by the client device; In the case where the link identifier passes the verification, sending the access request to the cloud hosting server through the proxy link; Receiving an access response corresponding to the access request sent by the cloud hosting server; The access response is sent to the client device.
8. The method according to claim 7, characterized in that The proxy link establishment request also carries a private key signature; the response to the proxy link establishment request establishes a proxy link with the cloud hosting server and generates a corresponding link identifier of the proxy link, including: When the private key signature passes the signature verification, a proxy link is established with the cloud hosting server, and a corresponding link identifier of the proxy link is generated.
9. The method according to claim 7, characterized in that: The access request is used to request the proxy server to debug the target software deployed in the cloud hosting server if the link identifier passes the verification; The receiving an access response corresponding to the access request sent by the cloud hosting server includes: Receiving the access response carrying the debugging data sent by the cloud hosting server; The debugging data is data obtained by the cloud hosting server debugging the target software deployed in the cloud hosting server based on the debugging request.
10. The method according to claim 9, characterized in that The method further comprises: Receiving a proxy link disconnection request sent by the client device and carrying the link identifier and the private key signature; When the private key signature passes the signature verification, the proxy link corresponding to the link identifier is disconnected.
11. A client device, characterized in that: include: A sending unit, configured to send a proxy link establishment request to a proxy server in response to a start operation inputted to the access plug-in, wherein the proxy link establishment request is used to request the proxy server to establish a proxy link with a cloud hosting server, and return a link identifier corresponding to the proxy link; A receiving unit, configured to receive a link identifier sent by the proxy server; The sending unit is further configured to send an access request carrying the link identifier to the proxy server, wherein the access request is used to request the proxy server to send the access request to the cloud hosting server through the proxy link when the link identifier is verified, receive an access response corresponding to the access request sent by the cloud hosting server, and return the access response; The receiving unit is further configured to receive the access response sent by the proxy server.
12. A proxy server, characterized in that: include: A receiving unit, configured to receive a proxy link establishment request sent by a client device; A processing unit, configured to establish a proxy link with a cloud hosting server and generate a corresponding link identifier of the proxy link; A sending unit, configured to send the link identifier to the client device; The receiving unit is further configured to receive an access request carrying the link identifier sent by the client device; The sending unit is further configured to send the access request to the cloud hosting server through the proxy link if the link identifier passes the verification; The receiving unit is further configured to receive an access response corresponding to the access request sent by the cloud hosting server; The sending unit is further configured to send the access response to the client device.
13. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the server access method according to any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the server access method according to any one of claims 1 to 10 is implemented.
