Skip to content

A Chromium extension that intercepts all HTTP/HTTPS requests using the chrome.webRequest API.

Notifications You must be signed in to change notification settings

debjordan/http-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Logger (Chromium + Node.js + SQLite)

A solution for developers who want to capture HTTP requests made by Chromium/Chrome browser and save them to a local SQLite database for later analysis.


How it works

  • A Chromium extension intercepts all HTTP/HTTPS requests using the chrome.webRequest API
  • The logs (URL, method, status, IP, and timestamp) are sent to a local Node.js server
  • The server stores the data in a SQLite database (http_logs.db)

Project structure

http-logger/
├─ extension/   # Chromium extension
│   ├─ manifest.json
│   └─ background.js
└─ server/      # Node.js server + SQLite
│   ├─ index.js
│   ├─ db.js
│   └─ package.json

Installation

1. Running the Node.js server

cd server
npm install
npm start

Expected output:

SQLite database ready.
Server running at http://localhost:3000

2. Installing the Chromium extension

  1. Open browser → chrome://extensions/
  2. Enable Developer mode
  3. Click Load unpacked
  4. Select the extension/ folder

Querying logs

  • REST API to list last 100 records:

    curl http://localhost:3000/logs
  • Access database directly:

    sqlite3 http_logs.db
    sqlite> SELECT * FROM logs ORDER BY id DESC LIMIT 10;

Example captured log

{
  "id": 1,
  "url": "https://example.com/api/data",
  "method": "GET",
  "statusCode": 200,
  "ip": "93.184.216.34",
  "timeStamp": "2025-08-18T20:45:12.123Z"
}

Notes

  • The server must be running at http://localhost:3000 for the extension to send logs
  • This solution is intended for developers, not recommended for production environments
  • Compatible with Chromium/Chrome (Manifest V3)

About

A Chromium extension that intercepts all HTTP/HTTPS requests using the chrome.webRequest API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published