Connect an iOS app to your tailnet without the Tailscale VPN
Did you know that Tailscale has a library that allows your app to connect to your tailnet without the Tailscale VPN switched on? It's called TailscaleKit and it runs a Tailscale device inside the app.
Now my iPhone app can reach my Hermes gateway without anyone switching on a VPN.
They've only published the source code, in Go, so you need to build it.
I tried adding the built framework to my app. It added 70MB to the repo, and building it from source adds lots of new dependencies. The only other build I found was a patched fork with no details.
So we created a separate repo that builds it once per Tailscale version and publishes it as a download the app pins. Every release has a GitHub build attestation, and you can check it with gh attestation verify.
Two things:
-
iOS cuts a suspended app's sockets and the Tailscale device inside the app doesn't recover. So it stops when the app goes to the background and starts again when you come back.
-
Google refuses sign-in inside an app's web page. So the first sign-in to a gateway goes through Safari, and that one still needs the Tailscale VPN.
This is the original Tailscale repo: https://github.com/tailscale/libtailscale/tree/main
This is the build repo: https://github.com/usual-labs/tailscalekit-build
Newsletter
Occasional notes on software, tools, and things I learn. No spam.
Unsubscribe anytime.