mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-05-05 18:53:49 +00:00
refactor: replace C++ native checks with Rust
Port all 15 native VPN detection checks from C++ to Rust using jni + libc crates. Gradle triggers cargo-ndk automatically via a preBuild dependency — single `./gradlew installDebug` builds everything. - Remove CMakeLists.txt and native-lib.cpp - Add test-app/native/ Rust crate with Cargo.toml and src/lib.rs - Gradle buildRustNative task runs cargo-ndk, copies .so to jniLibs - Update CI test-app job with Rust + NDK setup - 23/23 checks pass on device
This commit is contained in:
parent
5eaebd0a12
commit
e413debe45
9 changed files with 880 additions and 550 deletions
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
|
@ -192,8 +192,24 @@ jobs:
|
|||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Install Rust + cargo-ndk
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
|
||||
. "$HOME/.cargo/env"
|
||||
rustup target add aarch64-linux-android
|
||||
cargo install cargo-ndk --locked
|
||||
|
||||
- name: Set up Android NDK
|
||||
uses: nttld/setup-ndk@v1
|
||||
id: ndk
|
||||
with:
|
||||
ndk-version: r28b
|
||||
|
||||
- name: Build APK
|
||||
run: cd test-app && ./gradlew --no-daemon assembleDebug
|
||||
run: |
|
||||
. "$HOME/.cargo/env"
|
||||
export ANDROID_NDK_HOME=${{ steps.ndk.outputs.ndk-path }}
|
||||
cd test-app && ./gradlew --no-daemon assembleDebug
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue