A high-performance Chrome Extension built with React, TypeScript, and Tailwind CSS.
Provides a developer-focused interface to intercept and manipulate network traffic using Chrome's Manifest V3 APIs — enabling frontend debugging and testing without touching backend code.
Create dynamic interceptors with three action types:
- Block requests entirely
- Mock responses with custom JSON payloads
- Modify outgoing request headers
(e.g. injecting Authorization tokens)
Real-time traffic dashboard that captures outgoing requests via a Background Service Worker, featuring:
- Inline search filtering
- One-click "Add as Rule" shortcut directly from any log entry
Implements a Source of Truth synchronization pattern keeping:
declarativeNetRequestchrome.storage.local- React UI state
fully consistent at all times.
- JSON Import / Export support
- UTF-8 safe Base64 encoding for mock payloads
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Tailwind CSS |
| Browser APIs | declarativeNetRequest, webRequest, chrome.storage.local |
| Background | Chrome Service Worker (Manifest V3) |
In Manifest V3, the browser's rule engine is persistent while the extension UI is ephemeral — the popup is destroyed and recreated on every open.
- Ghost rules persisting in the DNR engine after deletion from the UI
- UI state becoming stale between popup sessions
On every popup mount, the UI re-hydrates from chrome.storage.local as the single source of truth.
All mutations:
- Add
- Remove
- Import
write to storage first, then reflect in React state — ensuring the engine and UI are never out of sync regardless of popup lifecycle.
Bulk-loading rules into the browser engine can trigger race conditions when the popup is destroyed mid-operation.
The OS file picker steals focus and destroys the popup before FileReader.onload fires, orphaning the import operation entirely.
Import logic is delegated to the Background Service Worker via chrome.runtime.sendMessage.
The background script performs the full import sequence:
- Wipe existing rules
- Register new DNR configs
- Persist to storage
independent of popup availability.
The popup simply re-hydrates from storage on next open.
Due to a Chrome MV3 popup lifecycle constraint, the Import feature requires the extension DevTools panel to remain open:
- Right-click the extension icon
- Select Inspect
This keeps the popup alive during the file picker interaction.
This is a documented platform-level limitation in Manifest V3.
Mock responses use Data URIs which break silently on non-ASCII content.
Native btoa() crashes on:
- Emojis
- Arabic script
- Non-Latin characters
inside mock JSON payloads.
All mock data is encoded through a UTF-8 safe pipeline:
btoa(unescape(encodeURIComponent(data)))before embedding into redirect Data URIs, ensuring resilient Base64 encoding for any character set.
git clone https://github.com/LaibaFirdouse/NetworkInterceptor.git
cd NetworkInterceptor
npm install
npm run build- Open
chrome://extensions/ - Enable Developer Mode
- Click Load unpacked
- Select the
distfolder
Built as a showcase of:
- Manifest V3 engineering principles
- Chrome Extension architecture
- State synchronization strategies
- Background Service Worker workflows
- Advanced browser API integrations
Laiba Firdouse


