Automatically turn off Tailscale VPN on iPad after certain time

Is there a way to automatically turn off the Tailscale VPN on my iPad after a certain time?

I might want to use the VPN for a while and then forget it on. Typically I don’t want to have any VPNs enabled, so I would prefer if it automatically reverted back to off after a couple of hours, in case I forgot it on. Not sure if this would be an iPadOS or Tailscale feature.

Use iOS Shortcuts, which offers the following Tailscale actions:

Connect
Disconnect
Get Status
Stop Using Exit Node
Switch Account
Use Exit Node

Simply set a time-based automation and let it run locally on the iPad.

Maybe try using shortcuts

I don’t get it… Why would you want to do that? If you’re not accessing tailnet, leaving tailscale in the background doens’t do anything.

Or an App-based shortcut. I have a specific browser app and a few others that I want to go out the TailNet. The rest… not really a concern for me. I have an automation to use an exit node when those apps are opened and a second automation to stop using the exit node when those apps are no longer active. Works for my use case. :man_shrugging::grin:

Having a third-party software in the network layer is quite intrusive (could affect network connections, latency, hostname lookup and so on). It might be right that Tailscale doesn’t do anything while not accessing the tailnet, but I don’t know for sure it doesn’t now or in the future. So just turning it off on the operating system level would give me peace of mind, as I might not use it for weeks at a time.

If I had a way of knowing with confidence that it doesn’t affect any other traffic than the tailnet traffic (for example if Apple designed iOS/iPadOS in a way that assured that at the operating system level), I might leave it on. Currently iOS/iPadOS VPN extensions just seem opaque and could potentially affect all network traffic.

If you REALLY want that sort of control, you might consider headscale, a totally opensource stack of tailscale (from server to client)