Real-time P2P & torrent leak prevention guard for Windows. Audits open network sockets, detects background seeding processes, mitigates browser WebTorrent swarms, and prevents unauthorized copyright exposure.
In jurisdictions with strict digital copyright monitoring (such as Germany, Austria, and Switzerland under § 97 UrhG), automated monitoring services continuously observe public BitTorrent swarms. The moment a machine uploads even a single data chunk (a few kilobytes), the public IP address is recorded, potentially triggering civil cease-and-desist claims (Abmahnungen) and statutory damage notices ranging from €500 to €1,500+ per file.
Similar automated strike frameworks exist in the United States, the United Kingdom, and across Europe, where unintentional background seeding can lead to ISP warnings, bandwidth throttling, or service termination.
The danger isn't just standalone torrent clients:
- In-Browser WebTorrent Leaks: Many unofficial streaming websites embed WebTorrent or HLS-P2P video players. While streaming, the browser opens WebRTC peer channels and actively uploads downloaded segments from your home IP address to other viewers without explicit notification.
- Zombie Background Processes: Applications like qBittorrent, AceStream, Popcorn Time, or Stremio frequently remain running in the background after closing their main window, quietly seeding files.
I wanted a lightweight, reliable desktop utility that sits quietly in the system tray, monitors active sockets, immediately flags unauthorized P2P traffic, and can kill offending processes on the spot.
- Continuous Socket & Port Auditing: Inspects local TCP/UDP connections in real time without third-party kernel drivers. Monitors standard BitTorrent listener ranges (
6881–6889,51413,8621,6878,11470, etc.). - Process Heuristic Scanner: Identifies 20+ known P2P clients and streaming daemons (qBittorrent, Transmission, Deluge, uTorrent, AceStream, Popcorn Time, Soda Player, WebTorrent Desktop, etc.).
- Auto-Kill Defense: Optional toggle to forcibly terminate any detected P2P process within the first second of discovery.
- WebTorrent & WebRTC Mitigation: Tracks known public WebTorrent trackers (
tracker.openwebtorrent.com,open.stealth.si, etc.) and provides actionable hardening steps for Chrome, Brave, Firefox, and Edge. - Windows Defender Firewall Integration: One-click creation of OS-level firewall rules to block inbound and outbound BitTorrent listener ports.
- Discreet System Tray Operation: Runs silently near the clock with a crisp, dynamic tray icon (Green = Protected, Red = Threat Detected) and consumes less than 40 MB of memory.
- Simulation / Test Mode: Built-in safe testing mode to verify desktop notifications and alert mechanisms without launching actual torrents.
- Internationalization (7 Languages): Full native translations for:
- English (en)
- German (de)
- Ukrainian (uk)
- Spanish (es)
- French (fr)
- Polish (pl)
- Italian (it)
┌─────────────────────────────────────────────────────────┐
│ PeerGuard │
│ (Electron + React 19 UI) │
└───────────────────────────┬─────────────────────────────┘
│ IPC Bridge
┌───────────────────────────▼─────────────────────────────┐
│ Background Engine │
│ ┌──────────────────────┐ ┌───────────────────────┐ │
│ │ Socket Inspector │ │ Process Watcher │ │
│ │ Get-NetTCPConnection│ │ Task & Memory Audit │ │
│ └──────────┬───────────┘ └──────────┬────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Threat Detection Matrix │ │
│ │ - Suspicious Port Matches (6881-6889, 51413...) │ │
│ │ - Known P2P Binaries (qBit, AceStream, etc.) │ │
│ │ - WebTorrent Tracker Host Analysis │ │
│ └──────────────────────┬────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Automated Countermeasures │ │
│ │ - Auto-Kill / Taskkill by PID │ │
│ │ - Windows Defender Firewall Rules │ │
│ │ - Tray Icon Flip & Native Windows Notification │ │
│ └───────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
- Socket Inspection: Queries
Get-NetTCPConnectionvia PowerShell with compressed JSON output every 2 seconds (configurable to 1s or 5s). - Correlation: Maps owning Process IDs (PIDs) back to executable names and paths.
- Response: If a forbidden P2P signature is detected, PeerGuard updates the tray icon, triggers an alert, and (if enabled) terminates the process immediately.
- Windows 10 or 11 (64-bit)
- Node.js v18 or newer
- PowerShell (built into Windows)
# Clone the repository
git clone https://github.com/your-username/peerguard.git
cd peerguard
# Install dependencies
npm install
# Run in development mode (Vite + Electron)
npm run electron:dev
# Or run standard Electron production preview
npm startTo package a standalone Windows executable:
npm run build:exeThe output will be placed in release/PeerGuard-win32-x64/PeerGuard.exe.
├── electron/
│ ├── main.cjs # Main Electron process, tray menu, window lifecycle, IPC handlers
│ ├── preload.cjs # Context bridge exposing safe IPC methods
│ ├── scanner.cjs # Core process and socket inspection engine
│ ├── firewall.cjs # Windows Defender Firewall rule automation
│ └── icon-generator.cjs # Dynamic vector shield icon generator for the system tray
├── src/
│ ├── components/
│ │ ├── TitleBar.jsx # Custom frameless titlebar with window controls & language selector
│ │ ├── Navigation.jsx # Clean segmented tab navigation
│ │ ├── Toast.jsx # Discreet in-app toast alerts
│ │ └── tabs/
│ │ ├── OverviewTab.jsx # System health, hero card, metrics, regulatory context
│ │ ├── NetworkTab.jsx # Live socket inspector, search, port filter
│ │ ├── WebTorrentTab.jsx # Browser WebRTC leak defense & firewall manager
│ │ ├── LogsTab.jsx # Timestamped audit log with copy/clear functions
│ │ └── SettingsTab.jsx # Startup modes, auto-kill, audio, notifications
│ ├── hooks/
│ │ └── useScanner.js # Custom hook managing state, scans, IPC, and event logs
│ ├── i18n/
│ │ ├── index.jsx # Translation context and language provider
│ │ └── locales/ # Dictionaries (en, de, uk, es, fr, pl, it)
│ ├── styles/
│ │ └── index.css # Clean, restrained dark design system (no neon glow)
│ ├── App.jsx # Clean modular root component
│ └── main.jsx # React 19 entry point
└── package.json
Pull requests are welcome! If you want to:
- Add detection rules for emerging P2P software or WebTorrent trackers.
- Improve translations for your native language.
- Enhance socket auditing performance.
Feel free to open an issue or submit a PR.
PeerGuard is an informational monitoring and privacy tool designed to help users identify and prevent unintended background peer-to-peer data transfers. It does not constitute legal advice. Laws regarding file sharing and copyright vary by jurisdiction.
Released under the MIT License.