Chrome proxy plug-in development account switching

chrome.webRequest operation flow chart


The first time you connect to a proxy server from chrome, you need user-signed authentication. This will trigger the onAuthRequired event,
The page will pop up a login box asking the user to enter a user name and password. We can handle user signature authentication on onAuthRequired,
This page will not pop-up login box requires the user to manually enter the user name and password.

After the completion of the certification user name and password will be cached in the browser. Next time the proxy connection authentication will automatically use the browser cache user name and user password for authentication. The onAuthRequired event is not fired at this time.

When exiting the current user to switch to another user name login.
Then enter the proxy server signature authentication will automatically use the browser inside the cache user name and password for authentication. If the authentication is successful, the onAuthRequired event will not fire, so the new user name will not be used.

Solve the browser cache proxy server authentication account can not really switch.

Authenticating with a dynamic user name or user password, with the objective of failing backend signing authentication, triggers the onAuthRequired event to use new user name and password authentication.

When the user logs in, generates a dynamic proxy server authentication password.
When the user logs out, the user's authentication password is changed to a new password.
Thus, switching a new user login will trigger the proxy server to fail for the first time that the caching server passed the pass-through password and then proceed
onAuthRequired event. This will use the new user's authentication password.

Show Comments