Commit Graph

56 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
3a8e8614bc feat: reorganize platform code into per-platform directories (#81)
* feat: reorganize platform code into per-platform directories

- Move platform files into linux/, macos/, windows/, freebsd/ subdirectories
- Unify create_process_lookup() API with _use_pktap parameter across all platforms
- Update build.rs paths for eBPF program location
- Reduce cfg attributes in main mod.rs from ~42 to 8

* fix: widen tolerance for test_sliding_window_no_skip_first_sample

Increase acceptable range from 9000-11000 to 5000-15000 to account
for timing variability on macOS ARM CI runners.

* docs: update Linux build dependencies and remove EBPF_BUILD.md

- Add missing build-essential, pkg-config, zlib1g-dev to documentation
- Update rust.yml CI with complete dependencies
- Remove EBPF_BUILD.md (info already in INSTALL.md)
- Update references in README.md and ARCHITECTURE.md
2025-11-30 18:08:11 +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
8822af9793 chore: update README.md a bit 2025-11-02 20:13:51 +01:00
Marco Cadetg
dc32e4a9f5 Add Homebrew installation instructions to README
Added Homebrew installation instructions for macOS and Linux.
2025-11-02 19:52:42 +01:00
Marco Cadetg
85b2662c85 feat: add freebsd (#71)
* feat: add freebsd
2025-11-02 19:47:26 +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
a402cdd545 docs: add Ubuntu PPA and Fedora COPR installation instructions (#48)
- Add Ubuntu PPA section to INSTALL.md (requires Ubuntu 25.10+)
- Add Fedora COPR section to INSTALL.md (requires Fedora 42+)
- Update README.md Quick Start with PPA/COPR as recommended methods
- Add GitHub Actions workflow to auto-update RPM spec version on tag push
2025-10-14 10:33:42 +02:00
Marco Cadetg
52fb1c2cce feat: make eBPF default on Linux (#46)
Make eBPF the default build configuration on Linux for better
performance and lower overhead process identification.

Changes:
- Set default features to include ebpf in Cargo.toml
- Remove explicit --features linux-default from build configs
- Update all documentation to reflect eBPF is now default
- Add instructions for building without eBPF (--no-default-features)

eBPF automatically falls back to procfs if it fails to load.

Closes #32
2025-10-12 13:53:11 +02:00
Marco Cadetg
811c0f8659 docs: add contributors 2025-10-12 09:11:59 +02:00
Marco Cadetg
529cab9d12 fix: eliminate excessive procfs scanning causing high CPU usage (#45)
The procfs-based process lookup was triggering a full scan on every cache
miss instead of relying on periodic refresh. This caused 50+ full procfs
scans per enrichment cycle when multiple connections lacked process info.

Changed get_process_for_connection() to do simple cache lookups only.
Periodic refresh (every 5s) is already handled by the enrichment thread.

Also added PROFILING.md with flamegraph profiling guide.
2025-10-11 16:40:47 +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
Marco Cadetg
24efc498f5 chore: fedora copr install instructions 2025-10-04 20:23:19 +02:00
Marco Cadetg
6a8e738a63 feat: implement Windows process identification via IP Helper API (#37)
- Add Windows process lookup using GetExtendedTcpTable/GetExtendedUdpTable
- Resolve process names via OpenProcess and QueryFullProcessImageNameW
- Support TCP/UDP IPv4 and IPv6 connections
- Implement time-based caching with 2-second TTL
- Fix port byte order conversion from network to host order
- Migrate from winapi to windows crate (v0.59)
- Add debug logging for process lookup operations
- Update documentation in ROADMAP.md and README.md

Closes #36
2025-10-04 16:32:08 +02:00
Marco Cadetg
80b5b0c2c1 feat: privilege detection (#31)
* feat: detect insufficient privileges before network interface access

- Add privilege detection module for Linux, macOS, and Windows
- Check privileges before TUI initialization for visible errors
- Provide platform-specific instructions (sudo, setcap, Docker flags)
- Detect container environments and provide Docker-specific guidance
2025-10-04 15:33:42 +02:00
Marco Cadetg
97ae20cd7b chore: document arch linux installation 2025-10-03 15:25:53 +02:00
Marco Cadetg
9ac3714ca4 fix: windows msi missing VC++ dist (#26)
- Add startup check that detects missing Npcap/WinPcap DLLs
- Display helpful error message with installation instructions
- Update README with note about runtime dependency checking
- Add winapi dependency for Windows DLL detection
2025-10-01 20:17:37 +02:00
Marco Cadetg
34fcec5273 feat: vim style g and shift G jump beginning / end 2025-10-01 18:25:23 +02:00
Marco Cadetg
e2bba4c854 fix: any interface on linux and add --show-localhost (#25) 2025-10-01 18:10:24 +02:00
Marco Cadetg
ebdbff6b7c feat: improve connection navigation and cleanup indication (#23) 2025-10-01 17:08:28 +02:00
Marco Cadetg
aac52a79d4 feat: adding sort (#22) 2025-10-01 10:53:56 +02:00
Marco Cadetg
5c656130e0 feat: add port option with using p (#21) 2025-10-01 07:36:30 +02:00
Marco Cadetg
42db7f5614 fix: release workflow (#17)
* Remove musl targets to simplify Linux builds and fix cross-compilation issues
* Enable eBPF by default on Linux via linux-default feature for better packet capture
* Add macOS code signing and notarization support with graceful fallback for unsigned builds
* Fix Windows MSI packaging with improved WiX configuration and Npcap library linking
* Auto-extract changelog content from CHANGELOG.md into GitHub release notes
* Fix ARM cross-compilation (aarch64, armv7) with proper library paths and eBPF support
* Add comprehensive installation documentation for DMG, MSI, DEB, and RPM packages
* Allow re-running releases with --clobber flag for artifact uploads
2025-09-30 09:39:26 +02:00
Marco Cadetg
799d66cf86 feat: Add experimental eBPF support for enhanced socket tracking (#11)
* feat: Add experimental eBPF support for enhanced socket tracking

- Implement eBPF-based socket tracker for Linux with CO-RE support
- Add minimal vmlinux header (5.5KB) instead of full 3.4MB file
- Create graceful fallback mechanism to procfs when eBPF unavailable
- Add comprehensive eBPF build documentation
- Integrate libbpf-rs for eBPF program loading and management
- Support both IPv4 and IPv6 socket tracking
- Add capability checking for required permissions

The eBPF feature is optional and disabled by default. When enabled,
it provides faster and more accurate process-to-socket mapping on
Linux systems with appropriate permissions.
2025-09-18 11:46:03 +02:00
Marco Cadetg
47d9748fba Update README.md badges
Removed unused badges and added Docker image badge.
2025-09-12 21:09:18 +02:00
Marco Cadetg
3b1e798c6f chore: readme badges 2025-09-12 20:54:31 +02:00
Marco Cadetg
ffdad67266 Update cross-platform support information in README 2025-09-12 18:02:07 +02:00
Marco Cadetg
3d4b1a8121 feat: successfully tested on windows 2025-09-12 17:57:49 +02:00
Marco Cadetg
bac2dce1e1 chore: adding cargo install instructions 2025-09-12 12:19:28 +02:00
Marco Cadetg
459504ebb6 feat: ssh dpi 2025-09-11 12:32:53 +02:00
Marco Cadetg
d07ec2ae77 add docker container 2025-09-10 14:33:03 +02:00
Marco Cadetg
8982d24abd implement option to filter for state 2025-09-10 11:35:34 +02:00
Marco Cadetg
445f70f1e8 option to filter connections 2025-09-09 15:35:16 +02:00
Marco Cadetg
523568a57a Fix image syntax in README.md 2025-09-07 15:35:06 +02:00
Marco Cadetg
5055b7846e adding rustnet gif
ne#
2025-09-07 15:32:11 +02:00
Marco Cadetg
3d51cb92b7 doc: tone it down a bit... 2025-09-03 15:56:26 +02:00
Marco Cadetg
4b941a57b0 adding asciicast demo 2025-08-30 13:45:06 +02:00
Marco Cadetg
d7cc812fcb splitting documentation between release, roadmap and README.md 2025-08-28 15:37:40 +02:00
Marco Cadetg
338952ec92 timeout no more configurable 2025-08-28 14:30:59 +02:00
Marco Cadetg
427d738426 improve connection state tracking 2025-08-28 14:28:10 +02:00
Marco Cadetg
5aa5999db4 updated changelog and readme 2025-08-27 17:50:24 +02:00
Marco Cadetg
48c9445117 document release process 2025-08-27 17:44:28 +02:00
Marco Cadetg
f183417216 use pktab on mac to retrieve process information 2025-08-27 17:43:54 +02:00
Marco Cadetg
6180bf1a23 adding permission section in README.md 2025-08-27 14:29:10 +02:00
Marco Cadetg
6abf95e53e update logging to be optional and by default not enabled 2025-08-27 09:12:58 +02:00
Marco Cadetg
f63919e34c update README.md 2025-08-07 17:59:35 +02:00
Marco Cadetg
f1d199dec7 adding TODOs 2025-08-02 15:13:04 +02:00
Marco Cadetg
0753c51444 acknowledge viby vibe 2025-08-02 15:00:31 +02:00