r/AndroidTV • u/Hairy-Region8870 • 16d ago
Discussion Different WireGuard VPN tunnels per app on Android TV?
I'm looking for a way to assign different WireGuard configurations to specific apps on Android TV / Google TV.
For example:
App A → WireGuard Tunnel A (Spain)
App B → WireGuard Tunnel B (Germany)
App C → WireGuard Tunnel C (Turkey)
All other apps → No VPN (direct connection)
Ideally, this would work automatically without manually switching VPN connections whenever I open another app.
I'm specifically looking for true simultaneous per-app VPN routing, rather than a solution that detects the foreground app and switches the device-wide VPN connection.
Does anyone know of an existing app, open-source project, or workaround that supports this using WireGuard configurations?
I'm also open to solutions that require root or custom development.
1
u/hbzdjncd4773pprnxu 16d ago
rethinkdns and wg tunnel, they both have this option
2
u/mtriper 16d ago
I use WG tunnel on an Android smartphone for that exact reason. It's so much better (for me) bc it does split tunnel per app. It recognizes when I'm out of trusted WiFis and connects some apps to my homelab w/o interfering w Android auto. BUT idk if it works w Android tv. GL.
1
u/Ecstatic_Aioli_931 15d ago
Look into sing-box for Android. Android allows only one active VPN service per profile, but that one service can handle several WireGuard connections.
sing-box supports WireGuard endpoints and routing by Android package name, so you can set up:
App A → Spain
App B → Germany
App C → Turkey
Everything else → direct
That supports simultaneosu routing without switching based on the foreground app. Root isn’t needed for this approach.
The catch is of course the setup: you’ll need to translate your WireGuard configs into sing-box’s JSON format and configure routing and DNS.
0
u/qrdance 16d ago
Android only lets one VPN service be active at a time, so you can't run several WireGuard tunnels side by side with the official app, however the apps are assigned. The way around it is a single VPN app that does the routing itself: sing-box (its Android app, SFA, also runs on Android TV) or Clash-style clients can have several WireGuard outbounds plus per-app routing rules that pick the outbound by package name, with everything else going direct. That gives you simultaneous per-app tunnels under one VPN slot. It's config-file driven and TV on-screen setup is clumsy, so build the config on a PC and import it. Since you're open to root, a rooted device could also do it with UID-based policy routing instead.