r/androiddev • u/lokia001 • 7d ago
Open Source [Open Source] Routing a single Android app through wireguard-go + gVisor without VpnService
I wanted to tunnel Telegram traffic through WireGuard without claiming Android's single VpnService slot or affecting other apps.
The approach hooks the app's socket/network calls via Xposed/LSPatch and forwards them into an embedded wireguard-go + gVisor userspace netstack compiled as a native library, with DoH for DNS resolution.
Things that bit me: keeping the native bridge stable across different Android ABIs and handling non-root LSPatch environments cleanly.
Update (v1.7.2): The project now also includes a Windows 10/11 (x64) desktop client alongside the Android LSPosed/LSPatch module, sharing the same Go userspace engine (wireguard-go + AmneziaWG 1.5 + gVisor netstack + DoH) over a local loopback SOCKS5 proxy without a Wintun adapter or admin privileges. Both platforms now include 1-Click Free WARP, so you no longer need to fetch or import a .conf file manually; one click generates a Cloudflare WARP config and connects.