Break your network before your users do.
Chaos Internet Simulator is an open source local proxy + dashboard + CLI to simulate real-world bad internet and unstable APIs during development.
Most teams test with perfect localhost network. Production is not perfect.
Chaos Internet Simulator helps teams reproduce realistic failure modes early, before users see them.
- frontend developers validating loading/error states
- backend developers testing retries and idempotency
- QA and SRE teams stress-testing app resilience
- DX and platform teams creating reproducible failure drills
- slow navigation and high latency
- random API 5xx errors
- intermittent timeouts
- unstable HTTPS tunnels (CONNECT drops/timeouts)
- selective chaos by URL/path/domain
- scenario-based progressive degradation
chaos-Internet-simulator/
├── apps/
│ ├── proxy/
│ ├── dashboard/
│ └── cli/
├── packages/
│ ├── core/
│ └── presets/
├── docs/
├── examples/
├── plugins/
├── recordings/
└── ...
pnpm installpnpm dev
curl -x http://localhost:8080 https://jsonplaceholder.typicode.com/posts/1cp .env.example .env
pnpm devOpen:
- Dashboard:
http://localhost:3000 - Proxy:
http://localhost:8080 - Control API:
http://localhost:8081
docker compose up --buildPrebuilt release images (GHCR):
ghcr.io/florextech/chaos-internet-simulator-proxy:latestghcr.io/florextech/chaos-internet-simulator-dashboard:latest
Publish automation:
- GitHub Action:
.github/workflows/publish-docker.yml - Runs on release publish and
workflow_dispatch
pnpm --filter @florexlabs/chaos-net build
pnpm --filter @florexlabs/chaos-net exec chaos-net status
pnpm --filter @florexlabs/chaos-net exec chaos-net start
pnpm --filter @florexlabs/chaos-net exec chaos-net profile unstable-api
pnpm --filter @florexlabs/chaos-net exec chaos-net logs
pnpm --filter @florexlabs/chaos-net exec chaos-net scenario bad-mobile-network
pnpm --filter @florexlabs/chaos-net exec chaos-net record start
pnpm --filter @florexlabs/chaos-net exec chaos-net record stop
pnpm --filter @florexlabs/chaos-net exec chaos-net replay sample.json
pnpm --filter @florexlabs/chaos-net exec chaos-net replay offWithout cloning this repo:
npm i -g @florexlabs/chaos-net
chaos-net statuscurl -x http://localhost:8080 https://jsonplaceholder.typicode.com/posts
bash examples/curl_examples.shImport:
examples/postman_collection.json
Then configure proxy host localhost port 8080.
- Axios sample:
examples/node-axios-example.ts - fetch (undici) sample:
examples/node-fetch-example.ts - Full workflow guide:
docs/developer-workflows.md
export HTTP_PROXY=http://localhost:8080
export HTTPS_PROXY=http://localhost:8080Supported fields:
enabledactiveProfiletargetBaseUrlproxyPortcontrolApiPortrulescustomProfiles
Example:
{
"enabled": true,
"activeProfile": "slow-3g",
"targetBaseUrl": "https://jsonplaceholder.typicode.com",
"proxyPort": 8080,
"controlApiPort": 8081,
"rules": [{ "match": "/posts", "profile": "slow-3g" }],
"customProfiles": {
"my-bad-network": {
"delayMs": 3500,
"errorRatePercent": 10,
"timeoutRatePercent": 5,
"timeoutMs": 12000
}
}
}Priority:
- env vars
chaos.config.json- defaults
normalslow-3gairport-wifiunstable-apitotal-chaosstarbucks-wificolombia-4goffice-vpninternational-latencyroad-trip-network
bad-mobile-network(loop)api-degrading
- HTTPS traffic is supported through CONNECT tunneling.
- Chaos can apply delay, timeout, forced error, and connection drop before tunnel establishment.
- MITM is intentionally not implemented in this phase.
- Encrypted HTTPS payload is not inspected or rewritten.
Dashboard provides:
- chaos on/off and active profile controls
- target URL and per-route rule editor
- custom profile editor
- real-time logs
- metrics overview cards
- Playwright E2E tests for key flows (render, toggle, config updates)
Dashboard now uses @florexlabs/ui as the reusable UI base.
Use it in any project without cloning:
pnpm add @florexlabs/uiimport '@florexlabs/ui/florex.css';
import { Button, Card, Input } from '@florexlabs/ui';Migrated components:
ButtonCardBadgeInputContainerSectionSpinnerEmptyState
Still local (by design):
- native select controls in profile/rules forms (simple keyboard-native behavior)
- request log table structure and density styles (proxy-specific data layout)
Basic usage example:
import { Badge, Button, Card, Input } from '@florexlabs/ui';GET /metrics exposes:
- totalRequests
- delayedRequests
- erroredRequests
- timedOutRequests
- throttledRequests
- droppedConnections
- averageResponseTimeMs
- activeProfile
- activeScenario
- chaosEnabled
- Local plugins loaded from
plugins/ - Hooks:
onRequest,onResponse - Capabilities:
forceError,addDelay,skipChaos,setHeader,dropConnection - Plugin failures are isolated and logged
See:
docs/plugins.mdplugins/random-auth-failure.example.ts
Control API:
POST /record/startPOST /record/stopPOST /replay/startPOST /replay/stop
Recordings are JSON files under recordings/.
GET /healthGET /statePOST /state/enabledPOST /state/profilePOST /state/rulesPOST /state/target-base-urlGET /logsGET /metricsGET /profilesPOST /profiles/customGET /scenarioGET /scenariosPOST /scenarioPOST /scenario/offPOST /record/startPOST /record/stopPOST /replay/startPOST /replay/stop
docs/README.mddocs/proxy.mddocs/dashboard.mddocs/cli.mddocs/configuration.mddocs/developer-workflows.mddocs/plugins.mddocs/ui-system.md
pnpm devpnpm buildpnpm testpnpm lintpnpm format
Already done:
- HTTPS basic support via CONNECT tunneling (without MITM)
- temporal scenarios support (API, CLI, dashboard visibility)
- local plugin system with request/response hooks
- record and replay mode with JSON storage
Still pending:
- optional MITM HTTPS mode
- richer scenario editor in dashboard
- plugin marketplace ideas
- HAR import/export helpers
See CONTRIBUTING.md.
MIT (LICENSE)
