Commit graph

4 commits

Author SHA1 Message Date
okhsunrog
c1a1e37b73 Fix unsafe block in netlink_recv for Rust 2024 edition 2026-04-14 16:45:43 +03:00
okhsunrog
14bdfd9650 Hook recv for netlink filtering on Android 10 (no SELinux block)
On Android 10 and devices with permissive SELinux, netlink RTM_GETLINK
is not blocked by sepolicy. The existing recvmsg hook covers most
callers (bionic getifaddrs, Java NetworkInterface), but code using
recv() goes through recvfrom via a bare branch — a different syscall
path. Hooking recvfrom directly breaks recv (shadowhook overwrites the
branch target), so we hook recv instead (12 bytes, safe for island mode).

Also switch diagnostic checks from recv to recvmsg so they go through
the hooked path, and add a separate recv-based check for full coverage.
2026-04-14 16:00:59 +03:00
okhsunrog
b8f1000d0f feat: run checks in separate process, detect network access restriction
- Add CheckRunnerService running in :checks process — clean process
  without Vector/LSPosed runtime, so native checks (ioctl, socket)
  behave exactly like a normal app
- DiagnosticsScreen communicates with service via broadcast
- Detect ECONNREFUSED on socket() (Android per-app network restriction)
  and show banner with instructions to enable network access
- NETWORK_BLOCKED results shown as INFO instead of FAIL
- Auto-detect VPN via /sys/class/net + operstate (works with split tunneling)
- Auto-add self to target list on first diagnostics run
2026-04-13 14:48:32 +03:00
okhsunrog
567b377d47 feat: merge diagnostics into VPN Hide app
- Add native Rust checks library (lsposed/native/) with all 26 detection
  checks, ported from test-app with updated JNI package path
- Add NativeChecks.kt JNI bridge
- Add DiagnosticsScreen.kt with full test UI (sections, banners, cards)
- Add bottom navigation: Apps tab (target picker) + Diagnostics tab
- Update CI: lsposed job now uses CI container image (has Rust + NDK)
- Merge all diagnostic strings into lsposed strings.xml (EN + RU)
- Add cargo-ndk build task to lsposed gradle
2026-04-13 11:35:53 +03:00