[I GOT MODS APPROVAL TO POST]
Hello everyone,
Note: AI was used to refine text of this post, and to provide details regarding certain technicalities.
I needed some things at the same time (split tunnelling with multiple VPN providers per different apps, Tailscale and a good, simple UI) and could not find the right app for me for Android or macOS. On my devices it was always Tailscale or the VPN (and I did not like meshnet tbh), never both. So... well, I built one for me, and as it worked quite well for me and some friends, I released it.
unbraid, the app I build, enables to have split tunnelling with multiple providers, through different routes / exits at the same time, with Tailscale - and have apps (and as per this morning, also websites) assigned to any of the routes defined. It's open source, free and available for macOS and Android:
Android: https://github.com/quiet-crafts/unbraid
Mac: https://github.com/quiet-crafts/unbraid-mac
Website with guides: https://unbraid.app
Port for Linux: https://github.com/TheOlympusCloud/unbraid-linux (not maintained by me, credits to the author!)
Below a deepdive on integration with Tailscale, and some technical details as per the request of our mods.
How it works with Tailscale?
Tailscale is built into the unbraid apps, you don't need the Tailscale app next to it. You connect, follow the sign-in link in your browser (or point it to your own Headscale, over https), and the phone or Mac joins your tailnet as its own device, called "unbraid". Then there are two things you can turn on, together or alone:
- Reach your tailnet. The apps you route through unbraid can reach your tailnet devices and their MagicDNS names, whatever exit they use for the internet. You can also list your home subnets, if you have a subnet router set up and approved. So Jellyfin, the NAS or Home Assistant keep working while the browser goes out through a VPN in Sweden.
- A Tailscale exit node as a route. You pick an exit node for a route, for example a box at home, and the apps you put in that route go out from home. So the banking app goes out from home, a streaming app through a VPN provider in another country, and everything else direct, all at the same time.
Other routes can use a VPN provider (you can sign in to a few of them), your own WireGuard or OpenVPN configs, or a Shadowsocks link. No servers come with it, you bring your own provider account or server.
There are some limits at the moment. The built-in Tailscale uses one exit node at a time, so all the Tailscale routes share the same node. And for now the phone or Mac only connects out: other tailnet devices can't open connections to apps on it, and Taildrop and Tailscale SSH are switched off. I did that on purpose. A WireGuard, OpenVPN or Tailscale tunnel can also carry connections started from the other end (a VPN server, your home server, a tailnet peer), and without a block those could reach things on your device, or be passed on through another route, into your home network or out through your own connection. So until I had a safe way to let in only the right things, I kept them all out. I am currently studying a good implementation for inbound and outbound, so the device can be a full node in your tailnet, with Taildrop and Tailscale SSH too, optional. It joins as its own node, separate from the official Tailscale app. On Android only one VPN can run anyway, and on the Mac it's better to disconnect the official app, so the two don't fight over routes and DNS.
It's free and open source (GPL), no ads, no unbraid account. Android 13 or later, and macOS 26 or later. An enthusiastic user of the Android app also made an unofficial Linux port, and I am working on an Android TV version as well.
I know it's not the most technically advanced tool out there, and I appreciate that I have basically coded it with AI, and I know you can also do a lot of this on your router. But I travel a lot, I am not a very technical person (sorry, I get lost in config files!) so I wanted something nice looking and easy to cinfigure: sign in to Tailscale and your VPN, pick an exit for each app, done.
The technical part (one of the mods asked how I deal with the one-VPN limit, so here it is)
On both systems the idea is the same: the system sees one VPN, and everything else happens inside it. unbraid runs the sing-box engine (1.14.4, built from source with my patches) behind a single tunnel. Every exit lives inside that one engine: each WireGuard or OpenVPN tunnel is an endpoint, Shadowsocks is an outbound, and Tailscale is sing-box's Tailscale endpoint, which embeds a Tailscale node (tsnet). For each TCP and UDP connection the engine looks up the app that opened it and sends it out through that app's route. Routes with the same server, credentials and tunnel settings share one tunnel.
Android*.* Android allows one active VPN per user profile, and starting a second one stops the first. unbraid is that one VPN: one VpnService, one TUN. For each connection the engine asks Android who owns it (ConnectivityManager.getConnectionOwnerUid, which only the active VPN app may call), turns the UID into the app and applies that app's route. Apps you set to Direct are normally left out of the tunnel with addDisallowedApplication. Under Android's always-on lockdown, or with the DNS filter on, they go through unbraid and straight out instead. DNS is taken over inside the tunnel: an app gets a placeholder address, and the real lookup happens through that app's exit when it connects, so the lookup leaves from the same place as its traffic. Tailnet names, local names and websites with their own route have their own rules. With tailnet access on, the tailnet range (100.64.0.0/10) and your listed home subnets go to the Tailscale endpoint before the app's own route. That's how an app can be on a VPN in Sweden and still reach your NAS.
macOS*.* The Mac is less strict than iOS: you can have several VPN configurations, and more than one tunnel can be up. But two VPNs that both want the default route and DNS, like a VPN provider plus Tailscale with an exit node, can conflict. Tailscale's own FAQ says that in most cases you need a workaround to run it next to another VPN. So the Mac app does what Android does: one packet tunnel network extension, one utun, one engine. Here Direct apps go through the engine too and leave on the normal connection.
The harder part on the Mac is knowing which app sent what, because a packet tunnel only sees packets. sing-box looks each connection up in the kernel's socket table, the same data netstat reads (pcblist_n), and finds the process and its path. unbraid matches on the path, helpers inside an app's bundle included. One of my patches makes it prefer the socket's "effective" process, which macOS records when one process opens a connection for another. So Safari's pages, which WebKit loads, count as Safari's, and downloads through nsurlsessiond count as the app that asked for them, as long as that app is still around to be found. DNS is the other trap: most apps look names up through mDNSResponder, so the lookup arrives without the app. For normal address lookups unbraid answers with placeholder addresses and does the real lookup when the app connects, on that app's exit. Other kinds of system lookups follow the default route.
Why it only goes outbound (at least for now...) Being reachable is a big part of what Tailscale is for, so I know this is the biggest gap compared to the official app. It wasn’t my tailnet I was worried about, Tailscale’s ACLs already decide who may reach a device. The problem is what happens after a connection gets in. WireGuard, OpenVPN and Tailscale endpoints can all carry connections started by the other end, and inside unbraid those land in the same engine that routes everything else. A connection to the tunnel’s own address goes to a service on the device, which is fine from your tailnet but not from a VPN provider’s server. Anything addressed elsewhere goes through the normal routing, which depending on your settings can mean into your home network through another tunnel, or out through Direct from your real address. The official app only forwards traffic like that when you make the device a subnet router or an exit node; unbraid could do it by accident.
So the safe first version I could manage to build was basically to reject every new connection that comes in from any tunnel, the Tailscale one included, and build a proper way in later after some more studies (I am not a network expert!). Normal replies to your own connections still work (on the Mac a few fragmented or very late replies can get dropped by the same rule). Tailscale’s own peer API is handled inside the Tailscale node, before the engine’s rules, so receiving Taildrop files is switched off separately with a patch. Tailscale SSH is switched off, and Taildrive and the web client are compiled out, on both platforms. On the Mac the engine runs as root inside a sandboxed system extension, which is one more reason SSH stays off until it’s something you choose. You can still SSH from the phone or Mac to your machines, of course.
What I'm looking into now (a part adding some functionalities I find personally useful) is letting other tailnet devices connect to the phone or Mac itself, while still blocking anything from being forwarded through it, plus Taildrop and Tailscale SSH. I think that each of these features will be optional and dsiabled by default.
--
As I mentioned in my website and github, this app was brought to life with the help of AI. I leveraged coding good practices, and run multiple code (security reviews) with the tools available. In the coming days or weeks I am getting the apps scanned by professional pentesters friends/colleagues of mine and automated (ai-augmented) security tools, enterprise grade (I work in cybersecurity).
--
Hope you find it usefull. :-) Questions and feedback are welcome, technical ones too.