Amakuru.net

A menu bar app for the VPNs macOS forgot

A small macOS menu bar app that lists every VPN registered with Network Configuration — including WireGuard and Azure VPN — with one-click connect, status indicators, and auto-reconnect.

macOS’s built-in VPN menu bar item handles IKEv2 and L2TP, but not WireGuard or Azure VPN. I had three or four connection types I cared about and the system menu showed exactly one of them. vpn-menubar is a small Swift app that fills the gap.

scutil, not NetworkExtension

The app is built on scutil --nc, the macOS command-line tool that talks to Network Configuration. Going through NetworkExtension directly would have required entitlements, signing, and a VPN provider extension — the wrong layer for a menu bar wrapper.

scutil --nc start <name> is what the system VPN menu calls under the hood, and it’s perfectly happy to start a WireGuard tunnel on the caller’s behalf. The right layer of abstraction here was the one Apple was already using.

Auto-reconnect as default behaviour

Three-attempt auto-reconnect on unexpected disconnect, on by default. Notifications on connect and disconnect. Connection duration shown next to active VPNs.

A user who has to enable auto-reconnect in settings to get auto-reconnect tends not to enable it; opinionated defaults are how features actually get used.

Build from source, no signing

The app is unsigned and not notarised. The build path is ./build.sh — one command, public source — so anyone uncomfortable running an unsigned binary can produce their own. Signing infrastructure costs a recurring subscription and several hours of setup, which for a wrapper around scutil is the wrong shape; source-build distribution is fine when the source is short and the build is simple.

Was it worth it?

The system VPN menu shows IKEv2 and L2TP, and the menu bar item next to it shows everything else. Closing a small gap in a system I use every day was worth the afternoon.

dmorel69/vpn-menu-bar — Swift, macOS, MIT