The Request Simulator is a Python-based application that simulates multiple concurrent HTTP requests to a list of URLs. It uses aiohttp for fully asynchronous requests and supports customizable user agents for different browsers and operating systems. Results are logged and saved to a JSON file for further analysis.
- Asynchronous Requests — sends many HTTP requests concurrently using
aiohttpandasyncio. - Custom User Agents — predefined user-agent strings for Chrome, Firefox, and Safari across Windows, macOS, and Android.
- Dynamic URL Loading — URLs are read from
list.txtand reloaded on every cycle, so you can edit the list while the app is running. - Environment-Based Configuration — control the request volume and user agent with environment variables, no code changes needed.
- Logging & Results — writes a plain-text log to
request_log.txtand structured results (per-URL status) tologin.json. - Graceful Shutdown — handles termination signals and saves results before exiting.
- Docker Support — containerized with Docker and Docker Compose; a public image is published to GHCR automatically via GitHub Actions.
- On startup, the app loads the URL list from
list.txt(one URL per line). - For each URL it fires
TOTAL_REQUESTSsimultaneous GET requests using the configuredUSER_AGENT. - The status of every request (success/failure + HTTP code) is appended to the results.
- After each full cycle, results are written to
login.json, the app sleeps briefly, reloadslist.txt, and repeats — running continuously until stopped.
- Python 3.9+ (for running locally)
- Docker and Docker Compose (optional, for containerized deployment)
git clone https://github.com/tahatehran/Docker-robot-trafice.git
cd Docker-robot-traficeCreate a file named list.txt in the project root with one URL per line, for example:
https://example.com
https://example.org
# Install dependencies
pip install -r requirements.txt
# Start the simulator
python main.py# Build and run in the foreground
docker compose up --build
# Or run detached (in the background)
docker compose up --build -dBecause docker-compose.yml mounts the project directory into the container, you can edit list.txt on the host at any time and the changes are picked up on the next cycle.
To stop the application:
docker compose downThe application is configured through environment variables (defaults are set in the Dockerfile and docker-compose.yml):
| Variable | Default | Description |
|---|---|---|
TOTAL_REQUESTS |
100 |
Number of simultaneous requests sent per URL. |
USER_AGENT |
chrome_windows (value) |
The User-Agent header sent with every request. |
Example — run with 50 requests per URL and a Firefox Android user agent:
TOTAL_REQUESTS=50 USER_AGENT="Mozilla/5.0 (Android 10; Mobile; rv:89.0) Gecko/89.0 Firefox/89.0" python main.py| Key | Browser / OS |
|---|---|
chrome_windows |
Chrome on Windows |
firefox_windows |
Firefox on Windows |
chrome_mac |
Chrome on macOS |
safari_mac |
Safari on macOS |
chrome_android |
Chrome on Android |
firefox_android |
Firefox on Android |
| File | Description |
|---|---|
login.json |
Structured results — one entry per request with url, status, and success. |
request_log.txt |
Timestamped log of every request, warning, and error. |
A Docker image is built and published to the GitHub Container Registry (GHCR) automatically on every push to main via GitHub Actions:
docker pull ghcr.io/tahatehran/docker-robot-trafice:latestIf the package is private, authenticate first with a GitHub token:
docker login ghcr.io.
Docker-robot-trafice/
├── main.py # Application entry point (RequestSimulator)
├── list.txt # Target URLs, one per line (reloaded each cycle)
├── requirements.txt # Python dependencies
├── Dockerfile # Container image definition
├── docker-compose.yml # Compose service with volume mount & env vars
├── login.json # Output: request results (JSON)
├── request_log.txt # Output: request log (plain text)
└── .github/workflows/ # CI: CodeQL analysis & GHCR image publishing
This tool sends repeated automated requests to web servers. Use it only on websites you own or have explicit permission to test. Sending unsolicited traffic to third-party sites may be illegal and can violate their terms of service. The authors are not responsible for misuse of this software.