Skip to content

A pool manager for Tor Browser instances, enabling automated, scalable, and concurrent browsing with Puppeteer through multiple Tor circuits

License

Notifications You must be signed in to change notification settings

feraandrei1/tor-browser-pool

Repository files navigation

Tor Browser Pool

Parallel browser instances with automatic Tor IP rotation. Visit websites from different IP addresses using headless Chromium browsers with stealth mode.

Features

  • IP Rotation: Each browser instance uses a unique Tor proxy
  • Parallel Execution: Run multiple browsers simultaneously
  • Stealth Mode: Uses puppeteer-extra-plugin-stealth to avoid detection
  • Docker Ready: Easy deployment with Docker

Quick Start

Local Development

npm install
npm start

Docker

docker-compose build
docker-compose up

Configuration

Edit utils/constants/index.js:

Option Default Description
BATCH_COUNT 10 Parallel browser instances
TOTAL_VISITS 100 Total visits to perform
VISIT_DURATION 5 Seconds to stay on each page
PAGE_TIMEOUT 30 Page load timeout in seconds
START_PORT 9052 First Tor SOCKS port

URLs

Add target URLs to urls.txt (one per line):

https://example.com
https://another-site.com

Project Structure

.
├── core/
│   └── puppeteer.js      # Browser factory with stealth & proxy
├── services/
│   ├── browser.service.js # Bot logic - visit URLs
│   └── tor.service.js     # Tor daemon management
├── utils/
│   ├── constants/         # Configuration
│   ├── logger.js          # Console logging
│   └── urlReader.js       # Read URLs from file
├── index.js               # Entry point
├── urls.txt               # Target URLs
└── Dockerfile

How It Works

  1. Configures Tor with multiple SOCKS ports (one per bot)
  2. Starts Tor daemon with rotating IPs
  3. Launches parallel browser instances, each using a different proxy port
  4. Each bot visits all URLs from urls.txt
  5. Logs the IP address used and visit status

License

MIT

About

A pool manager for Tor Browser instances, enabling automated, scalable, and concurrent browsing with Puppeteer through multiple Tor circuits

Resources

License

Stars

Watchers

Forks