Thanks to visit codestin.com
Credit goes to github.com

Skip to content
 
 

Repository files navigation

Android GUI for WireGuard

Download from the Play Store

This is an Android GUI for WireGuard. It opportunistically uses the kernel implementation, and falls back to using the non-root userspace implementation.

Requirements

  • Java 17+
  • Android SDK — AGP 9.1.0 编译需要
  • NDK (侧载版本 28.x) — 用于编译原生 C/Go 库
  • Go ≥ 1.23 — 用于编译 libwg-go.so(仅 Linux/macOS 需要;Windows 使用预编译库或系统 Go)
  • Gradle 9.6+ — 项目使用 Gradle Wrapper,自动下载对应版本

Building

$ git clone --recurse-submodules https://git.zx2c4.com/wireguard-android
$ cd wireguard-android
$ ./gradlew assembleRelease

Windows cmd/PowerShell

gradlew.bat assembleDebug

Windows 注意事项

  • 原生库 libwg-go.so 在 MINGW 环境下使用系统 Go 编译,请确保 Go 已安装
  • 如无法从 services.gradle.org 下载 Gradle 发行版,可配置代理或手动下载到 %GRADLE_USER_HOME%/wrapper/dists/
  • macOS 用户可能需要 flock(1)

构建选项

命令 说明
assembleDebug Debug 版 APK,可直接安装测试
assembleRelease Release 版 APK,需要签名配置

Embedding

The tunnel library is on Maven Central, alongside extensive class library documentation.

implementation 'com.wireguard.android:tunnel:$wireguardTunnelVersion'

The library makes use of Java 17 features, so be sure to support those in your gradle configuration with desugaring:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
    coreLibraryDesugaringEnabled = true
}
dependencies {
    coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.5"
}

Translating

Please help us translate the app into several languages on our translation platform.

About

Fork官方库 添加srv和ip4p支持

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages