A proxy control method, client device and proxy service device

By loading the proxy plug-in on the browser, it automatically obtains the proxy configuration file and configures it, and solves the problem of accuracy and inefficiency of manual configuration, improving the efficiency and security of proxy services.

CN113391851BActive Publication Date: 2025-01-07CHINANETCENT TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110617129.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-03
Publication Date
2025-01-07
Estimated Expiration
2041-06-03

AI Technical Summary

Technical Problem

The existing method of manually configuring the proxy server has problems of accuracy risks and low efficiency, resulting in wasted proxy server resources and transmission efficiency.

Method used

By loading the proxy plug-in on the browser, the proxy configuration file is automatically sent to the proxy server to obtain the authentication credentials and perform proxy configuration. Only forward the proxy to the specified source server, and periodically update the authentication credentials to ensure the latest configuration file. .

Benefits of technology

Improves the efficiency of proxy configuration and browser proxy services, reduces the processing pressure of proxy servers, and enhances the security of access sessions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113391851B_ABST
    Figure CN113391851B_ABST
Patent Text Reader

Abstract

The present invention discloses a proxy control method, a client device and a proxy service device, wherein the proxy control method comprises: after the browser completes loading of the proxy plug-in, sending a proxy configuration file acquisition request to the proxy server, wherein the proxy configuration file acquisition request carries an authentication credential; receiving a proxy configuration file corresponding to the authentication credential returned by the proxy server, performing proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, opening a proxy service for the browser, so that the browser forwards user requests based on the proxy configuration. The proxy control method disclosed by the present invention not only overcomes the problem of easy misoperation when manually configuring the forwarding target of the proxy server on the browser in the prior art, but also improves the configuration efficiency and the service efficiency of the browser proxy service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of proxy services, and in particular to a proxy control method, a client device and a proxy service device. Background Art

[0002] When a proxy server is used to provide proxy services to a browser, after the browser successfully requests the proxy service from the proxy server, all access requests sent by the browser will be forwarded by the proxy server, while some access requests do not need to be proxied by the proxy server, resulting in a waste of proxy server resources, adding unnecessary processing pressure to the proxy server, and also affecting the transmission efficiency of these access requests. The existing solution is to manually configure the service target of the proxy server on the browser, but this manual configuration method relies on the correct operation of the user, and the configuration information cannot be flexibly adjusted according to demand, which is inefficient. Summary of the invention

[0003] In order to solve the problem that the accuracy of proxy control in the existing method of manually configuring the service target of the proxy server on the browser is at risk, and the configuration information cannot be flexibly adjusted, thereby affecting the efficiency of the proxy service, the embodiments of the present invention provide a proxy control method, a client device and a proxy service device.

[0004] In a first aspect, an embodiment of the present invention provides an agent control method, which is applied to an agent plug-in, and the method includes:

[0005] When the browser completes loading of the proxy plug-in, it sends a request for obtaining a proxy configuration file to the proxy server, wherein the request for obtaining the proxy configuration file carries the authentication credentials;

[0006] Receive a proxy configuration file corresponding to the authentication credential returned by the proxy server, perform proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, enable the proxy service for the browser so that the browser forwards the user request based on the proxy configuration.

[0007] In the proxy control method provided by the embodiment of the present invention, after the browser completes loading of the proxy plug-in, the proxy plug-in automatically sends a proxy configuration file acquisition request to the proxy server, the proxy configuration file acquisition request carries an authentication credential, and the proxy plug-in receives the proxy configuration file corresponding to the authentication credential returned by the proxy server, wherein the proxy configuration file includes the source server information of the proxy server providing the proxy service, and then the proxy plug-in performs proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, the proxy service is enabled for the browser, and then the browser can forward the user request based on the proxy configuration. Compared with the prior art, the present invention realizes automatic acquisition of the proxy configuration file and performs proxy configuration for the browser through the proxy plug-in, and then enables the proxy function of the browser, which not only realizes forwarding of the access request of the source server contained in the proxy configuration file, but also overcomes the problem of easy misoperation when manually configuring the forwarding target of the proxy server on the browser in the prior art, thereby improving the configuration efficiency and the service efficiency of the browser proxy service.

[0008] In a possible implementation manner, before sending a request for obtaining a proxy configuration file to a proxy server, the method further includes:

[0009] Obtaining the authentication credentials authorized by the proxy server from the Cookie information list cached by the browser;

[0010] If the authentication credential is obtained, the step of sending a request to obtain a proxy configuration file is executed;

[0011] If the authentication credential is not obtained, a login authentication prompt is displayed to the user through the browser, and after the login authentication is completed, the step of obtaining the authentication credential is returned to be executed.

[0012] In a possible implementation manner, after enabling the proxy service for the browser, the method further includes:

[0013] Periodically obtaining the authentication credential from the Cookie information list;

[0014] When it is determined that the acquired authentication credential is updated, a request is made to the proxy server for a proxy configuration file corresponding to the updated authentication credential, so as to reconfigure the proxy for the browser.

[0015] In a possible implementation manner, the method further includes:

[0016] If the authentication credential is not obtained, the proxy service is closed.

[0017] In a possible implementation, the authentication credential is generated by the browser based on the login response information sent by the proxy server and is stored in the Cookie information list.

[0018] In a possible implementation manner, the proxy configuration file is determined by the proxy server based on the authentication credential.

[0019] In a second aspect, an embodiment of the present invention provides a proxy control method, which is applied to a proxy server, and the method includes:

[0020] Receiving a proxy configuration file acquisition request sent by a proxy plug-in loaded by a browser, wherein the proxy configuration file acquisition request carries an authentication credential;

[0021] The proxy configuration file corresponding to the authentication credential is returned to the proxy plug-in, so that the proxy plug-in performs proxy configuration on the browser based on the proxy configuration file and starts the proxy service for the browser, so that the browser forwards the user request based on the proxy configuration.

[0022] In the proxy configuration method provided by the embodiment of the present invention, the proxy server generates an authentication credential and a proxy configuration file after performing identity authentication on the user requesting the proxy in advance. The proxy configuration file includes the source server information of the proxy server providing the proxy service for the user, and establishes a mapping relationship between the authentication credential and the proxy configuration file corresponding to the user authentication information. When the proxy server receives the proxy configuration file acquisition request carrying the authentication credential sent by the proxy plug-in loaded by the browser, the proxy configuration file acquisition request carries the authentication credential, and the proxy server returns the proxy configuration file corresponding to the authentication credential to the proxy plug-in. Then, the proxy plug-in can perform proxy configuration on the browser based on the proxy configuration file, and start the proxy server for the browser. Then, the browser forwards the user request based on the proxy configuration file. Compared with the prior art, in the present invention, the proxy plug-in loaded on the browser requests the proxy server to obtain the proxy configuration file, and the proxy plug-in automatically obtains the proxy configuration file and performs proxy configuration on the browser. Then, the proxy function of the browser is started by the proxy plug-in, thereby realizing forwarding the access request of the source server contained in the proxy configuration file only. While overcoming the problem that the forwarding target of the proxy server is easily misoperated when manually configuring the proxy server on the browser in the prior art, the configuration efficiency is improved, and the service efficiency of the browser proxy service is improved. Furthermore, since the proxy server returns the corresponding proxy configuration file to the proxy plug-in only when the proxy plug-in sends the authentication credentials, the security of the access session is guaranteed.

[0023] In a possible implementation manner, the authentication credential is obtained by the proxy plug-in from a cookie information list cached by the browser;

[0024] Before returning the proxy configuration file corresponding to the authentication credential to the proxy plug-in, the method further includes:

[0025] The proxy configuration file acquisition request is verified based on the authentication credential, and if it is determined that the verification is successful, the proxy configuration file corresponding to the authentication credential is returned to the proxy plug-in.

[0026] In one possible implementation, the authentication credential is generated by the browser based on the login response information sent by the proxy server and saved in the cookie information list, wherein, after receiving the login request sent by the browser, the proxy server performs authentication based on the user authentication information carried in the login request, and after the authentication is passed, generates the authentication credential and responds to the browser.

[0027] The technical effects of the proxy control method implemented on the proxy server side provided by the present invention can refer to the technical effects of the above-mentioned first aspect or each implementation method of the first aspect, which will not be repeated here.

[0028] In a third aspect, an embodiment of the present invention provides a client device, on which a browser is running, and a proxy plug-in is loaded in the browser, wherein the proxy plug-in is used to implement the agent control method described in the present invention.

[0029] In a fourth aspect, an embodiment of the present invention provides a proxy service device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the proxy control method described in the present invention when executing the program.

[0030] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0032] Figure 1 A schematic diagram of an application scenario of the proxy control method provided by an embodiment of the present invention;

[0033] Figure 2 A schematic diagram of an implementation flow of an agent control method provided by an embodiment of the present invention;

[0034] Figure 3 A schematic diagram of an implementation flow of a proxy server performing login authentication on a user provided by an embodiment of the present invention;

[0035] Figure 4 A schematic diagram of an implementation flow of an agent control method provided by an embodiment of the present invention;

[0036] Figure 5 A schematic diagram of an implementation flow of an agent control method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to solve the problem in the background technology, the embodiment of the present invention provides an agent control method, a client device and an agent service device.

[0038] The preferred embodiments of the present invention are described below in conjunction with the drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other if there is no conflict.

[0039] First reference Figure 1 , which is a schematic diagram of an application scenario of the proxy control method provided by an embodiment of the present invention. A browser is running on the client 11. When the user 10 needs to enable a proxy service for the browser running on the client 11, a proxy plug-in can be installed on the browser running on the client 11. After the installation and loading of the proxy plug-in are completed, the proxy plug-in can automatically send a request for obtaining a proxy configuration file carrying an authentication credential to the proxy server 12. The proxy server 12 returns a proxy configuration file corresponding to the authentication credential to the proxy plug-in, wherein the proxy configuration file includes the source server information of the proxy server 12 providing a proxy service for the user corresponding to the authentication credential.

[0040] The proxy plug-in can perform proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, enable the proxy service for the browser so that the browser forwards user requests based on the proxy configuration.

[0041] Among them, the authentication credential is an authentication credential authorized by the proxy server 12 obtained by the proxy plug-in from the Cookie information list cached by the browser. If the proxy plug-in obtains the authentication credential, the above-mentioned step of sending a proxy configuration file acquisition request to the proxy server 12 is executed. If the proxy plug-in does not obtain the authentication credential, the proxy plug-in can close the enabled proxy service and display a login authentication prompt to the user through the browser. After the user login authentication is completed, the authentication credential authorized by the proxy server 12 is obtained again from the Cookie information list cached by the browser until a valid authentication credential is successfully obtained.

[0042] When the proxy plug-in requests the proxy server 12 to obtain the proxy configuration file, the proxy server 12 may verify the authentication credentials. If it is determined that the verification is successful, the proxy configuration file corresponding to the authentication credentials is returned to the proxy plug-in.

[0043] In one implementation, after the proxy plug-in enables the proxy service for the browser, it can also periodically obtain authentication credentials from the cookie information list cached by the browser. When the obtained authentication credentials are updated, the proxy server 12 is re-requested for the proxy configuration file corresponding to the updated authentication credentials to re-configure the browser as a proxy. Based on this, the proxy plug-in can periodically check the authentication credentials to ensure that the latest proxy configuration file is obtained in a timely manner.

[0044] In this application scenario, the client 11 and the proxy server 12 are connected to each other through a network, which may be a local area network, a wide area network, the Internet, or the like.

[0045] The client 11 can be a terminal device with a browser installed (for example, a smart phone, a tablet, a laptop, a personal computer (PC, Personal Computer), etc.). The proxy server 12 can be any server that can provide proxy services, a server cluster consisting of several servers, or a cloud computing center, and the source server can be an application server that provides content services. In one implementation, the source server can be deployed in a local area network, and the proxy server 12 can exchange data with the source server based on a VPN (Virtual Private Network) network, wherein the VPN network can be a secure acceleration network implemented based on SD-WAN (Software-Defined Wide Area Network) technology.

[0046] Based on the above application scenarios, the following will refer to the attached Figures 2 to 4 Describing the exemplary embodiments of the present invention in more detail, it is understood that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present invention, and the embodiments of the present invention are not limited in any way. On the contrary, the embodiments of the present invention can be applied to any applicable scenario.

[0047] like Figure 2 As shown, it is a schematic diagram of an implementation flow of an agent control method provided by an embodiment of the present invention. The agent control method, applied in the above application scenario, may include the following steps:

[0048] S21. When the browser completes loading of the proxy plug-in, the proxy plug-in obtains the authentication credentials authorized by the proxy server from the cookie information list cached by the browser. If the authentication credentials are obtained, steps S22 to S25 are executed in sequence. If the authentication credentials are not obtained, step S27 is executed.

[0049] In the specific implementation, when the user needs to enable the proxy service for the browser, the proxy plug-in can be installed on the browser running on the client. When the browser completes loading the proxy plug-in, the proxy plug-in can automatically query the authentication credentials that meet the preset conditions from the cookie information list cached locally in the browser.

[0050] The authentication credentials are generated by the browser based on the login response information sent by the proxy server and saved in the local cookie information list. Specifically, the authentication credentials are generated by the proxy server after completing the user identity authentication, and the authentication credentials are carried in the login response information and sent to the client browser. In one implementation, the proxy server can send the authentication credentials to the client browser in the form of a Cookie setting item (set-Cookie), so that the browser generates corresponding Cookie information based on the Cookie setting item, and caches it in the local Cookie information list as the authentication credentials.

[0051] Among them, when the proxy server generates the authentication credential, it can calculate a uniquely identifiable character string of specified length according to a preset algorithm, for example, encrypt the user identity information based on an encryption algorithm, or calculate a character string of specified length based on the user identity information and the login request time, or calculate a character string of specified length based on a random algorithm, as part of the content value of the authentication credential, and the authentication credential can be set according to a preset format. Specifically, the authentication credential can be saved as the "value" corresponding to the specified "name" in the Cookie information, wherein the specified name is pre-negotiated with the proxy server. For example, when the proxy server generates a Cookie setting item, the specified Cookie name is "slweb_id", and the corresponding value is a uniquely identifiable 32-bit character string "db065cab0F628bf1695ddbf3ceb80c03" generated based on a random algorithm. Then the Cookie information generated and saved by the browser based on the Cookie setting item may include:

[0052] slweb_id=db065cab0F628bf1695ddbf3ceb80c03

[0053] When obtaining authentication credentials, the proxy plug-in can query the Cookie value named "slweb_id" from the Cookie information list as the authentication credential. When the query result is empty, it means that the authentication credential cannot be obtained.

[0054] In one embodiment, when the proxy server generates the Cookie setting item, it can also specify the validity period to indicate the validity period of the Cookie information. Therefore, when the browser generates the corresponding Cookie information based on the Cookie setting item, it will record the corresponding validity period. In other words, the validity period of the authentication credential is saved in the Cookie information list. When the proxy plug-in queries the authentication credential, it can further determine whether the authentication credential has expired based on the current system time and the validity period of the authentication credential. If it has expired, it means that the authentication credential is invalid. Otherwise, it is valid. It can be understood that if the authentication credential is invalid, it is determined that the proxy plug-in cannot obtain the authentication credential.

[0055] It is worth noting that in order to facilitate the subsequent verification of the proxy configuration file acquisition request, the proxy server can save the mapping relationship between the authentication credential and the proxy configuration file corresponding to the user authentication information after generating the authentication credential, so as to facilitate the subsequent verification of the authentication credential and quickly obtain the proxy configuration file corresponding to the authentication credential. In one implementation, the technician can send the proxy configuration file of each user to the proxy server through the background management service. When the proxy server generates the authentication credential, it can determine the corresponding proxy configuration file according to the user authentication information and save the proxy configuration file in the mapping relationship, that is, the proxy server saves the mapping relationship between the authentication credential and the proxy configuration file corresponding to the user authentication information.

[0056] In one implementation, the proxy configuration file can be implemented based on a PAC (Proxy Auto Config) script file, specifically including the application protocol (http / https) of the proxy server, the IP address of the proxy server, the port of the proxy server, and the proxy service information provided by the proxy server for the user, wherein the proxy service information is used to indicate the scope of the proxy, and specifically may include the source server information that provides the proxy service or the source server information that does not provide the proxy service, and the source service information may include but is not limited to one or more of the following information: the IP (Internet Protocol) address information, domain name information, request type information, etc. of the source server. It is worth noting that in the subsequent steps, when the browser forwards the user request based on the proxy configuration, it is necessary to determine whether to forward the user request to the proxy server based on the proxy service information. Therefore, by setting the proxy service information, the proxy scope can be controlled, thereby reducing the processing pressure of the proxy server.

[0057] S22. The proxy plug-in sends a request for obtaining a proxy configuration file to the proxy server. The request for obtaining the proxy configuration file carries an authentication credential.

[0058] In specific implementation, the proxy plug-in carries the valid authentication credentials obtained from the cookie information list cached by the browser in the proxy configuration file acquisition request and sends it to the proxy server.

[0059] S23. The proxy server verifies the request for obtaining the proxy configuration file based on the authentication credentials. If it is determined that the verification is successful, steps S24 to S25 are executed in sequence. Otherwise, steps S26 to S27 are executed in sequence.

[0060] During specific implementation, the proxy server may verify the legitimacy of the proxy configuration file acquisition request in the following manner: the proxy server detects whether the proxy configuration file acquisition request carries a valid authentication credential; if so, it is determined that the proxy configuration file acquisition request is legal and that the verification of the proxy configuration file acquisition request has passed; if not, it is determined that the proxy configuration file acquisition request is illegal and that the verification of the proxy configuration file acquisition request has failed.

[0061] Specifically, the proxy server detects whether the proxy configuration file acquisition request carries a valid authentication credential in the following manner: if the proxy configuration file acquisition request carries an authentication credential, and the authentication credential is an authentication credential provided by the proxy server to the browser and has not expired, then it is determined that the proxy configuration file acquisition request carries a valid authentication credential. In implementation, after obtaining the authentication credential carried in the proxy configuration file acquisition request, the proxy server can query a mapping relationship stored locally based on the authentication credential to determine whether the authentication credential is generated by the proxy server. If the mapping relationship corresponding to the authentication credential is stored locally, it can be determined that the authentication credential is generated by the proxy server.

[0062] During the implementation process, if the proxy server determines that the authentication credentials are invalid, it means that the user authentication is invalid. If the user has not logged in for authentication, or the authentication has expired, he needs to log in again for authentication. The proxy server returns a proxy configuration file acquisition failure response message to the proxy plug-in to prompt the user that he needs to log in again for authentication.

[0063] S24. The proxy server returns a proxy configuration file corresponding to the authentication credential to the proxy plug-in.

[0064] In specific implementation, the proxy configuration file is determined by the proxy server based on the authentication credentials. If the verification is determined to be successful, the proxy server searches for the proxy configuration file corresponding to the authentication credentials from the saved mapping relationship and returns the found proxy configuration file to the proxy plug-in.

[0065] S25. The proxy plug-in performs proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, enables the proxy service for the browser, so that the browser forwards the user request based on the proxy configuration.

[0066] In a specific implementation, before the proxy plug-in performs proxy configuration on the browser based on the proxy configuration file, it can first check whether the browser's proxy service is turned on. If it is turned on, it will be turned off first, and then after the proxy configuration is completed, the proxy service will be turned on again, thereby ensuring that the browser will only proxy user requests according to the proxy configuration completed by the proxy plug-in during the operation of the proxy plug-in. In one implementation, when the proxy plug-in is loaded and starts running, the browser's proxy service can be checked first. If it is found that the proxy service is turned on, it can be turned off first to ensure that the browser will no longer forward user requests to the proxy server before executing the new proxy configuration, thereby reducing the processing pressure on the proxy server.

[0067] S26. The proxy server returns a proxy configuration file acquisition failure response message to the proxy plug-in to prompt the user that a new login authentication is required.

[0068] S27. The proxy plug-in displays a login authentication prompt to the user through the browser, and after the login authentication is completed, returns to the step of obtaining the authentication credential in step S21.

[0069] When implementing it, Figure 3 As shown, it is a schematic diagram of the implementation process of the proxy server performing login authentication on the user, including the following steps S271~S274:

[0070] S271. If the proxy plug-in fails to obtain the authentication credentials authorized by the proxy server from the cookie information list cached by the browser or receives a response message of failure to obtain the proxy configuration file returned by the proxy server, the proxy plug-in displays a login authentication prompt to the user through the browser.

[0071] During specific implementation, if the proxy plug-in fails to obtain the authentication credentials authorized by the proxy server from the cookie information list cached by the browser, or the authentication is invalid, re-login for authentication is required. At this time, the proxy plug-in can display a login authentication prompt to the user through the browser, prompting the user to access the login authentication page provided by the proxy server for login authentication.

[0072] Specifically, the browser may display the login authentication entry indicated by the proxy plug-in icon, such as by changing the color of the plug-in icon to prompt the user that login authentication is required. The user clicks the plug-in icon to enter the login authentication page provided by the proxy server, that is, the plug-in icon may be linked to the login authentication page. A login reminder notification may also be sent to the user, and the user directly enters the URL (Uniform Resource Locator) address of the login authentication page on the browser to enter the login authentication page and enter the user authentication information, i.e., the user name and password. The specific user authentication information content may be set according to actual needs, and the embodiment of the present invention does not limit this.

[0073] S272. The browser receives the user authentication information input by the user, and sends a login request carrying the user authentication information to the proxy server.

[0074] In specific implementation, the browser receives the user name and password input by the user, carries the user name and password in a login request and sends it to the proxy server, which performs authentication.

[0075] S273. The proxy server generates a corresponding authentication credential based on the user authentication information, and saves a mapping relationship between the authentication credential and the proxy configuration file corresponding to the user authentication information.

[0076] In specific implementation, after receiving the login request sent by the browser, the proxy server can first authenticate the user identity based on the user authentication information in the login request. After the authentication is passed, the corresponding authentication credentials can be generated for this login, and the mapping relationship between the authentication credentials and the proxy configuration file corresponding to the user authentication information can be saved. The proxy configuration file corresponding to the user authentication information can be pre-sent to the proxy server by the background management service, or generated in real time by the proxy server based on the latest proxy rules corresponding to the user authentication information. The process of generating the authentication credentials has been explained in step S21 and will not be repeated here.

[0077] S274. The proxy server responds to the login request and carries the authentication credentials in the response information, and returns the response message to the browser.

[0078] Further, the browser caches the authentication credentials in the Cookie information list, and the proxy plug-in returns to execute the step of obtaining the authentication credentials in step S21.

[0079] It can be understood that, in actual application, the proxy configuration file corresponding to the user can be adjusted according to actual needs. In one implementation, the proxy server can receive the modified content of the proxy configuration file corresponding to each user from the background management service. When the proxy server determines that the proxy configuration file corresponding to the user authentication information is modified, it can return a prompt message to the client browser to prompt the user to re-login and authenticate. After receiving the prompt message, the browser can force the user to complete the login process again, so that the proxy server can regenerate new authentication credentials, update the mapping relationship between the new authentication credentials and the updated proxy configuration file corresponding to the user authentication information, and return a response message carrying the updated authentication credentials to the browser, so that the browser stores the updated authentication credentials in the cookie information list to update the authentication credentials in the cookie information list.

[0080] Based on this, in order to further ensure the validity of the authentication credentials, after the proxy service is turned on for the browser, the proxy plug-in can periodically obtain the authentication credentials authorized by the proxy server from the Cookie information list, and determine whether the authentication credentials are updated. When it is determined that the obtained authentication credentials are updated, the proxy configuration file corresponding to the updated authentication credentials is requested from the proxy server, and then the browser is reconfigured as a proxy, wherein the period for obtaining the authentication credentials can be set by oneself, and the example of the present invention is not limited. If the authentication credentials are not obtained, the proxy plug-in closes the proxy service.

[0081] It can be seen that compared with the prior art, the embodiment of the present invention, by installing and loading the proxy plug-in on the browser, automatically obtaining the proxy configuration file and configuring the proxy for the browser through the proxy plug-in, and then opening the proxy function of the browser through the proxy plug-in, thereby realizing forwarding the access request of the source server contained in the proxy configuration file only, while overcoming the prior art that the forwarding target of the proxy server is easily misoperated when manually configuring the proxy server on the browser, improves the configuration efficiency, and improves the service efficiency of the browser proxy service. And based on the authentication credentials generated by the proxy server, the legitimacy of the proxy configuration file acquisition request sent by the browser is verified, which can ensure the security of network access to a certain extent. At the same time, the identity authentication and proxy function are automatically realized through the proxy plug-in, and the user authentication information (i.e., the user name and password provided by the proxy server) does not need to be pre-configured on the browser. Only login authentication is required. Login authentication requires the user to manually enter the user name and password, and there is no risk of leakage. After the authentication is successful, the proxy server generates the corresponding authentication credentials, and the authentication credentials are automatically obtained through the proxy plug-in of the browser. After the proxy configuration file is automatically obtained from the proxy server through the proxy plug-in, the proxy function of the proxy plug-in automatically takes effect, thereby improving the security and service efficiency of the browser proxy service.

[0082] Based on the same inventive concept, an embodiment of the present invention also provides a proxy control method implemented on the proxy plug-in side. Since the principle of solving the problem by the proxy control method implemented on the proxy plug-in side is similar to that of the above-mentioned proxy control method, the implementation of the proxy control method implemented on the above-mentioned proxy plug-in side can refer to the implementation of the above-mentioned proxy control method, and the repeated parts will not be repeated.

[0083] like Figure 4 As shown, it is a schematic diagram of an implementation flow of an agent control method provided by an embodiment of the present invention. The agent control method, applied to an agent plug-in, may include the following steps:

[0084] S31. After the browser completes loading of the proxy plug-in, the proxy plug-in sends a request for obtaining a proxy configuration file to the proxy server, wherein the request for obtaining the proxy configuration file carries an authentication credential.

[0085] S32. The proxy plug-in receives the proxy configuration file corresponding to the authentication credential returned by the proxy server, performs proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, enables the proxy service for the browser, so that the browser forwards the user request based on the proxy configuration.

[0086] Optionally, before sending a request to the proxy server to obtain a proxy configuration file, the method further includes:

[0087] Obtaining the authentication credentials authorized by the proxy server from the Cookie information list cached by the browser;

[0088] If the authentication credential is obtained, the step of sending a request to obtain a proxy configuration file is executed;

[0089] If the authentication credential is not obtained, a login authentication prompt is displayed to the user through the browser, and after the login authentication is completed, the step of obtaining the authentication credential is returned to be executed.

[0090] Optionally, after enabling the proxy service for the browser, the method further includes:

[0091] Periodically obtaining the authentication credential from the Cookie information list;

[0092] When it is determined that the acquired authentication credential is updated, a request is made to the proxy server for a proxy configuration file corresponding to the updated authentication credential, so as to reconfigure the proxy for the browser.

[0093] Optionally, the method further includes:

[0094] If the authentication credential is not obtained, the proxy service is closed.

[0095] Preferably, the authentication credential is generated by the browser based on the login response information sent by the proxy server and stored in the Cookie information list.

[0096] Preferably, the proxy configuration file is determined by the proxy server based on the authentication credential.

[0097] Based on the same inventive concept, an embodiment of the present invention also provides a proxy control method implemented on a proxy server side. Since the principle of solving the problem by the proxy control method implemented on the proxy server side is similar to that of the above-mentioned proxy control method, the implementation of the proxy control method implemented on the above-mentioned proxy server side can refer to the implementation of the above-mentioned proxy control method, and the repeated parts will not be repeated.

[0098] like Figure 5 As shown, it is a schematic diagram of an implementation flow of a proxy control method provided by an embodiment of the present invention. The proxy control method, applied to a proxy server, may include the following steps:

[0099] S41. The proxy server receives a proxy configuration file acquisition request sent by a proxy plug-in loaded by a browser, wherein the proxy configuration file acquisition request carries an authentication credential.

[0100] S42. The proxy server returns a proxy configuration file corresponding to the authentication credential to the proxy plug-in, so that the proxy plug-in performs proxy configuration on the browser based on the proxy configuration file and starts a proxy service for the browser, so that the browser forwards the user request based on the proxy configuration.

[0101] Preferably, the authentication credential is obtained by the proxy plug-in from a cookie information list cached by the browser;

[0102] Before returning the proxy configuration file corresponding to the authentication credential to the proxy plug-in, the method further includes:

[0103] The proxy configuration file acquisition request is verified based on the authentication credential, and if it is determined that the verification is successful, the proxy configuration file corresponding to the authentication credential is returned to the proxy plug-in.

[0104] Preferably, the authentication credential is generated by the browser based on the login response information sent by the proxy server and saved in the cookie information list, wherein, after receiving the login request sent by the browser, the proxy server performs authentication based on the user authentication information carried in the login request, and after the authentication is passed, generates the authentication credential and responds to the browser.

[0105] An embodiment of the present invention provides a client device, wherein a browser is running on the client device, and a proxy plug-in is loaded in the browser, wherein the proxy plug-in is used to implement the following Figure 4 The proxy control method shown.

[0106] An embodiment of the present invention provides a proxy service device, the proxy service device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, Figure 5 The proxy control method shown.

[0107] An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions required to execute the above-mentioned processor, which includes a program required to execute the above-mentioned processor.

[0108] In some possible implementations, various aspects of the agent control method provided by the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the agent control method according to various exemplary embodiments of the present invention described above in this specification.

[0109] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0110] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0111] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0113] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0114] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. An agent control method, characterized in that: Applied to a proxy plug-in, the method comprises: After the browser completes loading the proxy plug-in, it sends a proxy configuration file acquisition request to the proxy server, wherein the proxy configuration file acquisition request carries an authentication credential; wherein the authentication credential is generated by the proxy server after receiving the login request sent by the browser, based on the user authentication information carried in the login request, and is responded to the browser in the form of a cookie setting item after the authentication is passed; Receive a proxy configuration file corresponding to the authentication credential returned by the proxy server, perform proxy configuration on the browser based on the proxy configuration file, and after completing the configuration, enable a proxy service for the browser so that the browser forwards user requests based on the proxy configuration, wherein the proxy configuration file is returned by the proxy server after verifying a request to obtain the proxy configuration file based on the authentication credential, and the proxy configuration file is determined by the proxy server based on the authentication credential.

2. The method according to claim 1, characterized in that Before sending a request to the proxy server to obtain the proxy configuration file, it also includes: Obtaining the authentication credentials authorized by the proxy server from the Cookie information list cached by the browser; If the authentication credential is obtained, the step of sending a request to obtain a proxy configuration file is executed; If the authentication credential is not obtained, a login authentication prompt is displayed to the user through the browser, and after the login authentication is completed, the process returns to the step of obtaining the authentication credential.

3. The method according to claim 2, characterized in that After the proxy service is enabled for the browser, the following is also included: Periodically obtaining the authentication credential from the Cookie information list; When it is determined that the obtained authentication credential is updated, requesting the proxy server for a proxy configuration file corresponding to the updated authentication credential to reconfigure the browser as a proxy; If the authentication credential is not obtained, the proxy service is closed.

4. The method according to claim 1, characterized in that The authentication credential is generated by the browser based on the login response information sent by the proxy server and stored in a Cookie information list.

5. An agent control method, characterized in that: Applied to a proxy server, the method comprises: Receiving a proxy configuration file acquisition request sent by a proxy plug-in loaded by a browser, wherein the proxy configuration file acquisition request carries an authentication credential; wherein, after receiving the login request sent by the browser, the proxy server performs authentication based on the user authentication information carried in the login request, and after the authentication is passed, generates the authentication credential and responds to the browser in the form of a cookie setting item; The request for obtaining the proxy configuration file is verified based on the authentication credentials. If it is determined that the verification is successful, the proxy configuration file corresponding to the authentication credentials is returned to the proxy plug-in, so that the proxy plug-in performs proxy configuration on the browser based on the proxy configuration file and starts the proxy service for the browser, so that the browser forwards the user request based on the proxy configuration, wherein the proxy configuration file is determined by the proxy server based on the authentication credentials.

6. The method according to claim 5, characterized in that The authentication credential is obtained by the proxy plug-in from the Cookie information list cached by the browser.

7. The method according to claim 5, characterized in that The authentication credential is generated by the browser based on the login response information sent by the proxy server and stored in a Cookie information list.

8. A client device, characterized in that: A browser is running on the client device, and a proxy plug-in is loaded in the browser, wherein the proxy plug-in is used to implement the proxy control method according to any one of claims 1 to 4.

9. A proxy service device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the agent control method according to any one of claims 5 to 7 when executing the program.

Citation Information

Patent Citations

  • Cloud service security intermediaries and agents

    CN106031118B

  • WEB application access proxy method, device and system based on domain name generic resolution

    CN112702425A