Skip to content

Testing and clearing HTTP Proxy Authentication

Mari Vihuri Jun 9, 2021 Tutorial

Testing proxy server authentication in your browser can get tricky. Once you've authenticated successfully to a proxy server, most browsers will try to help you by remembering your credentials for the duration of your browser session. That's helpful if you're trying to use a proxy, but not so helpful when you're trying to test proxy authentication.

So how do you force proxy reauthentication?

How to configure a proxy server in Windows and macOS

If you need a refresher on how to configure and connect to a proxy server, take a look at our guides:

If you're using Firefox, you can configure your proxy settings in Firefox directly. If you're using another browser like Chrome, Edge, or Safari, you can configure your proxy settings in your operating system (Windows or macOS), and the proxy will apply system-wide.

Once you've configured your proxy settings and turned the proxy on, visit a website in your browser to trigger an authentication prompt.

Prompt in Google Chrome asking for proxy username & password
Proxy authentication prompt

If you want to learn more about HTTP Proxy Authentication, Proxy-Authenticate and Proxy-Authorization are a good place to start.

Why deleting proxy credentials from your browser's password manager isn't enough

Once you authenticate to a proxy server successfully, your browser will usually offer to remember your username and password for you (unless you've turned that setting off). If you later want to clear your proxy credentials, you might think you can just go into your browser's password manager and delete your saved credentials. But this won't work. You can try it out for yourself, if you'd like.

Chrome password manager with one set of proxy credentials saved
Proxy credentials saved in Chrome's password manager
  1. Configure your proxy (see previous section)
  2. Visit a website to trigger an authentication prompt
  3. Enter your proxy username & password to authenticate
  4. Allow your browser to save your username & password
  5. Check that your traffic is being proxied (e.g. go to wondernetwork.com/geotest)
  6. Turn the proxy off
  7. Open your browser's password manager by typing the following in your address bar:
    • Chrome: chrome://settings/passwords
    • Edge: edge://settings/passwords
    • Firefox: about:logins
  8. Delete your saved proxy credentials
  9. Turn the proxy on

Expected result: an authentication prompt
Actual result: you're proxying successfully ?

That's because browsers also save your proxy authentication credentials somewhere else, too, not just in the password manager. If you skip step 4 and don't let your browser save your credentials, you'll get the same results. So what can you do?

Option 1: Force proxy reauthentication by switching to a different proxy server

One option is to switch to a different proxy server. If you change your proxy configuration to point to a new hostname or port you haven't used yet in your current browser session, you'll get a new authentication prompt.

This option sometimes works for us at WonderProxy because we have a lot of servers—252 servers to be exact, and more than 700 different ports (IPs). If we're not testing the authentication behaviour of a specific server we can swap to a different hostname or port to get a fresh authentication prompt.

Option 2: Delete proxy credentials from password manager & quit browser

But maybe you don't have hundreds of proxy servers lying around. Or maybe you want to troubleshoot authentication issues on one specific proxy server.

If that's the case, another option is quitting your browser. After successfully authenticating to a proxy server:

  1. Turn the proxy off
  2. Remove your saved credentials from your browser's password manager (see previous section)
  3. Quit your browser completely
  4. Open your browser again
  5. Turn the proxy on

Result: You'll see an authentication prompt, so you can enter your credentials again. If you skip step 2, most browsers will show you an authentication prompt again, but will have your credentials pre-filled in the fields.

Option 3: Clear all proxy credentials saved in your browser

The previous option might work for a handful of tests, but if you're doing a lot of testing, quitting your browser between each test might quickly become a headache. Luckily, there's another way to find those remembered proxy authentication credentials and clear them.

Clear proxy credentials in Firefox

(working as of Firefox 89.0)

  1. Turn your proxy off
  2. Open Firefox Lockwise by typing about:logins into the address bar
  3. Delete your saved proxy credentials from the password manager
  4. Open Clear Recent History (Ctrl+Shift+Del or Cmd+Shift+Del)
  5. Select Active Logins
  6. Select a suitable time range (e.g. Last Hour)
  7. Click OK
Proxy username and password saved in Firefox's password manager
Remove saved proxy credentials from Firefox Lockwise (step 2)
Firefox's Clear Recent History modal with Active Logins checkbox selected
Clearing saved proxy authentication credentials in Firefox (step 4)

Clear proxy credentials in Chrome & Edge

(working as of Chrome 91.0 & Edge 91.0)

  1. Turn your proxy off
  2. Open Clear Browsing Data (Ctrl+Shift+Del or Cmd+Shift+Del)
  3. Select Cookies and other site data
  4. Select Passwords and other sign-in data (Chrome) or Passwords (Edge)
  5. Select a suitable time range (e.g. Last hour)
  6. Click Clear data

If you don't want to wipe all passwords for the selected time range, you can remove your proxy credentials from the password manager directly (instead of step 4):

  1. Open your browser's password manager by typing the following in the address bar:
    • Chrome: chrome://settings/passwords
    • Edge: edge://settings/passwords
  2. Delete your saved proxy credentials
Chrome's Clear Browsing Data modal with Cookies and Passwords checkboxes selected
Clearing saved proxy authentication credentials in Chrome
Edge's Clear Browsing Data modal with Cookies and Passwords checkboxes selected
Clearing saved proxy authentication credentials in Edge

Setting & clearing proxy credentials in macOS network settings

Note for Mac users: When you configure your proxy settings in your System Preferences, you may see an option to enter your proxy credentials. These credentials are used by Safari and other apps, but not by Chrome or Edge. You should still provide your credentials here so your proxy will work system-wide, but you'll need to provide them again in your browser.

Similarly, clearing your proxy credentials here won't have any impact on Chrome or Edge, so you'll need to clear them from your browser too.

Proxies tab in macOS System Preferences: Network pane with HTTPS proxy username & password
Configuring a proxy in macOS network settings

If you follow those steps, turn your proxy on, and visit a website, you'll see an authentication prompt again. Hurray!

By the way: instead of manually configuring a proxy in your browser or operating system (and drowning in authentication prompts), you might want to try the WonderSwitcher browser extension. It makes turning proxies on and off a breeze!

Mari Vihuri

Mari is a QA engineer at WonderProxy. You can find her watching hockey, playing board games, and teaching her cat new tricks.