← Back to context

Comment by Arch-TK

2 months ago

How did you automate it to start on networks which are not yours?

This is like the only piece of the puzzle for me.

Set the AllowedIPs wireguard setting (and/or the route, if you can set that separately) to one larger than your home network (i.e., if your home network is 192.168.1.0/24, use 192.168.0.0/23). Then, block wireguard packets from the internal network on your router. Then the tunnel will always be running; it just won't be used when you're at home because there's a more specific route

For the Tailscale app on Apple platforms it’s called VPN On Demand. Here's how you can configure it.

https://tailscale.com/kb/1291/ios-vpn-on-demand

  • Tailscale is built on wireguard but it is not just wireguard. I want a wireguard only solution.

    • Got it. The key there would be to find a WireGuard app that supports the "VPN on Demand" feature of iOS. It should be called out on their app page in the App Store, if not in their documentation.

  • Does it still eat your battery? It used to, and it was so annoying I moved to Nebula

All my regular mobile devices are Apple, so whoever said that has it right. I also have a Linux laptop but NetworkManager support for Wireguard was broken last I checked, and at the time I didn't care enough to set it up by hand.