A Linux network traffic control (tc netem) GUI with a security-focused split architecture. Features an unprivileged Iced frontend communicating with a privileged Rust backend via Zenoh messaging. Simulate network conditions like latency, packet loss, corruption, and rate limiting for testing and development.
- Rust 98.2%
- Just 1.5%
- Shell 0.3%
|
|
||
|---|---|---|
| .cargo | ||
| .github/workflows | ||
| configs | ||
| debian | ||
| docker | ||
| docs | ||
| flatpak | ||
| packaging | ||
| presets | ||
| scenarios | ||
| tcgui-backend | ||
| tcgui-frontend | ||
| tcgui-shared | ||
| .actrc | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| ARCHITECTURE_DESIGN.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| deny.toml | ||
| Justfile | ||
| LICENSE-MIT | ||
| PACKAGING.md | ||
| README.md | ||
| ZENOH_CONFIG.md | ||
TC GUI
Linux traffic control (tc netem) GUI with network namespace support. Split-architecture: unprivileged Iced frontend communicates with a privileged Rust backend via Zenoh.
Features
- Traffic Control: Loss, delay, duplicate, reorder, corrupt, rate limiting
- Network Scenarios: Predefined sequences of TC changes over time
- Namespace Support: Monitor and control interfaces across namespaces
- Real-time Monitoring: Live bandwidth statistics
Quick Start
# Build and set capabilities
just build
just set-caps
# Run (two terminals)
just run-backend # Terminal 1: requires sudo first time for caps
just run-frontend # Terminal 2
Or use just run for automatic backend management.
Architecture
Frontend (unprivileged) Backend (CAP_NET_ADMIN)
│ │
├──── Pub/Sub ◄────────────────┤ Interface lists, bandwidth, health
│ │
└──── Query/Reply ─────────────► TC operations, scenario execution
Zenoh
Crates
| Crate | Description |
|---|---|
tcgui-frontend |
Iced GUI application |
tcgui-backend |
Privileged service (tc, nlink) |
tcgui-shared |
Common types and messages |
Development
just dev # Format + check + clippy + test
just dev-fast # Format + fast-clippy + fast-test (60% faster)
just dev-minimal # Format + fast-test (~2 seconds)
See CLAUDE.md for full development commands.
Scenarios
Scenarios define sequences of TC configurations applied over time. See docs/scenario-format.md for the JSON5 format specification.
{
id: "example",
name: "Example Scenario",
steps: [
{ duration: "30s", description: "Add delay", tc_config: { delay: { base_ms: 100 } } },
{ duration: "30s", description: "Add loss", tc_config: { loss: { percentage: 5 } } },
],
}
Scenarios are loaded from:
./scenarios~/.config/tcgui/scenarios/usr/share/tcgui/scenarios
Security
The backend uses Linux capabilities instead of root:
sudo setcap cap_net_admin+ep target/release/tcgui-backend
This grants only network administration privileges, not full root access.
Requirements
- Linux with tc/netem support
- Rust 1.70+
justcommand runner
Documentation
- Scenario Format - JSON5 specification
- Best Practices - Scenario design guidelines
- Troubleshooting - Common issues
- Examples - Annotated scenarios
License
MIT