Garfield is an advanced browser automation and traffic simulation bot designed to mimic human behavior using Selenium and Python. It manages multiple concurrent browser sessions with proxy validation and randomized interaction patterns.
- Concurrent Execution: Uses
asyncioand thread pools to run multiple browser sessions simultaneously without blocking. - Efficient Proxy Management: Validates proxies using lightweight
requestscalls before launching heavy browser instances. - Human-like Interaction: Implements random scrolling, waiting, and clicking behaviors to simulate real user activity.
- Dockerized: Fully containerized environment for easy deployment.
- Configurable: Extensive configuration options for scheduling, probabilities, and targets.
- Python: 3.13+
- Poetry: For dependency management
- Firefox: Required for Selenium WebDriver (installed automatically in Docker image)
- Oxylabs account: For proxy rotation
-
Clone the repository:
git clone <repository-url> cd garfield
-
Install dependencies:
poetry install
-
Install Browser Drivers:
python driver_chk.py
Create a .env file in the /config directory (or root, depending on your setup) with the following key variables:
| Variable | Description |
|---|---|
user |
Proxy username |
pass1 |
Proxy password |
endpoint |
Proxy host/port |
prox_test |
URL to test proxy connectivity (e.g., https://iplocation.io) |
host |
The IP/Host to AVOID (ensure proxy is working) |
stay_on_target |
Main target URL to visit |
teezy |
Timezone string (e.g., America/New_York) |
burt |
XPath for a specific element to click if found |
sub1 - sub4 |
Sub-paths to visit on the target site |
Edit config.py to adjust bot behavior:
scheduler: Hourly probability weights.upl_time: Random sleep intervals.subs: Probability distribution for visiting sub-pages.downity/uppity: Rate limit ranges.
To start the bot manually:
poetry run python modules.py-
Build the image:
docker build -t garfield . -
Run the container:
docker run -d --env-file .env -v $(pwd)/logs:/app/logs garfield
modules.py: Main entry point and logic engine.Dockerfile: Container configuration.config.py: Behavior configuration parameters.ua.py: List of user agents for rotation.pre.py: Pre-visit URL list (warm-up).driver_chk.py: Utility to ensure GeckoDriver is installed.