spongebob-cli 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spongebob_cli-0.3.2/MANIFEST.in +12 -0
- spongebob_cli-0.3.2/PKG-INFO +78 -0
- spongebob_cli-0.3.2/PRIVACY.md +21 -0
- spongebob_cli-0.3.2/PYPI_README.md +56 -0
- spongebob_cli-0.3.2/README.md +193 -0
- spongebob_cli-0.3.2/pyproject.toml +49 -0
- spongebob_cli-0.3.2/setup.cfg +4 -0
- spongebob_cli-0.3.2/spongebob/__init__.py +1 -0
- spongebob_cli-0.3.2/spongebob/__main__.py +375 -0
- spongebob_cli-0.3.2/spongebob/analyzer/__init__.py +9 -0
- spongebob_cli-0.3.2/spongebob/analyzer/__main__.py +39 -0
- spongebob_cli-0.3.2/spongebob/analyzer/analyzer.py +234 -0
- spongebob_cli-0.3.2/spongebob/bus/__init__.py +6 -0
- spongebob_cli-0.3.2/spongebob/bus/bus.py +38 -0
- spongebob_cli-0.3.2/spongebob/diagnose/__init__.py +29 -0
- spongebob_cli-0.3.2/spongebob/diagnose/__main__.py +111 -0
- spongebob_cli-0.3.2/spongebob/diagnose/adapter.py +82 -0
- spongebob_cli-0.3.2/spongebob/diagnose/models.py +79 -0
- spongebob_cli-0.3.2/spongebob/diagnose/probes.py +129 -0
- spongebob_cli-0.3.2/spongebob/engine/__init__.py +26 -0
- spongebob_cli-0.3.2/spongebob/engine/__main__.py +25 -0
- spongebob_cli-0.3.2/spongebob/engine/models.py +161 -0
- spongebob_cli-0.3.2/spongebob/engine/simulator.py +196 -0
- spongebob_cli-0.3.2/spongebob/export/__init__.py +25 -0
- spongebob_cli-0.3.2/spongebob/export/exporter.py +354 -0
- spongebob_cli-0.3.2/spongebob/meter/__init__.py +7 -0
- spongebob_cli-0.3.2/spongebob/meter/__main__.py +50 -0
- spongebob_cli-0.3.2/spongebob/meter/meter.py +140 -0
- spongebob_cli-0.3.2/spongebob/narrator/__init__.py +25 -0
- spongebob_cli-0.3.2/spongebob/narrator/narrator.py +352 -0
- spongebob_cli-0.3.2/spongebob/plugins/__init__.py +28 -0
- spongebob_cli-0.3.2/spongebob/plugins/loader.py +308 -0
- spongebob_cli-0.3.2/spongebob/plugins/models.py +47 -0
- spongebob_cli-0.3.2/spongebob/scenarios/__init__.py +25 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/__init__.py +1 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/control-line.toml +33 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/crowded-wifi.toml +33 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/flaky-last-mile.toml +33 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/long-haul-orbit.toml +33 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/overloaded-uplink.toml +35 -0
- spongebob_cli-0.3.2/spongebob/scenarios/builtin/tunnel-burst.toml +38 -0
- spongebob_cli-0.3.2/spongebob/scenarios/loader.py +205 -0
- spongebob_cli-0.3.2/spongebob/scenarios/models.py +55 -0
- spongebob_cli-0.3.2/spongebob/scenarios/runner.py +24 -0
- spongebob_cli-0.3.2/spongebob/ui/__init__.py +23 -0
- spongebob_cli-0.3.2/spongebob/ui/__main__.py +11 -0
- spongebob_cli-0.3.2/spongebob/ui/app.py +88 -0
- spongebob_cli-0.3.2/spongebob/ui/canvas.py +147 -0
- spongebob_cli-0.3.2/spongebob/ui/diagnose_screen.py +525 -0
- spongebob_cli-0.3.2/spongebob/ui/export_modal.py +158 -0
- spongebob_cli-0.3.2/spongebob/ui/menu_screen.py +159 -0
- spongebob_cli-0.3.2/spongebob/ui/replay.py +209 -0
- spongebob_cli-0.3.2/spongebob/ui/settings_screen.py +101 -0
- spongebob_cli-0.3.2/spongebob/ui/simulate_screen.py +566 -0
- spongebob_cli-0.3.2/spongebob/ui/theme.py +364 -0
- spongebob_cli-0.3.2/spongebob/ui/visualize_screen.py +411 -0
- spongebob_cli-0.3.2/spongebob_cli.egg-info/PKG-INFO +78 -0
- spongebob_cli-0.3.2/spongebob_cli.egg-info/SOURCES.txt +73 -0
- spongebob_cli-0.3.2/spongebob_cli.egg-info/dependency_links.txt +1 -0
- spongebob_cli-0.3.2/spongebob_cli.egg-info/entry_points.txt +2 -0
- spongebob_cli-0.3.2/spongebob_cli.egg-info/requires.txt +9 -0
- spongebob_cli-0.3.2/spongebob_cli.egg-info/top_level.txt +1 -0
- spongebob_cli-0.3.2/tests/test_diagnose_phase_b.py +252 -0
- spongebob_cli-0.3.2/tests/test_diagnose_phase_c.py +233 -0
- spongebob_cli-0.3.2/tests/test_diagnose_probes.py +178 -0
- spongebob_cli-0.3.2/tests/test_downloads_export.py +214 -0
- spongebob_cli-0.3.2/tests/test_engine.py +143 -0
- spongebob_cli-0.3.2/tests/test_export.py +209 -0
- spongebob_cli-0.3.2/tests/test_meter.py +130 -0
- spongebob_cli-0.3.2/tests/test_phase3.py +192 -0
- spongebob_cli-0.3.2/tests/test_phase5.py +233 -0
- spongebob_cli-0.3.2/tests/test_plugins_and_v03.py +296 -0
- spongebob_cli-0.3.2/tests/test_scenarios.py +321 -0
- spongebob_cli-0.3.2/tests/test_ui.py +143 -0
- spongebob_cli-0.3.2/tests/test_ui_redesign.py +91 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
include PYPI_README.md
|
|
2
|
+
include PRIVACY.md
|
|
3
|
+
recursive-include spongebob/scenarios/builtin *.toml
|
|
4
|
+
prune Pre-requirements
|
|
5
|
+
exclude agents.md
|
|
6
|
+
exclude architecture.json
|
|
7
|
+
exclude memory.md
|
|
8
|
+
exclude context.md
|
|
9
|
+
exclude workflows.md
|
|
10
|
+
exclude persona_maaaaa.txt
|
|
11
|
+
exclude king.json
|
|
12
|
+
exclude tiger.md
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: spongebob-cli
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: Spongebob — Terminal Network Impairment Simulator for delay, jitter, and packet loss.
|
|
5
|
+
Author: Vinay Bandla
|
|
6
|
+
Project-URL: Homepage, https://github.com/venkataramavinaybandla-crypto/Spongebob
|
|
7
|
+
Project-URL: Repository, https://github.com/venkataramavinaybandla-crypto/Spongebob
|
|
8
|
+
Project-URL: Issues, https://github.com/venkataramavinaybandla-crypto/Spongebob/issues
|
|
9
|
+
Keywords: network,simulator,delay,jitter,packet-loss,terminal,tui
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Topic :: System :: Networking
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: textual==8.2.8
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest>=9.0; extra == "dev"
|
|
18
|
+
Requires-Dist: pytest-asyncio<2,>=1.5.0; extra == "dev"
|
|
19
|
+
Provides-Extra: test
|
|
20
|
+
Requires-Dist: pytest>=9.0; extra == "test"
|
|
21
|
+
Requires-Dist: pytest-asyncio<2,>=1.5.0; extra == "test"
|
|
22
|
+
|
|
23
|
+
# Spongebob
|
|
24
|
+
|
|
25
|
+
Spongebob is an open-source, terminal-based **Network Impairment Simulator** focused on **Delay**, **Jitter**, and **Packet Loss**. Configure a multi-hop network path, inject controlled impairments into a simulated packet flow on a deterministic virtual clock, measure the resulting network metrics, and inspect rule-based findings and live terminal animations.
|
|
26
|
+
|
|
27
|
+
- **Delay:** Each packet waits a set time at a hop before moving on.
|
|
28
|
+
- **Jitter:** Wait times vary randomly per packet (uniform or normal), which can cause packets to arrive out of order.
|
|
29
|
+
- **Packet Loss:** Packets are dropped at a hop via random percentage, Gilbert-Elliott bursty loss, or queue-full tail drops under a bandwidth cap.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
Requires **Python 3.11+**.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pipx install spongebob-cli
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or with pip:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install spongebob-cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Run
|
|
46
|
+
|
|
47
|
+
Launch the terminal UI:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
spongebob
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Headless CLI commands:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
spongebob --version
|
|
57
|
+
spongebob scenarios
|
|
58
|
+
spongebob run <scenario-or-file.toml>
|
|
59
|
+
spongebob diagnose <host>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Diagnose Mode Limits
|
|
63
|
+
|
|
64
|
+
Diagnose mode probes a single user-supplied target using bounded TCP connect timing (and optional system DNS resolution) and feeds samples into the meter, analyzer, narrator, and visualizer:
|
|
65
|
+
|
|
66
|
+
- Measures **round-trip time (RTT)**, not one-way delay.
|
|
67
|
+
- TCP connect timeouts **approximate packet loss**; they are not exact packet loss.
|
|
68
|
+
- Throughput is reported as `n/a`, and bandwidth choke or reordering findings are skipped.
|
|
69
|
+
- Enforces single target, single port (`1-65535`), max `200` probes, minimum `100 ms` interval, and `100-5000 ms` timeout.
|
|
70
|
+
|
|
71
|
+
## Privacy
|
|
72
|
+
|
|
73
|
+
- **Zero network calls in Simulate mode:** All simulation, measurement, and analysis run purely in-memory.
|
|
74
|
+
- **User-confirmed Diagnose targets only:** Contacts only the single host and port you enter, after explicit confirmation.
|
|
75
|
+
- **No telemetry or history:** Nothing is collected or saved automatically; exports write only to the exact path you confirm.
|
|
76
|
+
- **Data-only plugins:** Plugins are parsed as TOML data only and are never imported or executed as code.
|
|
77
|
+
|
|
78
|
+
Source code and full documentation: https://github.com/venkataramavinaybandla-crypto/Spongebob
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Privacy Policy — Spongebob
|
|
2
|
+
|
|
3
|
+
Spongebob (Network Impairment Simulator) is built for local, offline impairment simulation and bounded, user-confirmed diagnostics.
|
|
4
|
+
|
|
5
|
+
## What this software does NOT do
|
|
6
|
+
- **No telemetry:** Zero usage metrics, crash reports, or analytics are collected or transmitted.
|
|
7
|
+
- **No update checks:** The software never phones home to check for new versions.
|
|
8
|
+
- **Zero network calls in Simulate mode:** All packet flows, delays, jitter, packet loss, bandwidth caps, and diagnostic analyses run purely in-memory on a virtual clock.
|
|
9
|
+
- **No history or automatic disk writes:** Configurations, probe targets, event logs, metrics, findings, and narrator state live only in memory for the current session.
|
|
10
|
+
|
|
11
|
+
## Explicit file and network access
|
|
12
|
+
- **Diagnose mode:** Contacts only the single target host and port you explicitly type, and only after you confirm the consent prompt on every run. No application data is sent.
|
|
13
|
+
- **Scenarios and plugins:** Files are read only from paths you explicitly type or pass via CLI flags; no home or default directories are scanned.
|
|
14
|
+
- **Plugins are data-only:** Plugins are parsed as TOML data only and are never imported or executed as code.
|
|
15
|
+
- **Exports:** Files are written only when you explicitly request an export (`--export <path>`, `--export-downloads`, or UI **Export**), to that exact path only. Diagnose export suggests a file in your Downloads folder, shows the exact path first, and writes only after you confirm. Diagnose reports include the target host you typed, so share them with care.
|
|
16
|
+
|
|
17
|
+
## Dependencies
|
|
18
|
+
- The core simulation engine, meter, event bus, analyzer, narrator, diagnose probes, scenarios, export, and plugin loader use only the Python standard library.
|
|
19
|
+
- The terminal user interface uses one pinned third-party dependency: `textual==8.2.8`.
|
|
20
|
+
|
|
21
|
+
This software aims for maximum practical privacy rather than making an "absolute" privacy claim.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Spongebob
|
|
2
|
+
|
|
3
|
+
Spongebob is an open-source, terminal-based **Network Impairment Simulator** focused on **Delay**, **Jitter**, and **Packet Loss**. Configure a multi-hop network path, inject controlled impairments into a simulated packet flow on a deterministic virtual clock, measure the resulting network metrics, and inspect rule-based findings and live terminal animations.
|
|
4
|
+
|
|
5
|
+
- **Delay:** Each packet waits a set time at a hop before moving on.
|
|
6
|
+
- **Jitter:** Wait times vary randomly per packet (uniform or normal), which can cause packets to arrive out of order.
|
|
7
|
+
- **Packet Loss:** Packets are dropped at a hop via random percentage, Gilbert-Elliott bursty loss, or queue-full tail drops under a bandwidth cap.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Requires **Python 3.11+**.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pipx install spongebob-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or with pip:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install spongebob-cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Run
|
|
24
|
+
|
|
25
|
+
Launch the terminal UI:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
spongebob
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Headless CLI commands:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
spongebob --version
|
|
35
|
+
spongebob scenarios
|
|
36
|
+
spongebob run <scenario-or-file.toml>
|
|
37
|
+
spongebob diagnose <host>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Diagnose Mode Limits
|
|
41
|
+
|
|
42
|
+
Diagnose mode probes a single user-supplied target using bounded TCP connect timing (and optional system DNS resolution) and feeds samples into the meter, analyzer, narrator, and visualizer:
|
|
43
|
+
|
|
44
|
+
- Measures **round-trip time (RTT)**, not one-way delay.
|
|
45
|
+
- TCP connect timeouts **approximate packet loss**; they are not exact packet loss.
|
|
46
|
+
- Throughput is reported as `n/a`, and bandwidth choke or reordering findings are skipped.
|
|
47
|
+
- Enforces single target, single port (`1-65535`), max `200` probes, minimum `100 ms` interval, and `100-5000 ms` timeout.
|
|
48
|
+
|
|
49
|
+
## Privacy
|
|
50
|
+
|
|
51
|
+
- **Zero network calls in Simulate mode:** All simulation, measurement, and analysis run purely in-memory.
|
|
52
|
+
- **User-confirmed Diagnose targets only:** Contacts only the single host and port you enter, after explicit confirmation.
|
|
53
|
+
- **No telemetry or history:** Nothing is collected or saved automatically; exports write only to the exact path you confirm.
|
|
54
|
+
- **Data-only plugins:** Plugins are parsed as TOML data only and are never imported or executed as code.
|
|
55
|
+
|
|
56
|
+
Source code and full documentation: https://github.com/venkataramavinaybandla-crypto/Spongebob
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="assets/mascot.png" alt="Spongebob hammering away at a broken network simulation" width="420">
|
|
4
|
+
|
|
5
|
+
<img src="assets/logo.png" alt="Spongebob" width="640">
|
|
6
|
+
|
|
7
|
+
<img src="assets/subtitle.svg" alt="Network Impairment Simulator and Visualizer" width="640">
|
|
8
|
+
|
|
9
|
+
<img src="assets/core-live.svg" alt="Delay, jitter, packet loss" width="760">
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
14
|
+
|
|
15
|
+
## What It Is
|
|
16
|
+
|
|
17
|
+
Spongebob is an open-source, terminal-based **Network Impairment Simulator** focused on **Delay**, **Jitter**, and **Packet Loss**. You configure a multi-hop network path, inject controlled impairments into a simulated packet flow on a deterministic virtual clock, measure the resulting network metrics, and inspect rule-based findings and live terminal animations.
|
|
18
|
+
|
|
19
|
+
- **Delay:** Each packet waits a set time at a hop before moving on.
|
|
20
|
+
- **Jitter:** Wait times vary randomly per packet (uniform or normal), which can cause packets to arrive out of order.
|
|
21
|
+
- **Packet Loss:** Packets are dropped at a hop via random percentage, Gilbert-Elliott bursty loss, or queue-full tail drops under a bandwidth cap.
|
|
22
|
+
|
|
23
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
24
|
+
|
|
25
|
+
## Install and Run
|
|
26
|
+
|
|
27
|
+
Requires **Python 3.11+**.
|
|
28
|
+
|
|
29
|
+
From a local clone:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pipx install .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For development (editable install):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pipx install -e .
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Launch the terminal UI (opens the main menu):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
spongebob
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
CLI flags and headless module runners:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
spongebob --version
|
|
51
|
+
spongebob --help
|
|
52
|
+
spongebob scenarios
|
|
53
|
+
spongebob run <file.toml | builtin-name> [--seed N] [--export <path>]
|
|
54
|
+
spongebob diagnose <host> [--port 443] [--count 20] [--interval-ms 200] [--dns] [--export <path> | --export-downloads [md|json|csv]]
|
|
55
|
+
spongebob plugins <dir>
|
|
56
|
+
python -m spongebob
|
|
57
|
+
python -m spongebob.engine
|
|
58
|
+
python -m spongebob.meter
|
|
59
|
+
python -m spongebob.analyzer
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Run the test suite:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pytest -v
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
69
|
+
|
|
70
|
+
## Screens
|
|
71
|
+
|
|
72
|
+
- **Menu:** Keyboard-first launcher for **Simulate**, **Visualize**, **Diagnose**, **Settings: Narrator ON/OFF** (session-only), and **Quit**.
|
|
73
|
+
- **Simulate:** Edit flow settings (packet count, interval, size, seed) and per-hop impairments (`client`, `router`, `isp`, `server`) with live validation. Displays measured metrics, severity-colored findings pinned to the responsible hop, and mascot narration. Press `V` from results to open **Visualize** with that run.
|
|
74
|
+
- **Diagnose:** Configure a single target host, port, probe count, interval, and optional DNS check, confirm consent, and inspect live RTT metrics, segment-pinned findings, mascot narration, and non-loss errors. Press `V` from results to open **Visualize** in RTT mode.
|
|
75
|
+
- **Visualize:** Full-terminal Braille living-pipe animation replaying events through the synchronous event bus, with bandwidth bottlenecks, queue pileups, distinct drop effects (including silent fade-out for probe timeouts), live telemetry, and a diagnostic scan pulse that stalls at the highest-severity hop. Controls: `Space` pause/resume, `+`/`-` speed (`0.25x`–`8x`), `R` restart, `P` pulse, `Esc` back.
|
|
76
|
+
|
|
77
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
78
|
+
|
|
79
|
+
## Diagnose Mode
|
|
80
|
+
|
|
81
|
+
Diagnose mode probes a single user-supplied target using bounded TCP connect timing (and optional system DNS resolution) and feeds the resulting samples into the same meter, analyzer, narrator, and visualizer pipeline.
|
|
82
|
+
|
|
83
|
+
- **How to run:** Choose **Diagnose** from the main menu, or run `spongebob diagnose <host> [--port 443] [--count 20] [--interval-ms 200] [--dns]`.
|
|
84
|
+
- **What it contacts:** Only the target host and single port you type in, and only after you explicitly confirm the consent prompt (`y`).
|
|
85
|
+
- **Honest limits:**
|
|
86
|
+
- Measures **round-trip time (RTT)**, not one-way delay.
|
|
87
|
+
- TCP connect timeouts **approximate packet loss**; they are not exact packet loss.
|
|
88
|
+
- `BANDWIDTH_CHOKE` and `REORDERING` findings are skipped (not observable from connect probes).
|
|
89
|
+
- Throughput is reported as `n/a` (no application data is sent).
|
|
90
|
+
- Safety limits enforced: single target, single port (`1-65535`), count capped at `200`, minimum interval `100 ms`, timeout `100-5000 ms`, and early abort after `3` consecutive non-loss errors (`refused`, `unreachable`, `dns_error`).
|
|
91
|
+
- Nothing is saved to disk, no history is kept, and every run requires explicit confirmation.
|
|
92
|
+
|
|
93
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
94
|
+
|
|
95
|
+
## Reading the Metrics
|
|
96
|
+
|
|
97
|
+
- **Delay:** The fixed time a hop holds each packet before forwarding it, in milliseconds (`ms`).
|
|
98
|
+
- **Jitter:** How much packet-to-packet arrival timing wobbles (reported using the RFC 3550 smoothed jitter estimator and mean absolute delta in `ms`).
|
|
99
|
+
- **Packet Loss:** The percentage of sent packets that never reached the destination (`lost / sent * 100`), plus a per-hop breakdown showing which hop dropped them.
|
|
100
|
+
- **Latency (`min`, `avg`, `max`, `p95`):** Total one-way travel time from send to delivery in `ms`. `p95` means 95% of delivered packets arrived in that time or less.
|
|
101
|
+
- **Throughput (`kbps`):** Effective delivery rate in kilobits per second across the flow duration (`delivered bytes * 8 / duration_ms`).
|
|
102
|
+
|
|
103
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
104
|
+
|
|
105
|
+
## Privacy
|
|
106
|
+
|
|
107
|
+
- **No telemetry:** Zero usage metrics, crash reports, or analytics are collected or transmitted.
|
|
108
|
+
- **No update checks:** The software never phones home to check for new versions.
|
|
109
|
+
- **No network calls in simulation mode:** All flows, impairments, measurements, and analyses run purely in-memory on a virtual clock.
|
|
110
|
+
- **Nothing written to disk by default:** Configurations, events, metrics, findings, and narrator state stay in memory for the current session only.
|
|
111
|
+
- **Minimal dependencies:** Core modules use the Python standard library only; the UI uses one pinned third-party dependency (`textual==8.2.8`).
|
|
112
|
+
|
|
113
|
+
Spongebob aims for maximum practical privacy rather than making an "absolute" privacy claim. See [PRIVACY.md](PRIVACY.md) for details.
|
|
114
|
+
|
|
115
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
116
|
+
|
|
117
|
+
## Scenarios
|
|
118
|
+
|
|
119
|
+
Scenarios define a reproducible flow and hop path in TOML (`<= 64 KB`, `<= 12` hops, `<= 100,000` packets):
|
|
120
|
+
|
|
121
|
+
- **`[scenario]`:** `name`, `description`
|
|
122
|
+
- **`[flow]`:** `packets`, `interval_ms`, `size_bytes`, optional `seed`
|
|
123
|
+
- **`[[hop]]`:** `name`, `delay_ms`, `jitter_ms`, `loss_pct`, plus optional `jitter_model`, `bandwidth_kbps`, `queue_limit_packets`, `loss_model`, `p_good_to_bad`, `p_bad_to_good`, `loss_good`, `loss_bad`
|
|
124
|
+
|
|
125
|
+
Built-in scenarios:
|
|
126
|
+
|
|
127
|
+
- `control-line` — Clean wired baseline (no findings)
|
|
128
|
+
- `crowded-wifi` — Peak-hour wireless jitter and mild loss
|
|
129
|
+
- `tunnel-burst` — Gilbert-Elliott two-state bursty loss
|
|
130
|
+
- `long-haul-orbit` — High propagation delay with steady timing
|
|
131
|
+
- `overloaded-uplink` — Tight bandwidth cap and queue-full tail drops
|
|
132
|
+
- `flaky-last-mile` — Degraded access link with random packet loss
|
|
133
|
+
|
|
134
|
+
Run from the CLI (`spongebob scenarios` to list, `spongebob run <file.toml | builtin-name> [--seed N]`) or load inside **Simulate**.
|
|
135
|
+
|
|
136
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
137
|
+
|
|
138
|
+
## Export
|
|
139
|
+
|
|
140
|
+
Both `spongebob run` and `spongebob diagnose` (and their UI result panels) support exporting reports only when you explicitly pass `--export <path>` or click **Export**:
|
|
141
|
+
|
|
142
|
+
- **`.json`:** Schema v1 with `spongebob_version`, `source`, `scenario` (when available), `metrics`, `findings`, `narrator`, and raw `events` only when `--events` is passed. Diagnose exports include `"latency_kind": "rtt"` and the typed target host/port.
|
|
143
|
+
- **`.csv`:** One row per packet (`seq`, `send_time_ms`, `outcome`, `latency_ms`, `drop_hop`, `drop_reason`) with formula-injection escaping.
|
|
144
|
+
- **`.md`:** Human-readable report with configured vs. measured values (for simulations), full metrics, severity-ordered findings, mascot lines (omit with `--no-narrator`), and honest RTT/timeout limits (for diagnose).
|
|
145
|
+
|
|
146
|
+
Exports are deterministic (no timestamps), atomic, never create missing parent folders, and refuse to overwrite existing files unless `--force` (or UI confirmation) is given. In Diagnose mode, the UI Export dialog suggests a file in your Downloads folder (`spongebob-diagnose-<target>.md`), shows the exact path first, and writes only after you press Save (or pass `--export-downloads` on the CLI). Diagnose reports include the target host you typed, so share them with care.
|
|
147
|
+
|
|
148
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
149
|
+
|
|
150
|
+
## Plugins
|
|
151
|
+
|
|
152
|
+
Plugins are **data-only** folders containing `plugin.toml` plus TOML data files (`<= 20` files, `<= 64 KB` each, `<= 512 KB` total). Spongebob **never** imports, `eval`s, or executes code from plugins. Loading is **explicit only** (`--plugins <dir>` on the CLI or **Plugins & Settings** in the UI).
|
|
153
|
+
|
|
154
|
+
Three plugin kinds are supported:
|
|
155
|
+
|
|
156
|
+
1. **`scenarios`** — `.toml` scenario files registered as `<plugin-name>/<scenario>` (cannot override built-ins):
|
|
157
|
+
|
|
158
|
+
```toml
|
|
159
|
+
# plugin.toml
|
|
160
|
+
name = "campus-lab"
|
|
161
|
+
version = "0.1.0"
|
|
162
|
+
kind = "scenarios"
|
|
163
|
+
description = "Lab impairment scenarios"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
2. **`jokes`** — Additional lines for `[findings]` (`"CODE.severity"`) and `[drop_reasons]` (`<= 200` chars, `{hop}` and `{value}` only, no control/ANSI escapes or banned names), added to built-in pools:
|
|
167
|
+
|
|
168
|
+
```toml
|
|
169
|
+
# jokes.toml
|
|
170
|
+
[findings]
|
|
171
|
+
"HIGH_DELAY.warn" = ["{hop} is paddling slowly at {value} ms!"]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
3. **`theme`** — 6-digit hex color overrides under `[colors]` validated for contrast ratio `>= 4.5`:
|
|
175
|
+
|
|
176
|
+
```toml
|
|
177
|
+
# theme.toml
|
|
178
|
+
[colors]
|
|
179
|
+
bg = "#000501"
|
|
180
|
+
cream = "#cbf7bc"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
184
|
+
|
|
185
|
+
## Roadmap
|
|
186
|
+
|
|
187
|
+
- **Candidate:** Time-varying scenarios (impairments that change mid-run).
|
|
188
|
+
|
|
189
|
+
<img src="assets/divider-live.svg" alt="" width="100%">
|
|
190
|
+
|
|
191
|
+
<img src="assets/details.svg" alt="Subject: Computer Networks and Network Programming. Creator: Vinay Bandla (2520030437). Guide: S. Madhavi." width="100%">
|
|
192
|
+
|
|
193
|
+
<img src="assets/footer.svg" alt="" width="100%">
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "spongebob-cli"
|
|
7
|
+
version = "0.3.2"
|
|
8
|
+
description = "Spongebob — Terminal Network Impairment Simulator for delay, jitter, and packet loss."
|
|
9
|
+
readme = "PYPI_README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
authors = [{name = "Vinay Bandla"}]
|
|
12
|
+
keywords = ["network", "simulator", "delay", "jitter", "packet-loss", "terminal", "tui"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Topic :: System :: Networking",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
]
|
|
18
|
+
dependencies = [
|
|
19
|
+
"textual==8.2.8",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
dev = [
|
|
24
|
+
"pytest>=9.0",
|
|
25
|
+
"pytest-asyncio>=1.5.0,<2",
|
|
26
|
+
]
|
|
27
|
+
test = [
|
|
28
|
+
"pytest>=9.0",
|
|
29
|
+
"pytest-asyncio>=1.5.0,<2",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://github.com/venkataramavinaybandla-crypto/Spongebob"
|
|
34
|
+
Repository = "https://github.com/venkataramavinaybandla-crypto/Spongebob"
|
|
35
|
+
Issues = "https://github.com/venkataramavinaybandla-crypto/Spongebob/issues"
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
spongebob = "spongebob.__main__:main"
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.packages.find]
|
|
41
|
+
where = ["."]
|
|
42
|
+
include = ["spongebob*"]
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.package-data]
|
|
45
|
+
"spongebob.scenarios" = ["builtin/*.toml"]
|
|
46
|
+
|
|
47
|
+
[tool.pytest.ini_options]
|
|
48
|
+
pythonpath = ["."]
|
|
49
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.2"
|