WG-AutoSwitch

WireGuard that turns itself on – everywhere except at home.

The problem

The official WireGuard client for Windows is excellent – it just doesn't switch on by itself. You forget the tunnel at the café and leave it running at home for no reason. The existing solutions felt too heavy on my Surface Laptop (Snapdragon). So I built a small tool that does exactly one thing.

What WG-AutoSwitch does

WG-AutoSwitch is a small Windows service with a tray icon. It switches your WireGuard tunnels depending on the network you're connected to:

  • Trusted network (e.g. at home) → tunnel off
  • Any other network → tunnel on
  • No network → tunnel off

More features:

  • A different tunnel per network if you like – e.g. your home VPN on the road, your office VPN when working from home.
  • Recognised securely: a network only counts as trusted when several features match – the gateway's MAC address plus DNS suffix, Wi-Fi name or access point. A Wi-Fi name alone is too easy to fake.
  • Hotel and train Wi-Fi: the tunnel waits until you've signed in on the login portal.
  • Import from OPNsense: simply import configurations from the peer generator.
  • English and German, update check in the tray menu (can be turned off).

Why it's so light

  • Native C++/Win32, about 150 KB, for Windows on ARM (ARM64) and x64
  • Nothing running in the background: it only reacts to network changes, with no polling while idle – easy on the battery
  • Minimal privileges: runs as its own virtual service account, not as SYSTEM
  • No telemetry, no account, no cloud
  • Uses the official WireGuard installation – no VPN code of its own

Download and install

  1. Install WireGuard for Windows (if you haven't already).
  2. Download the right package from the release page on GitHub:
    • …-windows-arm64.zip for Surface and other Snapdragon devices
    • …-windows-x64.zip for Intel and AMD devices
  3. Unzip it and run .\wgas.exe install in an administrator PowerShell.
  4. Import your tunnels from the tray icon and mark your home network as trusted – done.

The checksums of every release are listed in SHA256SUMS.txt.

Code signing

The Windows programs will be signed through the SignPath Foundation: Free code signing provided by SignPath.io, certificate by SignPath Foundation. Until the application is approved, releases are unsigned, so Windows SmartScreen may show a warning. All builds are made transparently from the public source code with GitHub Actions.

Open source

The source code is open under the MIT license: github.com/benerages/wg-autoswitch. The project was written with the help of Claude (Anthropic) – feedback, bug reports and ideas are very welcome on GitHub.

WG-AutoSwitch privacy policy