A sophisticated traffic bot built with Node.js and Puppeteer that simulates realistic website traffic with stealth capabilities to avoid detection.
- Stealth Mode: Uses puppeteer-extra-plugin-stealth to avoid bot detection
- User Agent Rotation: Randomly switches between desktop and mobile user agents
- Referrer Simulation: Simulates traffic from Google, Facebook, Twitter, and other popular sites
- Realistic Behavior: Includes scrolling, random wait times, and natural browsing patterns
- Comprehensive Logging: Detailed console output with timestamps and color coding
- Error Handling: Robust error handling with graceful recovery
- Infinite Loop: Continuous operation with configurable delays
- Mobile & Desktop: Supports both mobile and desktop viewport simulation
-
Install Dependencies:
npm install puppeteer-extra puppeteer-extra-plugin-stealth puppeteer
-
Run the Bot:
Option A: Full Browser Simulation (Recommended)
node index.js
Option B: HTTP-based Simulation (Fallback)
node http-traffic-bot.js
Note: If you encounter browser dependency issues in the Replit environment, use the HTTP-based version which provides similar functionality without requiring system browser dependencies.
- Uses Puppeteer with full browser simulation
- Supports JavaScript execution and DOM interaction
- Better stealth capabilities
- Requires system browser dependencies
- Uses native HTTP requests
- No browser dependencies required
- Simulates realistic user behavior
- Works in constrained environments like Replit
Both versions provide:
- User-Agent rotation (mobile/desktop)
- Referrer simulation
- Realistic timing and behavior patterns
- Comprehensive logging
- Infinite loop operation
Edit the targetUrls array in either file to specify which websites to visit:
const targetUrls = [
'https://www.example.com',
'https://www.google.com',
'https://www.github.com',
// Add your target URLs here
];Adjust the timing settings in the config object:
const config = {
minPageTime: 20000, // Minimum time to spend on page (20 seconds)
maxPageTime: 40000, // Maximum time to spend on page (40 seconds)
minWaitBetweenVisits: 30000, // Minimum wait between visits (30 seconds)
maxWaitBetweenVisits: 60000, // Maximum wait between visits (60 seconds)
headless: true // Set to false for debugging (browser version only)
};index.js- Main traffic bot with full browser simulationhttp-traffic-bot.js- HTTP-based traffic simulation (fallback)user-agents.js- User agent and referrer managementREADME.md- This documentation
- Initialization: Loads configuration and sets up stealth plugins
- Target Selection: Randomly selects from the predefined URL list
- User Agent Setup: Randomly assigns desktop or mobile user agent
- Request/Navigation: Makes HTTP request or navigates to target with simulated referrer
- Behavior Simulation: Performs scrolling, waiting, and interaction patterns
- Cleanup: Closes connections and waits before next iteration
- Loop: Repeats process indefinitely with randomized delays
- Random user agent rotation (70% desktop, 30% mobile)
- Realistic referrer URLs from popular sites
- Random timing between 20-40 seconds per page
- Simulated scrolling and reading behavior
- Proper HTTP headers to mimic real browsers
- Error handling and graceful recovery
If you encounter errors like "libglib-2.0.so.0: cannot open shared object file":
- Use the HTTP-based version instead:
node http-traffic-bot.js - Or install system dependencies (advanced users only)
- Check internet connectivity
- Verify target URLs are accessible
- Monitor console output for detailed error messages
# Start the full browser version
node index.js
# Or start the HTTP-based version
node http-traffic-bot.js# Run in background (Linux/Mac)
nohup node http-traffic-bot.js > traffic.log 2>&1 &
# Monitor logs
tail -f traffic.logThis tool is designed for:
- Testing your own websites
- Load testing with permission
- Educational purposes
Important: Always ensure you have permission to access the websites you're testing. Respect robots.txt files and terms of service.
This project is for educational and testing purposes only. Use responsibly and in compliance with all applicable laws and terms of service.