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%
Find a file
2026-07-21 07:26:10 +02:00
.cargo chore: repair the security gates (pre-existing failures, not this branch) 2026-07-19 21:14:31 +02:00
.github/workflows chore(ci): stable must stay the default toolchain in the quality job 2026-07-19 22:25:51 +02:00
configs feat(ops): example router ACL with no-remote-actions on TC writes (#48) 2026-07-18 14:14:32 +02:00
debian chore(release): 0.8.0 2026-05-05 22:00:39 +02:00
docker Use Rust 1.92 in Dockerfile for edition 2024 support 2025-12-28 13:41:20 +01:00
docs feat!: adopt zenkey 0.2 + zblob from crates.io 2026-07-18 21:44:00 +02:00
flatpak Bump version to 0.2.0 2025-12-28 13:35:34 +01:00
packaging Add debian changelog and maintainer scripts for .deb packages 2025-12-28 14:04:36 +01:00
presets Add custom preset loading from JSON5 files 2025-12-17 15:02:06 +01:00
scenarios better error reporting 2025-12-10 16:34:36 +01:00
tcgui-backend feat: serve payload self-description (describe) + declare sample encodings 2026-07-19 14:17:43 +02:00
tcgui-frontend chore: drop unused ctrlc dependency (frontend) 2026-07-20 00:36:23 +02:00
tcgui-shared feat: serve payload self-description (describe) + declare sample encodings 2026-07-19 14:17:43 +02:00
.actrc initial commit 2025-10-21 12:04:35 +02:00
.gitignore Add debian changelog and maintainer scripts for .deb packages 2025-12-28 14:04:36 +01:00
.pre-commit-config.yaml initial commit 2025-10-21 12:04:35 +02:00
ARCHITECTURE_DESIGN.md initial commit 2025-10-21 12:04:35 +02:00
Cargo.lock chore: bump zenkey/zenkey-build to 0.3.2 2026-07-21 06:59:21 +02:00
Cargo.toml chore: bump zenkey/zenkey-build to 0.3.2 2026-07-21 06:59:21 +02:00
CHANGELOG.md feat!: adopt zenkey 0.2 + zblob from crates.io 2026-07-18 21:44:00 +02:00
CLAUDE.md feat!: adopt zenkey 0.2 + zblob from crates.io 2026-07-18 21:44:00 +02:00
deny.toml chore: cargo-deny v2 schema + licenses newer transitive deps actually ship 2026-07-19 21:28:07 +02:00
Justfile chore: run Miri without its isolation sandbox 2026-07-20 01:12:59 +02:00
LICENSE-MIT Add MIT license 2025-12-26 21:50:11 +01:00
PACKAGING.md initial commit 2025-10-21 12:04:35 +02:00
README.md Update docs: remove old plans/reports, update rtnetlink -> nlink references 2026-01-01 21:44:55 +01:00
ZENOH_CONFIG.md initial commit 2025-10-21 12:04:35 +02:00

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+
  • just command runner

Documentation

License

MIT