Disclosure of Invention
The technical problem to be solved by the present invention is to provide an intelligent client proxy method, which can forward a user request to a cloud product through a proxy server in a proxy manner to solve the problem of user access timeout, aiming at the above defects in the prior art.
According to the invention, the intelligent agent method for the client comprises the following steps:
the first step is as follows: executing batch processing at a user client, and judging network quality by the user client according to ip addresses of a plurality of proxy servers in the batch processing, wherein the batch processing automatically sets proxy configuration of a user browser;
the second step is as follows: starting a user browser, and reading an agent automatic configuration PAC file from an agent server on line by the user browser according to agent configuration;
the third step: caching the PAC file to the local by the user browser;
the fourth step: the user browser judges the domain name in the user request according to the content of the PAC file and determines the domain name to be forwarded;
the fifth step: a user initiates a request;
a sixth step: the request data is forwarded to the proxy server side;
a seventh step of: and the proxy server directly forwards the request of the user to the real WEB server according to the determined domain name to be forwarded.
Preferably, the client-side intelligent agent method is used for realizing access agent under the condition of accessing a cloud product.
Preferably, the client-side intelligent agent method performs an intranet penetration function.
Preferably, the proxy server is implemented by the open source software require.
Preferably, the proxy server may be one or more of an arry cloud proxy server, a hua cloud proxy server, a sky cloud proxy server, and the like.
Preferably, the proxy server forwards the user's request directly to the real WEB server via a WEB application prevention system (WAF).
The invention can intelligently select routes, realize that the user can not directly access the cloud product through forward proxy, realize forward proxy on the appointed domain name, and forward the request of the user to the cloud product through the proxy server in a proxy mode to solve the problem of overtime access of the user.
Detailed Description
In order that the present disclosure may be more clearly and readily understood, reference will now be made in detail to the present disclosure as illustrated in the accompanying drawings.
In the present invention, the intelligent agent consists of both a client batch script and a forward agent. The batch processing is carried out for intelligently selecting routes and downloading configuration files of the proxy server side according to the user network, and proxy forwarding is carried out on the appointed request; the proxy server is responsible for forwarding the user request to the cloud product website.
Specifically, fig. 1 schematically shows a flowchart of a client-side intelligent agent method according to a preferred embodiment of the present invention, and fig. 2 schematically shows a schematic diagram of a principle of the client-side intelligent agent method according to a preferred embodiment of the present invention. The client intelligent agent method according to the preferred embodiment of the invention can realize the intranet penetration function. The client intelligent agent method of the preferred embodiment of the invention is used for realizing access agent under the condition of accessing cloud products.
As shown in fig. 1 and 2, the client-side intelligent agent method according to the preferred embodiment of the present invention includes:
first step S1: executing batch processing at a user client, and judging network quality by the user client according to ip addresses of a plurality of proxy servers in the batch processing, wherein the batch processing automatically sets proxy configuration of a user browser;
wherein, the batch processing is a script file under Windows; by double-clicking the file, or entering the file name in the command line, the contents thereof can be executed line by line.
Second step S2: starting a user browser, and reading an agent automatic configuration PAC file from an agent server on line by the user browser according to agent configuration;
third step S3: caching the PAC file to the local by the user browser;
fourth step S4: the user browser judges the domain name in the user request according to the content of the PAC file, and determines the domain name to be forwarded (only the domain name which meets the requirement of proxy is forwarded);
the PAC file contains a JavaScript-form function "FindProxyForURL (url, host)". This function returns a string containing one or more access rules. The user agent adapts a particular agent or direct access according to these rules. Multiple access rules provide other backup access methods when a proxy server is not available to respond. The browser first accesses this PAC file before accessing other pages. The URL in the PAC file may be manually configured or may be automatically configured through a Web Proxy self discovery Protocol (Web Proxy automatic discovery Protocol) of the Web page.
The above-described first step S1 to fourth step S4 are processed for the setting of the agent as a preliminary stage.
Fifth step S5: a user initiates a request (e.g., requests access to a cloud product);
sixth step S6: the request data is forwarded to the proxy server side;
seventh step S7: and the proxy server directly forwards the request of the user to the real WEB server according to the determined domain name to be forwarded.
Preferably, the proxy server forwards the user's request directly to the real WEB server via a WEB application prevention system (WAF).
Specifically, for example, the proxy server is implemented by an open source software request supporting HTTP, HTTPs, FTP, or other protocols, and is used to help the user access the internet, as shown in fig. 3.
For example, the proxy server may be one or more of an arri cloud proxy server, a hua cloud proxy server, a sky cloud proxy server, and the like.
According to the invention, through the intelligent agent device, the user can access the cloud product in an agent mode when the user cannot directly access the cloud product.
The invention can intelligently select routes, realize that the user can not directly access the cloud product through forward proxy, realize forward proxy on the appointed domain name, and forward the request of the user to the cloud product through the proxy server in a proxy mode to solve the problem of overtime access of the user.
It should be noted that the terms "first", "second", "third", and the like in the description are used for distinguishing various components, elements, steps, and the like in the description, and are not used for indicating a logical relationship or a sequential relationship between the various components, elements, steps, and the like, unless otherwise specified.
It is to be understood that while the present invention has been described in conjunction with the preferred embodiments thereof, it is not intended to limit the invention to those embodiments. It will be apparent to those skilled in the art from this disclosure that many changes and modifications can be made, or equivalents modified, in the embodiments of the invention without departing from the scope of the invention. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.