Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

317 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows MTR

Windows MTR Banner

Network diagnostics for Windows environments

CI Release Security Version License

Stars Usage Guide Sponsor


Windows MTR is a Windows-focused network diagnostics CLI inspired by Linux mtr. On Windows, the default interactive UI plus IPv4 ICMP report, JSON, CSV, and dashboard probes use the system ICMP Helper API; TCP and UDP probes continue to use embedded Trippy. The experimental dashboard provides Overview, Hops, and Charts views with explicit loading and poll-error states; it is not a stable replacement for the embedded interactive TUI.

image

📚 Table of Contents

🌟 Features

🚀 Core Features

  • Multi-protocol support: ICMP, TCP SYN, and UDP
  • Interactive TUI for live monitoring
  • Report mode for static output generation
  • IPv4 and IPv6 support
  • Cross-platform compatibility
  • Simple, clean command-line interface

⚙️ Technical Excellence

  • RFC 4884 compliant implementation
  • Zero-copy, lock-free networking
  • State machine-based probe engine
  • Direct WinAPI integration
  • High-performance packet processing
  • ETW (Event Tracing for Windows) (Roadmap)

🔍 Enterprise Benefits

  • Detailed performance metrics
  • Network path visualization
  • Early detection of routing issues
  • Packet loss identification
  • Latency measurement and analysis
  • Automated release and testing

📊 Performance

Windows MTR prioritizes predictable diagnostics and operational safety over unverified headline metrics. Performance and coverage claims should be treated as release-specific and validated from CI artifacts/benchmarks for each tagged release.

  • Probe throughput depends on protocol, host kernel/network stack, and runtime flags
  • Test coverage trends are tracked in CI and may vary by release
  • Timing precision depends on OS scheduler behavior and system load
  • Distribution size varies by release artifact composition and compression strategy

🔐 Security

Windows MTR is built with enterprise-level security practices:

  • 🛡️ Regular security audits with automated scanning
  • 🔒 All dependencies vetted for vulnerabilities
  • 🧪 Fuzz harness implemented with CI regression gating
  • 🔑 SHA-256 checksum verification for canonical release ZIP artifacts

REST API security and operational limits (v1, implemented)

For REST API mode (mtr --api), the enforced security baseline is:

  • Default bind address: 127.0.0.1:3000 (localhost only, enforced)
  • Non-local bind requires explicit auth strategy (--api-auth api-key|mtls) and secure key handling (--api-key-env preferred for api-key)
  • Default request timeout: 10s
  • Max concurrent probes: 8
  • Max requests per rate-limit window: 8
  • Rate-limit window duration: 10s
  • Max targets per request: 8
  • Max payload size: 16 KiB
  • Max retained completed jobs: 1024
  • Completed job TTL: 15m

See docs/security/rest-api.md for the full threat model and controls.

💻 Installation

Tip

Canonical distribution source: GitHub Releases. The primary artifact is windows-mtr-x86_64.zip.

Windows

Canonical install (recommended)

  1. Download windows-mtr-x86_64.zip from GitHub Releases.
  2. Extract it; the ZIP contains mtr.exe, windows-mtr.exe, README.txt, and SHA256SUM.
  3. Run PowerShell or CMD as Administrator.
  4. Start with .\mtr.exe 8.8.8.8 (or .\windows-mtr.exe -r -c 10 8.8.8.8).

System Requirements

  • Windows 7/Server 2012 R2 or later
  • 50MB disk space
  • Administrator privileges required for network operations

Docker

# Pull a release-tagged Windows MTR container (GHCR)
docker pull ghcr.io/benjisho/windows-mtr:v1.2.6

# Pull a release-tagged Windows MTR container (Docker Hub)
docker pull benjisho/windows-mtr:v1.2.6

# Run with direct networking (pin to a specific release tag)
docker run --network host ghcr.io/benjisho/windows-mtr:v1.2.6 -c 5 -r 8.8.8.8

Container images are published from the Release workflow to both GHCR (ghcr.io/benjisho/windows-mtr) and Docker Hub (benjisho/windows-mtr) from explicit release tags like v1.2.3 for linux/amd64 and linux/arm64.

Note

Windows container networking can vary by environment. If --network host is not available in your setup, run the binary directly on the host for full probe capability.

Build from Source on Windows

Follow these steps to compile the Windows MTR executable:

  1. Install Rust with rustup (Rust 1.88.0+ required).

  2. Install Visual Studio Build Tools and select the Desktop development with C++ workload.

  3. Clone this repository and change into the project directory:

    git clone https://github.com/benjisho/windows-mtr.git
    cd windows-mtr
  4. (Optional) Generate a lockfile if you need to build offline:

    cargo generate-lockfile
  5. Compile in release mode:

    cargo build --release
  6. After a successful build the binary is located at target\release\mtr.exe.

The resulting executable is now self-contained and embeds Trippy directly (no additional runtime executable required).

🚀 Quick Start

Administrator Privileges Required

Windows MTR requires administrator privileges to run properly, as it needs to send and receive network packets at a low level:

  1. Right-click on Command Prompt or PowerShell and select "Run as administrator"
  2. Navigate to your Windows MTR directory or add it to your PATH
  3. Run your MTR commands with elevated privileges

Basic ICMP Trace (Default)

mtr 8.8.8.8

Tip

From the canonical ZIP, use .\mtr.exe or .\windows-mtr.exe directly.

Dashboard fallback UI (experimental, limited)

mtr --ui dashboard 8.8.8.8

--ui enhanced is currently unavailable with bundled Trippy 0.13.0. Use default mode (mtr 8.8.8.8) for the full embedded Trippy TUI.

Report mode with DNS disabled (faster + script-friendly)

mtr -n -r -c 20 1.1.1.1

Troubleshooting

If interactive TUI crashes (for example Windows status 0xC0000005), try:

.\mtr.exe --ui dashboard 8.8.8.8

For stable non-interactive diagnostics:

.\mtr.exe -n -r -c 5 8.8.8.8

Generate a Shareable Report

mtr -c 10 -r 8.8.8.8 > network-report.txt

Generate JSON for automation

mtr --json -c 20 8.8.8.8 > network-report.json

JSON output includes a top-level schema_version field (current: "1.0"). This value is bumped when the CLI JSON schema changes.

Generate CSV for spreadsheets/ETL

mtr --csv network-report.csv -c 20 8.8.8.8

Test HTTPS Connectivity

mtr -T -P 443 example.com

REST API mode (same binary)

# Start API server on localhost (default 127.0.0.1:3000)
mtr --api

# Start API server on a specific localhost bind
mtr --api --api-bind 127.0.0.1:4000

# Secure remote bind with API key from environment (preferred)
WINDOWS_MTR_API_KEY='replace-me' mtr --api --api-bind 0.0.0.0:4000 --api-auth api-key --api-key-env WINDOWS_MTR_API_KEY

# Tune REST API rate limiting (defaults: 8 requests per 10-second window)
mtr --api --api-max-requests-per-window 20 --api-rate-limit-window-seconds 30

# Secure remote bind with mTLS identity forwarding
mtr --api --api-bind 0.0.0.0:4000 --api-auth mtls

Full Usage Examples

Visit our detailed usage guide for comprehensive examples.

📈 Advanced Features

Network Troubleshooting Playbook

Diagnosing High Latency

When experiencing high latency to a destination, use:

mtr -c 50 -i 0.2 destination

This sends 50 packets with a short interval of 0.2 seconds to help identify where latency spikes occur.

Identifying Packet Loss

To accurately measure packet loss along a route:

mtr -c 100 -r destination

The report mode with a higher count provides more statistically significant packet loss data.

Testing Specific Services

For web server connectivity issues:

mtr -T -P 80 webserver.example.com

For HTTPS:

mtr -T -P 443 webserver.example.com

For email server connectivity:

mtr -T -P 25 mailserver.example.com
Enterprise Integration

API Usage

Windows MTR can be integrated into your monitoring systems:

mtr -c 10 -r --json 8.8.8.8 > metrics.json

Automation

Schedule regular network tests with Windows Task Scheduler:

$action = New-ScheduledTaskAction -Execute "C:\Tools\windows-mtr\mtr.exe" -Argument "-c 10 -r 8.8.8.8"
$trigger = New-ScheduledTaskTrigger -Daily -At 8am
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "Daily Network Test" -Description "Runs MTR test each morning"

Centralized Monitoring

For enterprise environments, use our logging features to send results to central systems:

mtr --json -c 10 8.8.8.8 | curl -X POST -d @- https://logging.example.com/api/v1/logs

📦 Installation Status Matrix

Method Status Command
GitHub Releases ZIP Supported (canonical) Download windows-mtr-x86_64.zip, then run .\mtr.exe 8.8.8.8
WinGet Planned (manifest prepared) winget install --manifest .\packaging\winget (local validation)
Scoop Planned (manifest prepared) scoop install .\packaging\scoop\windows-mtr.json
Chocolatey Planned (template prepared) choco pack then choco install windows-mtr.portable --source . -y
crates.io Future cargo install windows-mtr --locked
cargo-binstall Future Deferred until release artifact naming is finalized
Docker/GHCR Partial/optional docker run --rm ghcr.io/benjisho/windows-mtr:latest --help
Homebrew/Snap/.deb/.rpm Deferred Deferred pending Linux/macOS runtime validation

✅ Capability Status

Capability claims are validated against source code, tests, CI, documentation, and release artifact flow in docs/capability-validation.md.

📋 Documentation

📊 Project Status & Roadmap

The full roadmap now lives in docs/ROADMAP.md, which is the single source of truth for feature status and planned milestones.

Quick snapshot:

  • ✅ Released: Core MTR functionality, IPv6, Docker, JSON output, DNS cache TTL, REST API v1 (authentication, rate limiting, concurrency controls).
  • 🚧 In progress: experimental dashboard fallback UI (--ui dashboard, --ui native alias).
  • ✅ Released: versioned JSON schema, CSV export, release-artifact smoke validation, and weekly extended fuzz regression.
  • 📅 Planned / 🛣️ Roadmap: SNMP integration, ETW observability, native TLS termination (if adopted), and runtime cleanup.

🤝 Contributing

We welcome contributions from the community! Check out our contributing guidelines to get started.

Run repository checks locally (manual)

To run the same repository-wide hook suite used in CI:

python -m pip install pre-commit
pre-commit run --all-files

Before running local pre-commit hooks, install Rust via rustup and make sure cargo is available on your PATH.

Local API verification workflow

To validate API behavior and schema compatibility locally, run:

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --test api_contract_tests -- --nocapture
cargo test --test api_integration_tests -- --nocapture
./scripts/check_openapi_compat.sh master

check_openapi_compat.sh resolves origin/<base-ref> first, then local <base-ref>, then HEAD~1 as a local fallback. It requires a local Docker engine and you can pin a different oasdiff image via OASDIFF_IMAGE=<image:tag>.

For any workflow change, pin each GitHub Actions uses: reference to a full 40-character commit SHA (avoid mutable tags/branches).

📜 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

📊 Analytics & Usage Metrics

Code Coverage Test Cases Integration Tests Fuzz Tests

🙏 Acknowledgements

  • trippy - Provides core networking functionality
  • ratatui - Powers our beautiful terminal interface
  • Our amazing contributors who help improve Windows MTR

Built with ❤️ by Benji Shohet and the Windows MTR Team
© 2025 Windows MTR Project. All Rights Reserved.

About

Windows‑native clone of Linux mtr! It's a cross‑platform Rust CLI that delivers ICMP/TCP/UDP traceroute & ping in a single portable executable (`mtr.exe`). | Built by Benji Shohet (benjisho).

Resources

Contributing

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages