Skip to content

Instantly share code, notes, and snippets.

@gthrm
Last active October 21, 2025 17:25
Show Gist options
  • Select an option

  • Save gthrm/49248495ff52ab15a9233ce7edac48e3 to your computer and use it in GitHub Desktop.

Select an option

Save gthrm/49248495ff52ab15a9233ce7edac48e3 to your computer and use it in GitHub Desktop.
Fix Chrome Proxy Settings After Extension Removal (macOS)

Fix Chrome Proxy Settings After Extension Removal (macOS)

Problem

After uninstalling a Chrome proxy extension (installed in developer mode), some websites stopped working in that specific Chrome profile. The extension's proxy settings remained "stuck" in Chrome even after removal.

Root Cause

When you remove a proxy/VPN extension, Chrome doesn't always clean up the proxy configuration from the profile files. The browser continues attempting to use the PAC script from the deleted extension, causing connection failures for affected sites.

Files Affected

The proxy settings can persist in these Chrome profile files:

  • Network Persistent State - Main file containing network settings and proxy configuration
  • Secure Preferences - Encrypted preferences that may contain proxy settings
  • Preferences - General preferences file

Step 1: Find Your Profile Folder Name

Important: You need the folder name (like "Profile 4" or "Default"), not the display name you see in Chrome (like "Work" or "Personal").

Method 1: List All Profile Folders (Recommended)

Open Terminal and run:

ls ~/Library/Application\ Support/Google/Chrome/ | grep -E "Profile|Default"

This will show all profile folders:

Default
Profile 1
Profile 2
Profile 4
...

Method 2: Find Profile Folder from Chrome URL

  1. Open Chrome with the affected profile
  2. Go to: chrome://version/
  3. Look for "Profile Path"
  4. You'll see something like: /Users/username/Library/Application Support/Google/Chrome/Profile 4
  5. The last part (Profile 4) is your folder name

Method 3: Check All Profiles

If you have multiple profiles and don't know which one has the issue:

# List all profiles with their names
for dir in ~/Library/Application\ Support/Google/Chrome/Profile*; do
  if [ -f "$dir/Preferences" ]; then
    echo "Folder: $(basename "$dir")"
    grep -o '"name":"[^"]*"' "$dir/Preferences" | head -1
    echo "---"
  fi
done

Note: Remember your folder name (e.g., "Profile 4" or "Default") for the next steps.

Step 2: Try Quick Fix First

Solution 1: Using Chrome Internal Settings

  1. Open Chrome with the affected profile
  2. Navigate to: chrome://net-internals/#proxy
  3. Click "Re-apply settings"
  4. Restart Chrome
  5. Test the affected websites

If this doesn't work, proceed to Solution 2.

Step 3: Manual File Cleanup (If Quick Fix Failed)

Solution 2: Remove Configuration Files

  1. Completely quit Chrome (⌘+Q on macOS)
  2. Open Terminal
  3. Replace PROFILE_NAME below with your actual profile (e.g., Profile 4 or Default):
# Example for Profile 4:
rm ~/Library/Application\ Support/Google/Chrome/Profile\ 4/Network\ Persistent\ State
rm ~/Library/Application\ Support/Google/Chrome/Profile\ 4/Secure\ Preferences

# Example for Default profile:
rm ~/Library/Application\ Support/Google/Chrome/Default/Network\ Persistent\ State
rm ~/Library/Application\ Support/Google/Chrome/Default/Secure\ Preferences
  1. Open Chrome again
  2. Chrome will recreate these files with clean settings
  3. Test the affected websites

Verification

After applying the fix:

  1. ✅ Check that affected websites load correctly
  2. ✅ Verify in chrome://net-internals/#proxy that no proxy is configured (unless you want one)
  3. ✅ Check chrome://extensions/ to ensure no proxy extensions remain

Prevention

To avoid this issue in the future:

  1. Before uninstalling proxy/VPN extensions:

    • First, disable the proxy within the extension settings
    • Then uninstall the extension
  2. After removing any proxy extension:

    • Use Step 2 (Quick Fix) as a precaution

Technical Details

The Network Persistent State file contains anonymization rules that Chrome uses to route traffic through proxies. When a proxy extension is removed without proper cleanup, these rules reference non-existent PAC scripts, causing connection failures.

Example of stuck proxy configuration:

{
  "anonymization": ["HAAAABcAAABodHRwczovL3Zwbi1uYXJ1emh1LmNvbQA=", false, 0],
  "server": "https://example.com"
}

Notes

  • This fix is profile-specific - it only affects the Chrome profile where you remove the files
  • Your browsing history, passwords, and bookmarks are not affected
  • Chrome will regenerate clean configuration files on next startup
  • This issue typically occurs with extensions installed in developer mode

Related Commands

Check current proxy settings in macOS Terminal:

scutil --proxy

This should show no proxy configuration if the system settings are clean.


Last Updated: October 2024
Tested On: macOS, Chrome 141.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment