Onion & Garlic Watch is a Rust-based utility that embeds and executes a PowerShell script to monitor Tor and I2P services on Windows.
- Implemented in Rust (edition 2024)
- Uses
include_str!()to embed the PowerShell script at compile time - Writes the embedded script to a temporary
.ps1file during execution - Executes it with PowerShell using:
-NoProfile-ExecutionPolicy Bypass-File <temp_script>
- Removes the temporary script file after execution
- PowerShell script monitors:
- Tor ports: 9050, 9051, 9150, 9151
- I2P ports: 7657, 4444
- Related processes (
tor.exe,java.execontaining "i2p" in path)
- Displays colorized output refreshed every 5 seconds
cargo build --release
Output binary: target\release\onion_garlic_watch.exe
- Replace PowerShell backend with pure Rust for full portability
- Add optional logging or GUI mode