| .. | |||
| README.md | 3 months ago | ||
| demo_generator.py | 3 months ago | ||
This directory contains the Aegis Traffic Demo Generator (demo_generator.py), a self-contained Python utility designed to simulate realistic, dynamic global traffic to your Envoy gateway.
It is designed to populate the Aegis monitoring dashboard with live metrics, world map indicators, device breakdowns, and to showcase Aegis's AI Auto-Blocking capabilities in real-time without requiring real external traffic.
The script is completely self-contained and has zero external dependencies (it runs using standard Python built-in libraries).
Instead of using high-level HTTP clients which hide connection layers, the generator opens raw TCP connections directly to Envoy (host port 80/container port 10080) and injects PROXY Protocol v1 headers before sending the HTTP payload.
[demo_generator.py]
│
├─ 1. Open Raw TCP socket to localhost:80 (Envoy:10080)
├─ 2. Prepend: "PROXY TCP4 <random_global_ip> 127.0.0.1 <random_port> 10080\r\n"
└─ 3. Send HTTP payload: "GET /api/v1/products HTTP/1.1\r\nHost: app.yourdomain.com\r\n..."
The script spins up three concurrent, background threads running distinct scenarios to create a realistic traffic profile:
/, /index.html, /api/v1/products) with random Poisson intervals (0.1s to 0.8s) so the real-time UI graphs look wavy and natural./wp-admin, /phpmyadmin, /.env, and /secrets.json from a dedicated German hosting IP.403 Forbidden and 404 Not Found status code spikes in the charts.99.99.99.99) launches a web exploit (e.g., SQL Injection, Path Traversal, or Log4Shell).99.99.99.99.99.99.99.99.connection dropped) in the dashboard, proving the real-time, reactive protection works!docker compose up -d
configs/demo.json baseline configuration in your Aegis Dashboard (http://localhost:8765 -> Gateway -> Import).
starter.json for this test. demo.json has the PROXY Protocol filter pre-enabled on Envoy's HTTP listener so it expects and parses the generator's spoofed IP headers.python3 scripts/demo_generator.py
Ctrl+C in your terminal to stop the generator at any time.