The Problem
If you've ever audited your Windows network traffic during a boot-up sequence, you know the truth: there's a "blind spot." Between the moment your network drivers initialize and your VPN/WireGuard tunnel actually establishes, your traffic is leaking. Many third-party solutions exist, but they are often bloated, use proprietary binaries, or act as black boxes. I wanted something transparent, native, and bulletproof.
The Solution: WG-KillSwitch
I developed a pure PowerShell-based kill switch architecture. It doesn't rely on third-party libraries—it uses native Windows system components to enforce security.
Key Architectural Features:
Zero-Trust Firewall Matrix: Hardens the system by blocking all outbound traffic by default, allowing only authenticated tunnel traffic.
WMI Persistent Watchdog: Unlike standard scripts that can be killed via Task Manager, this project uses WMI Event Subscriptions. If the watchdog process is terminated, Windows itself immediately respawns it.
Resilience: Survives hard reboots, modem resets, and Windows service cycling.
Resilience & Leak Testing
I've put this through a gauntlet of tests:
Forced Reboots: Zero leaks detected during driver load.
Process Termination: The WMI engine restores the protection in milliseconds.
Dynamic Network Resets: The firewall matrix remains active regardless of adapter status.
Let's Collaborate
This is open source, transparent, and built for the community. I'm looking for security audits and feedback. Check out the source code, open an issue, or submit a PR:
https://github.com/ryderlacin-pixel/Windows-WireGuard-KillSwitch
Top comments (0)