wgtunnel /android
An advanced, open-source client for WireGuard and AmneziaWG on Android.
★ 3,366⑂ 211👁 20⑃ 467● 1,041▤ 141
3,366
stars
211
forks
20
watchers
467
prs
1,041
issues
141
releases
README
WG Tunnel
WG Tunnel is an Android client for WireGuard and AmneziaWG, inspired by the official WireGuard Android app. It adds advanced features like auto-tunneling, tunnel-in-a-tunnel multihop, lockdown (a tunnel-independent kill switch), local proxying (a local SOCKS5/HTTP proxy), and many more!
Get the app
Community
Screenshots
Features
- Auto-Tunneling: Automatically activate tunnels based on your device's active network details.
- Deferred Endpoint Bootstrapping: Safely resolves endpoints and updates peers after the tunnel is up for better reliability and leak protection on startup.
- Multihop: Tunnel through another tunnel so traffic passes through more than one hop.
- Handshake Monitoring: Real-time handshake monitoring for tunnel health feedback.
- AmneziaWG Support: Full support for AmneziaWG 2.0 through 3.1, providing robust censorship protection.
- Split Tunneling: Flexible support for routing specific apps or traffic through the VPN.
- Split & Encrypted DNS: Resolve DNS through the tunnel using plain DNS, DoT, or DoH, and optionally split by domain suffix (tunnel or system).
- Local Proxy Mode: Expose WireGuard tunnels over a local SOCKS5 or HTTP proxy to browsers or firewall apps (like AdGuard).
- Lockdown Mode: Advanced in-app kill switch that blocks all traffic while the tunnel is down.
- Quick Controls: Quick Settings tile and home screen shortcuts for easy toggling.
- Remote Control Support: Intent-based automation for controlling tunnels and auto-tunneling from automation apps (like Tasker).
- Dynamic DNS Handling: Automatically detect and update endpoints on server IP changes without requiring a restart.
- IPv6 Endpoints: Automatically upgrade to IPv6 endpoints or fall back to IPv4 based on network conditions without requiring a restart.
- Android TV Support: Full support for nearly all features on Android TV.
Building
App build
sh
git clone https://github.com/wgtunnel/android
cd android
./gradlew assembleDebug
Full build (app + core)
To build against a local core (native JNI, backend, parser, hevtunnel), clone core next to this repo:
parent/
android/ this repository
core/ https://github.com/wgtunnel/core
sh
cd /path/to/parent
git clone https://github.com/wgtunnel/android
git clone https://github.com/wgtunnel/core
cd android
You also need the core build requirements (JDK 21, Android NDK, make, a C toolchain).
Then switch Gradle from Maven Central to the composite build:
1. In settings.gradle.kts, uncomment the local-dev includeBuild:
kotlin
// Local dev
includeBuild("../core") {
dependencySubstitution {
substitute(module("com.wgtunnel:backend"))
.using(project(":backend"))
substitute(module("com.wgtunnel:backend-android"))
.using(project(":backend"))
substitute(module("com.wgtunnel:backend-android-jni"))
.using(project(":backend-android-jni"))
substitute(module("com.wgtunnel:hevtunnel"))
.using(project(":hevtunnel"))
substitute(module("com.wgtunnel:Top issues
#1480[BUG] - WG Tunnel Stuck at "Establishing Connection" | "Handshake Failure"41 comments · 2026-09-20#1228[FEATURE] - Stop Tunneling when server is not reachable13 comments · 2026-05-01#1186Quick settings panel icon10 comments · 2026-03-02#1336[FEATURE] - New feature request9 comments · 2026-07-07#985[FEATURE] - wireguard fail-over8 comments · 2025-10-01#1323[FEATURE] - Extend DDNS functionality by resolving domains to allowed IPs7 comments · 2026-06-30#1083[FEATURE] - Integrated Split Tunneling7 comments · 2025-12-07#874[FEATURE] - Port Knocking6 comments · 2025-07-25
Discussions
#1581Local server side LAN IPs not connecting with tunnel active1 comments · 2026-11-16#1532How to use WG Tunnel to isolate a device from internet while allowing LAN1 comments · 2026-10-18#1496Is it possible to "bypass" the tunnel on proxy?1 comments · 2026-09-28#1468file manager (android)0 comments · 2026-09-11#1458Total connectivity loss after a while on OnePlus 11 using iodeOS and autotunnel requires restart of device1 comments · 2026-09-04#1442Accessing a local mail server with the tunnel disabled1 comments · 2026-08-29#1441Auto tunnel triggers green location API indicator very often --> battery drain?2 comments · 2026-08-28#1431Auto-detect Android-Auto?1 comments · 2026-08-26
Latest release
5.8.2 5.8.2 2026-10-19What's new: - Dynamic AMOLED theme - Ping servers from main screen while no tunnel is active - Bugfixes for Android TV file imports - Bugfixes for split tunnel configuration changes - Bugfixes for backup/restore, with TV support - Various other minor improvements and fixes SHA-256 fingerprints for the 4096-bit signing certificate: sh 5204d82e766e8aa14dcbb06dc70aebae2bdd812d4d6203cd521a8a685d7d3d80 To verify fingerprint: sh apksigner verify --print-certs [path to APK file] | grep SHA-256 Changelog :sparkles: New Features - 3308c60 - lang: update/complete Basque (eu) and Spanish (es) tran