1 day ago · Tech · hide · 0 comments

TL;DR Link to heading I run a WireGuard server on a spot f1-micro in London and keep it stopped when I’m not using it; it stops itself 5 minutes after the last device disconnects. A small Cloud Run function starts or stops the VM and points a DNS name at its new IP, so my laptop and iPhone both connect to vpn.example.com. From the laptop, traffic flows within about a minute of asking for it; on the phone I run a Shortcut, then switch the tunnel on once it returns. By my sums from Google’s list prices, it costs about $0.48/month stopped and about $0.0034/hour running, with the first 200 GiB of traffic each month free on the Standard network tier. Upgrading to Premium networking or an e2-micro costs more and didn’t make it faster in my tests. The code is in brtkwr/on-demand-vpn.

No comments yet. Log in to reply on the Fediverse. Comments will appear here.