下载:Release
- srv记录:设置端口号为0,例如
Endpoint = srv.wg.xxxx.com:0
- txt记录:设置端口号为1,例如
Endpoint = txt.wg.xxxx.com:1
text记录值可以是纯ip:port
,也可以在后面添加其他备注,以||
分割,如1.1.1.1:6789 || 更新于2024-09-12 20:30:00
方式一:fork本仓库,使用github action打包,感谢@lmq8267编写的action脚本
前提: 只能在linux或macos下构建,建议linux,macos没试过
推荐JDK版本:jdk-17
- 拉代码
git clone -b dev-v1.0.20231018 https://github.com/zhcode-fun/wireguard-android.git
cd wireguard-android
# 拉取子仓库代码
git submodule init
git submodule update
- 创建jks签名文件,比如创建
buildsign.jks
,放在ui文件夹下:
keytool -genkey -v -keystore ui/buildsign.jks -keyalg RSA -keysize 2048 -validity 10000 -alias wireguard
-
修改
ui/build.gradle.kts
中的storePassword
和keyPassword
-
打包命令
./gradlew clean assembleRelease
- 构建成功后apk路径
ui/build/outputs/apk/release/ui-release.apk
Android GUI for WireGuard
This is an Android GUI for WireGuard. It opportunistically uses the kernel implementation, and falls back to using the non-root userspace implementation.
$ git clone --recurse-submodules https://git.zx2c4.com/wireguard-android
$ cd wireguard-android
$ ./gradlew assembleRelease
macOS users may need flock(1).
The tunnel library is on Maven Central, alongside extensive class library documentation.
implementation 'com.wireguard.android:tunnel:$wireguardTunnelVersion'
The library makes use of Java 8 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.0.3"
}
Please help us translate the app into several languages on our translation platform.