Skip to content

Repository files navigation

ChromeGuard Logo

ChromeGuard

Browser security & privacy hardening for Chrome.
Install it on your Chrome and never think about it again — or open the advanced settings and fine-tune everything yourself.

Chrome Web Store CI License Manifest V3 Zero Dependencies


Install

Get ChromeGuard from the Chrome Web Store

Or load the development build manually — see Quick Start below.


Features

Secure Browsing

Protection What it does
Force HTTPS Upgrades all connections to HTTPS
Secure DNS Routes DNS through encrypted providers (AdGuard, Cloudflare, Quad9, Mullvad, dns0.eu)
Block notifications Stops sites from requesting notification permission

Privacy Protection

Protection What it does
Block third-party cookies Prevents cross-site tracking cookies
Disable ad tracking APIs Turns off Chrome's Topics, FLEDGE, and ad measurement APIs
Send GPC signal Adds Sec-GPC: 1 header to all requests (Global Privacy Control)
Prevent WebRTC leak Stops WebRTC from exposing your local IP address (+ strict mode)

Link Protection

Protection What it does
Preview shortened links Hover tooltip showing the real destination of bit.ly, t.co, etc.
Strip tracking params Removes UTM, fbclid, gclid and other tracking parameters from URLs
Remove Google click tracking Unwraps Google's /url?q= redirects and removes ping attributes
Remove Facebook click tracking Unwraps l.facebook.com/l.php?u= redirect wrappers

Cookie & Storage Hygiene

Protection What it does
Cookie decay Automatically removes cookies from sites you haven't visited recently
Session cleanup Clears cookies when you close a tab (with configurable grace period)
Preserve login cookies Detects and keeps auth cookies during session cleanup
Deep storage cleanup Clears localStorage, IndexedDB, and cacheStorage for stale sites
First-party tracking cookies Removes cookies with suspiciously long expiry dates
Protected sites allowlist Exempt specific domains from all automatic cleanup

Health Monitor (always on)

Feature What it does
Extension audit Scans installed extensions and flags ones with risky permission combinations
Site permission review Reviews which sites have camera, microphone, location, or notification access

Environment Status

Detects VPN, DNS software, and ad blockers — including desktop apps like AdGuard, Pi-hole, and AdGuard Home — and shows their status in the popup.

Quick Start

npm install
npm run build

Load in Chrome

  1. Open chrome://extensions/
  2. Enable Developer mode (top-right toggle)
  3. Click Load unpacked
  4. Select the dist/ folder
  5. The ChromeGuard icon appears in your toolbar

Development

npm run watch    # Rebuild on save
npm test         # Run tests (Vitest)
npm run rebuild  # Clean + build

Dual UI

  • Popup — simplified dashboard for non-technical users with category toggles and status indicators
  • Options page — full advanced settings with individual feature toggles, DNS provider selection, cookie retention configuration, allowlist editor, and health audit details

Permissions

Permission Why
storage Save your toggle preferences (synced across devices via Chrome Sync)
privacy Configure HTTPS-only, secure DNS, WebRTC policy, ad tracking
contentSettings Block notification prompts, review site permissions
declarativeNetRequest Inject GPC header, strip tracking parameters from URLs
alarms Schedule periodic cookie cleanup and extension audits
cookies Read and remove cookies for automatic cleanup
history Distinguish recently visited sites from stale ones for cookie cleanup
management Enumerate extensions for security audit and environment detection
scripting Dynamically register/unregister content scripts per feature toggle
browsingData Clear localStorage/IndexedDB/cacheStorage for stale sites
<all_urls> (host) Required for cookie/storage cleanup on arbitrary domains and content script injection

See PRIVACY_POLICY.md for full details on data handling and network requests.

Project Structure

src/
  background/service-worker.ts   — Lifecycle, alarms, tab events, status detection
  popup/popup.html|ts|css        — Simplified toggle UI
  options/options.html|ts|css    — Advanced settings page
  content/
    preview-short-links.ts       — Hover tooltip for shortened URLs
    detrack-google.ts            — Remove Google click tracking
    detrack-facebook.ts          — Remove Facebook click tracking
  lib/
    constants.ts                 — Feature registry, DNS providers, all constants
    settings.ts                  — Typed chrome.storage read/write
    hardening.ts                 — Per-feature apply/revert functions
    audit.ts                     — Extension risk scoring, site permission review
    cookie-hygiene.ts            — Tier 1/2/3 cookie and storage cleanup
    cookie-allowlist.ts          — Domain allowlist CRUD
    cookie-heuristics.ts         — Auth cookie detection, tracking cookie patterns
  types/chrome.d.ts              — Chrome API type declarations
rulesets/
  gpc-header.json                — Sec-GPC: 1 header injection rule
  tracking-params.json           — UTM/fbclid/gclid param stripping rules
tests/                           — Vitest tests with Chrome API mocks

Tech Stack

  • TypeScript with strict mode
  • esbuild for fast bundling
  • Vitest for testing
  • Zero runtime dependencies — only Chrome APIs
  • Manifest V3 — no background pages, no remote code, no eval

Contributing

  1. Fork the repo and create a feature branch
  2. Make your changes
  3. Run npm test and npm run build to verify
  4. Open a pull request

License

MIT

About

Browser security & privacy hardening for Chrome — simple for everyone, powerful for experts. Zero dependencies, Manifest V3.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages