# WG Tunnel WG Tunnel is an Android client for [WireGuard](https://www.wireguard.com/) and [AmneziaWG](https://docs.amnezia.org/documentation/amnezia-wg/), 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** [![Zapstore](https://img.shields.io/badge/Zapstore-111111?style=for-the-badge&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOSIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDE5IDMyIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMTguODM3OSAxMy45NzExTDguODQ5NTYgMC4zNTYwODZDOC4zMDQ2NCAtMC4zODY2ODQgNy4xMDQzOCAwLjEyODQ3OSA3LjMwMTAzIDEuMDIwNzNMOS4wNDY4NiA4Ljk0MjMyQzkuMTYyNjggOS40Njc4MyA4Ljc0ODg3IDkuOTYyNjYgOC4xOTY0MSA5Ljk1OTNMMC44NzEwMzIgOS45MTQ3N0MwLjE5NDkzNCA5LjkxMDY2IC0wLjIyMzk3NSAxMC42MjkzIDAuMTI2NzQ4IDExLjE5MTZMNy42OTc0MyAyMy4zMjk3QzcuOTk5NTcgMjMuODE0MSA3LjczMjY0IDI0LjQ0NDcgNy4xNjc0NCAyNC41ODE2TDUuNDA5NTggMjUuMDA3NkM0LjcwMTk5IDI1LjE3OSA0LjUxNzI3IDI2LjA3MzQgNS4xMDE4NiAyNi40OTc0TDEyLjQ1NzIgMzEuODMyNkMxMi45NTU0IDMyLjE5NCAxMy42NzExIDMxLjk0MTEgMTMuODE0NyAzMS4zNTI5TDE1Ljg1MDUgMjMuMDE1MkMxNi4wMTM3IDIyLjM0NjUgMTUuMzI4MSAyMS43ODAxIDE0LjY3NjIgMjIuMDQ1MkwxMy4wNjYxIDIyLjcwMDFDMTIuNTYxOSAyMi45MDUyIDExLjk5MSAyMi42MDkyIDExLjg4NDkgMjIuMDg3N0wxMC43NTIxIDE2LjUyMjRDMTAuNjQ4NiAxNi4wMTQgMTEuMDM4IDE1LjUzNjUgMTEuNTcwNCAxNS41MTg4TDE4LjE2MzkgMTUuMjk5OEMxOC44NTI5IDE1LjI3NjkgMTkuMjM4MyAxNC41MTcgMTguODM3OSAxMy45NzExWiIvPjwvc3ZnPg%3D%3D&logoColor=white)](https://zapstore.dev/apps/com.zaneschepke.wireguardautotunnel) [![Google Play](https://img.shields.io/badge/Google_Play-4285F4?style=for-the-badge&logo=google-play&logoColor=white)](https://play.google.com/store/apps/details?id=com.zaneschepke.wireguardautotunnel) [![IzzyOnDroid](https://img.shields.io/static/v1?style=for-the-badge&message=IzzyOnDroid&color=8AA32E&logo=F-Droid&logoColor=FFFFFF&label=)](https://apt.izzysoft.de/fdroid/index/apk/com.zaneschepke.wireguardautotunnel) [![WG Tunnel F-Droid](https://img.shields.io/static/v1?style=for-the-badge&message=WGT%20F-Droid&color=5A9A9B&logo=F-Droid&logoColor=FFFFFF&label=)](https://fdroid.wgtunnel.com) [![Obtainium](https://img.shields.io/badge/Obtainium-8B5CF6?style=for-the-badge&logo=Obtainium&logoColor=white)](https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22com.zaneschepke.wireguardautotunnel%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fzaneschepke%2Fwgtunnel%22%2C%22author%22%3A%22zaneschepke%22%2C%22name%22%3A%22WG%20Tunnel%22%2C%22preferredApkIndex%22%3A0%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Afalse%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22filterReleaseTitlesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22filterReleaseNotesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22verifyLatestTag%5C%22%3Atrue%2C%5C%22sortMethodChoice%5C%22%3A%5C%22date%5C%22%2C%5C%22useLatestAssetDateAsReleaseDate%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionExtractionRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22matchGroupToUse%5C%22%3A%5C%22%5C%22%2C%5C%22versionDetection%5C%22%3Atrue%2C%5C%22releaseDateAsVersion%5C%22%3Afalse%2C%5C%22useVersionCodeAsOSVersion%5C%22%3Afalse%2C%5C%22apkFilterRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22invertAPKFilter%5C%22%3Afalse%2C%5C%22autoApkFilterByArch%5C%22%3Atrue%2C%5C%22appName%5C%22%3A%5C%22WG%20Tunnel%5C%22%2C%5C%22appAuthor%5C%22%3A%5C%22Zane%20Schepke%5C%22%2C%5C%22shizukuPretendToBeGooglePlay%5C%22%3Afalse%2C%5C%22allowInsecure%5C%22%3Afalse%2C%5C%22exemptFromBackgroundUpdates%5C%22%3Afalse%2C%5C%22skipUpdateNotifications%5C%22%3Afalse%2C%5C%22about%5C%22%3A%5C%22%5C%22%2C%5C%22refreshBeforeDownload%5C%22%3Afalse%7D%22%2C%22overrideSource%22%3Anull%7D) [![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com/wgtunnel/android/releases/latest) **Community** [![Telegram](https://img.shields.io/badge/Telegram-26A5E4.svg?style=for-the-badge&logo=Telegram&logoColor=white)](https://t.me/wgtunnel) [![Matrix](https://img.shields.io/badge/Matrix-000000.svg?style=for-the-badge&logo=Matrix&logoColor=white)](https://matrix.to/#/#wg-tunnel-space:matrix.org) ## Screenshots

Main Config Settings Auto-tunnel

## 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](https://github.com/wgtunnel/core#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:parser")) .using(project(":parser")) } } ``` 2. Build from `android/`: ```sh ./gradlew assembleDebug ``` Please restore the commented `includeBuild` before opening a PR. ## Translation Help translate WG Tunnel on [Crowdin](https://translate.wgtunnel.com/project/wgtunnel/invite?h=11b5b7bf2099293095775d4477320c772818907).
logo
Zane Schepke
(zaneschepke)

249913 words
logo
Marco Martinelli
(martinellimarco)

4792 words
logo
Petr Sedl
(Pida88)

2211 words
logo
Matthaiks

1992 words
logo
Surfoo

1984 words
logo
solokot

1254 words
logo
Evan Huang
(EvanTechDev)

1120 words
logo
Ali Saeedi
(alis36)

1050 words
logo
그냥기여자
(justcontributor)

965 words
logo
LEDPixel

950 words
logo
CyanWolf
(cyanwolfg)

891 words
logo
Den
(tehb29)

460 words
logo
pixnet

378 words
logo
ron
(zlronron159)

320 words
logo
Philip
(ppac)

273 words
logo
YuryKomar

271 words
logo
georgybog

257 words
logo
Dariusz
(darbrzozo)

125 words
## Acknowledgements Thank you to the following: - All of the users that have helped contribute to the project with ideas, translations, feedback, bug reports, testing, and donations. - [WireGuard](https://www.wireguard.com/) - Jason A. Donenfeld (https://github.com/WireGuard/wireguard-android) - [AmneziaWG](https://docs.amnezia.org/documentation/amnezia-wg/) - Amnezia Team (https://github.com/amnezia-vpn/amneziawg-android) - [JetBrains](https://jetbrains.com) - For supporting open-source developers with free software licenses. ## Contributing Any contributions in the form of feedback, issues, code, or translations are welcome and much appreciated! For PRs, please make sure to format before submitting. ```sh ./gradlew format ``` CI runs `./gradlew formatCheck`, which uses the same files and style as `format`. If that job fails, run `./gradlew format` and commit the result. If your PR requires [core](https://github.com/wgtunnel/core) changes, please link the associated PR.