VPNonly home faq install repo

How it works

Most VPN apps take over your whole machine: they replace your default route, and every packet from every app detours through another country whether it helps or not. VPNonly does the opposite — your Mac never joins the VPN, individual apps do.

1. A tunnel nobody uses

wireguard-go opens a tunnel to your VPN provider and no default route is installed. The tunnel just sits there. Nothing goes through it until you say so. This is why the failure mode is always "that one app is offline" and never "my internet is gone".

2. The firewall picks who goes in

macOS ships with PF, a packet filter that can't match traffic by application — but can match by unix group. So each app you add gets its own private group, and two rules do the work:

block return out proto { tcp udp } from any to any group vpn_a1b2c3
pass out quick route-to (utun9 10.5.0.2) inet proto { tcp udp } \
    from any to any group vpn_a1b2c3 keep state

The second rule sends that group into the tunnel. The first is the kill switch: when the tunnel isn't up, the pass rule isn't there, so that traffic is refused instead of leaking to your ISP.

Group membership is fixed when a process starts, but firewall rules aren't — which is why an app has to relaunch once to join, and never again after that. Toggling is just rewriting rules.

3. A very small launcher

A 30-line C program starts your app under its group and immediately drops root. Every helper process the app spawns inherits the group, so Chromium-style apps with a dozen subprocesses are covered.

About the password prompt

Making network interfaces and firewall rules needs admin rights — for any software, always. VPNonly asks once, installs a small engine owned by root that nothing else can modify, and never asks again. That engine is the open-source part, and it's short enough to read over a coffee.

What I haven't solved

The version of this with no restarts at all needs Apple's Network Extension framework — a system extension that sees every connection with the app's signature attached. That's the plan, it's just a much bigger build.

Get it for Mac — $19