Skip to content

feat: v0.3.0 — alerts, firewall, containers, tracing, and fullscreen views#1

Merged
rekurt merged 5 commits into
masterfrom
feat/v0.3.0-major-features
Apr 5, 2026
Merged

feat: v0.3.0 — alerts, firewall, containers, tracing, and fullscreen views#1
rekurt merged 5 commits into
masterfrom
feat/v0.3.0-major-features

Conversation

@rekurt

@rekurt rekurt commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

Major v0.3.0 release: 16 new features across monitoring, security,
containers, and navigation — plus critical bug fixes for lsof parsing.

New Features

Monitoring & Alerts

  • Alerts engine — configurable rules with highlight / bell actions
  • Bandwidth tracking — per-entry RX/TX deltas via BandwidthTracker
  • Suspicious detection — heuristics for unusual outbound connections
  • Known ports DB — ~170 well-known services + user overrides from TOML

Security & Networking

  • Firewall integration — block remote IPs via pf (macOS) / iptables (Linux)
  • strace/dtruss — attach/detach tracer to selected PID
  • SSH port forwarding — interactive tunnel creation with ForwardManager
  • Container awareness — resolve Docker/Podman container names per PID
  • Linux namespaces — dedicated view for net-namespace isolation

Views & Navigation

  • Fullscreen views (keys 4–7): Chart, Topology, ProcessDetail, Namespaces
  • Process detail cache — avoids per-frame procfs re-reads
  • Focus stability — selection tracked by (port, pid) identity across refreshes
  • Gone-entry retention — 5s visibility for disappeared connections

CLI & Config

  • --json streaming — NDJSON output, one entry per scan cycle
  • watch subcommand — compact UP/DOWN monitor with BEL on changes
  • TOML config~/.config/prt/config.toml for rules, known ports, overrides

Bug Fixes

  • Fix UDP protocol detectionlsof -F output never contained "UDP"
    in the n field, so all UDP connections were classified as TCP. Added P
    field to lsof flags and parse protocol explicitly.
  • Fix TCP state parsingTST=LISTEN arrives AFTER the n line in lsof
    -F output; parser now buffers address and flushes on fd/process boundary.
  • Fix sort performancesort_entries was allocating strings on every
    comparison; added Ord to Protocol/ConnectionState enums.
  • Fix i18n gaps — translated iface_bind, localized fmt_kill_sent /
    fmt_sudo_error, aligned conn_process padding in ru.rs.
  • Remove unused arboard dep from prt-core (only used in TUI crate).

Breaking Changes

prt-core public API significantly expanded. New modules:
config, known_ports, core::{alerts, firewall, container, namespace, process_detail, bandwidth, suspicious}. Session gained public config
and bandwidth fields.

…wn ports, fullscreen views

Major release adding data enrichment (known ports DB, connection aging,
suspicious detector, container awareness, bandwidth estimation), new
fullscreen views (chart, topology, process detail, namespaces), action
features (firewall quick-block, strace attach, SSH forwarding), new CLI
modes (NDJSON streaming, port watch), TOML config with alert rules,
ViewMode-based UI architecture with context-sensitive footer and
scrollable fullscreen views. Includes code review fixes for container
double-wait deadlock, namespace bind-mount resolution, and try_sudo
missing retain call. 188 tests, 0 clippy warnings.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

rekurt added 4 commits April 5, 2026 04:11
dirs v6 → dirs-sys → option-ext uses MPL-2.0 (weak copyleft,
compatible with MIT/Apache-2.0). Also remove unused ISC and
Unicode-DFS-2016 entries to silence warnings.
- Expand all 3 READMEs (EN/RU/ZH) with detailed per-feature docs:
  each feature gets its own section with explanation, usage, and examples
- Remove Sparkline History from CHANGELOG (backend exists but UI not wired)
- Remove SSH Port Forwarding from CHANGELOG (backend exists but no keybinding)
- Update CLAUDE.md: mark history as internal, note forward.rs status
- Update CONTRIBUTING.md: remove forward from module list
- Update crate READMEs with accurate module descriptions
SSH Port Forwarding (F key):
- Input dialog prompts for remote host:port
- Creates SSH -L tunnel from selected local port
- Active tunnels shown in header bar (⇄ summary)
- Health-checked each tick, auto-killed on exit via Drop
- Input parser with 7 unit tests

Sparkline History removal:
- Deleted history.rs (168 lines, 8 tests) — backend was never
  connected to UI rendering
- Removed ConnectionHistory from Session, update_history() calls
- Clean removal: no dead code left

i18n: added forward_prompt_title, forward_host_label,
forward_confirm_hint, hint_forward in all 3 languages

Documentation: updated all 8 doc files with forwarding feature,
removed history references

188 tests, 0 clippy warnings, fmt clean.
@rekurt rekurt changed the title feat: v0.3.0 — 16 major features feat: v0.3.0 — alerts, firewall, containers, tracing, and fullscreen views Apr 5, 2026
@rekurt rekurt merged commit 3420671 into master Apr 5, 2026
3 checks passed
@rekurt rekurt deleted the feat/v0.3.0-major-features branch April 5, 2026 14:28
rekurt pushed a commit that referenced this pull request Jun 12, 2026
…t, model health

Auto-reconnect (#1,#2,#3,#8):
- Backoff now actually grows for unreachable hosts. The reset was tied to
  a 'successful' 150ms spawn, which an unreachable host passes (it blocks
  on TCP timeout), so the delay never increased. Growth now happens on
  every attempt and is reset only after a tunnel stays Alive for
  STABLE_THRESHOLD (30s), via refresh_health.
- reconnect uses a new non-blocking restart_async() (no 150ms sleep in the
  render thread); failures are caught on the next tick. Manual restart()
  stays blocking for immediate feedback.
- After MAX_RETRIES attempts without recovery a tunnel is marked permanently
  failed (auto_reconnect=false); drop_failed() now prunes only those, so
  'save' no longer discards a tunnel that's mid-reconnect. auto_reconnect
  is now a meaningful flag.

Listener health in the model (#4,#5):
- New TunnelStatus::Unhealthy (process alive, local port not listening).
  Decision extracted to a pure, unit-tested decide_status(); a HEALTH_GRACE
  window and a scan_usable flag suppress false 'no listener' right after
  start and while auto-refresh is paused. cleanup() now takes the listening
  port set; the view no longer reaches into the scan.

Cleanups:
- command_string() shell-quotes args via shlex (#6).
- uptime column reuses prt-core format_duration (#7).
- private from_parts() constructor removes spawn duplication (#9).
- cross-reference comments between PROXY_PORTS and known_ports (#10).

New unit tests: decide_status, next_backoff, command_string quoting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant