7 Commits

Author SHA1 Message Date
Marco Cadetg
5a059a3a12 feat: add Landlock sandbox and capability dropping for Linux (#86)
* feat: add Landlock sandbox and capability dropping for Linux

- Restrict filesystem access to /proc only after initialization
- Block TCP bind/connect on kernel 6.4+ (network sandbox)
- Drop CAP_NET_RAW after pcap handle opened
- Add --no-sandbox and --sandbox-strict CLI options
- Show privilege info on non-Linux platforms in UI
- Add SECURITY.md documentation

* fix: remove unused set_sandbox_info and hide Landlock line on non-Linux

* fix: gate SandboxInfo to Linux only to fix clippy warnings

* fix: add is_admin() function for Windows builds

The Windows build was failing because ui.rs called crate::is_admin()
but the function didn't exist. Added the implementation using Windows
Security API to check if the process has elevated privileges.

Also added Win32_Security feature to windows crate dependencies.

* fix: add is_admin() to main.rs for Windows binary crate

The previous fix added is_admin() to lib.rs but ui.rs is compiled
as part of the binary crate (main.rs), not the library crate.
Added the function to main.rs so crate::is_admin() resolves correctly.
2025-12-06 17:50:21 +01:00
Marco Cadetg
6e1426170b Feature/interface stats (#79)
* feat: adding interface stats

* macOS specific improvements

* fix windows interface stats
2025-11-22 17:34:53 +01:00
Marco Cadetg
dda39e5cdf feat: add TCP network analytics with retransmission detection (#72)
Adds real-time TCP connection quality monitoring:
- Retransmission detection via sequence number analysis
- Out-of-order packet tracking
- Fast retransmit detection (RFC 2581)
- Per-connection and aggregate statistics
- Network Stats panel in UI
- Platform-independent implementation using pcap data

Statistics show both active (current connections) and total
(cumulative) counts. Individual connection details display
per-connection metrics for troubleshooting network issues.
2025-11-14 12:38:38 +01:00
Marco Cadetg
a0e1e6d080 feat: sort bandwidth by combined up+down total (#64)
Changed bandwidth sorting to use the sum of upload and download speeds
instead of separate sorting for each direction. This provides a simpler
way to identify connections with the highest total bandwidth usage.

- Replace BandwidthDown/BandwidthUp with single BandwidthTotal enum
- Update sort logic to calculate combined rates
- Simplify UI to show "Down/Up ↓/↑" indicator
- Update documentation and tests
2025-10-25 20:58:20 +02:00
Marco Cadetg
4ae965a8a4 feat: remove CAP_NET_ADMIN and CAP_SYS_ADMIN, use read-only packet capture (#59)
Remove CAP_NET_ADMIN requirement and eliminate need for CAP_SYS_ADMIN on
modern kernels by using non-promiscuous mode for packet capture. This
significantly reduces security surface by following principle of least privilege.
2025-10-19 17:03:58 +02:00
Marco Cadetg
0d55a86605 Add TUN/TAP interface support (#43)
* feat: add TUN/TAP interface support

Add comprehensive support for TUN/TAP virtual network interfaces by
refactoring link layer parsing into modular components.

New modules:
- link_layer: Modular packet parsing (ethernet, raw_ip, linux_sll, tun_tap)
- protocol: Dedicated TCP/UDP/ICMP parsers

Changes:
- Remove TUN/TAP interface exclusions in capture.rs
- Add TUN/TAP detection and parsing support
- macOS PKTAP support with conditional compilation

Platform compatibility:
- Linux: Full TUN/TAP support
- macOS: TUN (utun*) and TAP support
- Windows: No breaking changes

Fixes #39
2025-10-11 14:10:50 +02:00
Marco Cadetg
b6b593056c docs: restructure documentation into focused files
Split large README.md (1101 lines) into separate documentation files
for better organization and maintainability:

- README.md: condensed to 233 lines with quick start and overview
- INSTALL.md: complete installation guide and permissions setup
- USAGE.md: detailed usage guide with filtering and sorting
- ARCHITECTURE.md: technical details and platform implementations
- EBPF_BUILD.md: updated references to new INSTALL.md structure

Added collapsible sections in README for optional details and
included "Documentation Moved" section for backward compatibility
with external links.
2025-10-09 13:12:47 +02:00