reqtrace

Crates.ioreqtrace
lib.rsreqtrace
version
sourcesrc
created_at2024-12-12 09:19:46.596358
updated_at2024-12-12 10:40:47.064553
descriptionA Simple command-line tool for real-time network activity monitoring, connection tracing, and network access control of any process or command.
homepage
repositoryhttps://github.com/onemadgeek/reqtrace
max_upload_size
id1481035
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Arun (onemadgeek)

documentation

README

reqtrace 🔍

A Simple command-line tool for real-time network activity monitoring, connection tracing, and network access control of any process or command.

Crates.io License: MIT

🚀 Features

  • Universal Command Monitoring: Monitor any command or process (curl, wget, npm, python, etc.)
  • Real-time Connection Tracking: Live visualization of all network connections
  • Domain Resolution: Automatic DNS resolution for IP addresses
  • Network Control Modes:
    • Monitor Only: Watch and log connections
    • Block & Exit: Terminate on first connection attempt
    • Block & Continue: Prevent network access while allowing execution
  • Detailed Statistics: Connection counts, unique domains, and IPs
  • Beautiful CLI Interface: Clear, colorful, and informative output

📦 Installation

cargo install reqtrace

🎯 Use Cases

Development & Testing

  • Test applications for unexpected network calls
  • Debug API integrations
  • Monitor dependency downloads
  • Verify offline-first functionality

Security & Compliance

  • Audit network behavior of third-party tools
  • Enforce network access policies
  • Detect unwanted analytics or tracking
  • Validate security requirements

System Administration

  • Monitor service network activity
  • Debug connection issues
  • Profile network usage
  • Control application network access

📚 Examples

Monitor Package Manager Activity

# Track npm installation network activity
reqtrace npm install express

# Monitor pip package downloads
reqtrace pip install requests

# Watch cargo dependencies
reqtrace cargo build

Security Testing

# Ensure a script doesn't make unauthorized connections
reqtrace -e python script.py

# Block all network access but allow execution
reqtrace -b node app.js

# Monitor Docker container network activity
reqtrace docker run nginx

API Development

# Debug API client connections
reqtrace curl api.example.com

# Monitor GraphQL queries
reqtrace npm run graphql-app

# Track WebSocket connections
reqtrace node websocket-server.js

🛠️ Command-Line Options

reqtrace [OPTIONS] <COMMAND> [ARGS]...

Options:
  -e, --exit-first     Exit on first network connection
  -b, --block         Block all network connections
  -t, --timeout       DNS lookup timeout (default: 1000ms)
  -v, --verbose       Show detailed debug information
  -h, --help          Show help information
  -V, --version       Show version information

🔧 Technical Details

Platform Support

  • ✅ Linux: Native /proc filesystem monitoring
  • ✅ macOS: Integration with lsof

Monitoring Capabilities

  • TCP connections (IPv4 and IPv6)
  • Domain name resolution
  • Connection timestamps
  • Process hierarchy

Performance Impact

  • Minimal overhead
  • Non-blocking DNS resolution
  • Efficient connection caching

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

📄 License

MIT License - feel free to use in personal and commercial projects.

🌟 Star History

Star History Chart

Commit count: 11

cargo fmt