Trafficbot
This script generates traffic for websites using a Tor Proxy Pool or any proxy server for which you desire
Install / Use
/learn @lucasveneno/TrafficbotREADME
Veneno Traffic Bot v2
Enterprise-grade stealth traffic generation framework.
Quick Start (Docker)
- Clone the repository.
- Configure
.env(use.env.exampleas template). - Run with Docker Compose:
docker-compose up --build
sudo npm run setup:linux
Windows Setup (CMD/PowerShell)
If running on Windows:
- Ensure Chrome for Testing is installed:
npm run download-browsers. - The bot uses
path.joinfor cross-platform file paths. - If using persistent sessions, ensure the
SESSIONS_DATA_DIRpath is valid for Windows. - To run examples on Windows, use Git Bash (recommended) or manually set environment variables in CMD:
set NODE_ENV=production&& set MAX_SESSIONS=1&& npm start
Manual Setup
- Install dependencies:
npm install - Build the project:
npm run build - Run in Production:
npm start
To see the bot in action with different pre-set configurations (High Concurrency, Targeted URLs, Human Behavior Simulation, etc.), run the interactive example script:
npm run run:examples # Choice 7 for Behavior Simulation
Note: In production mode, the bot uses the modern headless: 'new' engine and optimized flags for stability.
Browser Seeding & Visibility
"Seeding" allows the bot to maintain a persistent reputation by saving cookies and cache across runs.
1. Seeding (Persistent Profiles)
Enable PERSISTENT_SESSIONS to save browser state to a local directory:
PERSISTENT_SESSIONS=true
SESSIONS_DATA_DIR=./sessions
2. Visibility (Headed Mode)
Set HEADLESS=false to see the browser window while the bot is running (not recommended for large scales):
HEADLESS=false
To run a guided seeding session immediately:
npm run run:examples # Select Option 6
3. macOS Stability (Apple Silicon)
If you encounter "crash info version 7" or "browser launch failed" on macOS:
- Ensure you have the native ARM64 browser:
npm run download-browsers. - The bot is architecture-aware and will automatically use optimized stability flags for Apple Silicon.
- If issues persist, try clearing old session data:
rm -rf sessions/*.
Proxy Configuration
The bot supports HTTP/SOCKS proxies for anonymity.
1. Using Tor (Docker - Recommended)
The docker-compose.yml includes a built-in Tor proxy pool. When running with Docker, the bot is automatically configured to use Tor with rotating IPs.
docker-compose up
2. Using Local Tor (macOS - Manual Setup)
To use Tor directly on your Mac without Docker:
- Install Tor via Homebrew:
brew install tor - Start the Tor service:
brew services start tor - Configure
.env:PROXY_URL=socks5://127.0.0.1 PROXY_PORT=9050
Note: The bot supports SOCKS5 natively. Ensure you use the socks5:// prefix.
Testing
The project includes a comprehensive test suite using Jest.
-
Run All Tests:
npm test -
Run Only Unit Tests (Configuration):
npx jest src/infrastructure/config/config.test.ts -
Run Browser Integration Tests:
npx jest src/infrastructure/browser/PuppeteerStealthEngine.test.ts
Note: Integration tests satisfy system-level dependencies for running a real browser. If you encounter issues on Linux, ensure you've run sudo npm run setup:linux first.
Configuration (.env)
| Variable | Default | Description |
| --------------------- | -------------------------- | -------------------------------------------------- |
| DEFAULT_URL | https://lucasveneno.com/ | Initial target URL. |
| MAX_SESSIONS | 1 | Number of parallel browser instances. |
| SESSION_TIME | 3 | Duration per session in minutes (or random). |
| HEADLESS | true | Run without visible browser. |
| HUMAN_BEHAVIOR | true | Enable mouse movement and scrolling simulation. |
| BEHAVIOR_INTENSITY | medium | Interaction frequency (low, medium, high). |
| PERSISTENT_SESSIONS | false | Save browser profile, cookies, and cache. |
| SESSIONS_DATA_DIR | ./sessions | Directory to store persistent browser profiles. |
| PROXY_URL | - | Proxy server address (e.g., socks5://127.0.0.1). |
| PROXY_PORT | - | Proxy server port (e.g., 9050). |
| BOT_ROLE | both | Execution role (producer, worker, both). |
| REDIS_URL | redis://127.0.0.1:6379 | Redis connection URL for distributed queue. |
| ORGANIC_SEARCH | false | Enable search engine navigation before target. |
| SEARCH_KEYWORDS | - | Comma-separated list for organic search. |
| REFERRER_POOL | - | Comma-separated custom referrers. |
| MATCH_GEOLOCATION | false | Match internal browser geo to proxy IP. |
Distributed Architecture & Scaling
V2.1.0 supports massive horizontal scaling across multiple nodes using a centralized Redis task queue.
Roles:
- Producer: Generates traffic sessions and pushes them to the queue. Does not launch browsers.
- Worker: Listens to the queue and executes browser sessions. Optimized for high-session nodes.
- Both (Default): Acts as both producer and worker on a single node.
Deployment Scaling:
- Infrastructure: Deploy one Redis instance (standard in
docker-compose.yml). - Producers: Deploy one instance with
BOT_ROLE=producer. - Workers: Deploy as many instances as needed with
BOT_ROLE=worker. Each worker will pull tasks from the shared queue according to itsMAX_SESSIONScapacity.
Stealth & Anonymity
The bot implements multiple layers of protection to bypass advanced detection:
- Diamond Standard Hardening:
- AudioContext Masking: Injects noise into audio frequency data to neutralize hardware-level identification.
- Font & ClientRects Masking: Perturbs font measurement and element geometry to break font-based fingerprinting.
- Contextual Behavior & Intelligence:
- Thinking Heatmaps: Non-linear, randomized stay durations for each navigation step.
- Weighted Link Selection: Prioritizes logical navigation targets (About, Products, Pricing) over utility links.
- Reading Simulation: Realistic static pauses with micro-mouse nudges to mimic human reading patterns.
- Advanced Fingerprinting:
- Canvas & WebGL Randomization: Injects non-destructive noise into canvas data and spoofs GPU vendors/renderers (M1, NVIDIA, Intel).
- Modern User-Agents: Uses a curated pool of Chrome 140+ and Edge 140+ (2025/2026) strings with dynamic version randomization.
- Hardware Spoofing: Randomizes
deviceMemory,hardwareConcurrency, andnavigator.platform.
Observability & Health
- Real-time CLI Dashboard: Live feedback on active sessions, success rates, and average durations directly in your terminal.
- Proxy Reputation Monitoring: Automated status checks against major IP blacklists to detect "burnt" proxy IPs.
- Structured Logging: JSON-ready logs via Winston for integration with cloud observability platforms.
Architecture
The Veneno Traffic Bot follows a modular, decoupled architecture:
- Orchestrator: Manages the session lifecycle and delegates actions to the engine.
- Engine: Handles browser initialization and low-level interactions (Puppeteer-based).
- Intelligence Layer:
BehaviorServiceandFingerprintServiceprovide the logic for stealth and realism. - Observability Layer:
MetricsServiceandReputationServiceprovide real-time monitoring. - Queue Layer:
BullMQ(Redis-backed) manages distributed tasks across nodes.
Security Features
- Diamond Standard Hardening: Sophisticated masking of JS fingerprints (Canvas, WebGL, Audio, Fonts).
- Environment Validation: Fail-fast configuration with Zod.
- Resource Management: Structured logging and graceful error handling.
- Contextual Intelligence: DOM-aware weighted link prioritization.
License
MIT
