Commit graph

6 commits

Author SHA1 Message Date
okhsunrog
c059c64582 fix(zygisk): cover libc socket-interface binds 2026-07-13 21:57:05 +03:00
okhsunrog
bca81b80e7 fix: block socket binds to hidden VPN interfaces 2026-07-13 20:22:51 +03:00
okhsunrog
52b137b78e Add backend-specific native hook selection 2026-06-29 19:24:03 +03:00
okhsunrog
552762a246 Add LSPosed interception stats 2026-06-29 02:43:23 +03:00
okhsunrog
22d9f62ce0 kpm: speak the control/stats protocol over ctl0
Dispatch the KernelPatch ctl0 supercall on the §4 header kind:
- config  -> vpnhide_parse_config: per-uid hookmask + debug (replaces the
  uid-only target set; each hook now gated by its bit, enabling per-hook
  control). The decimal load-args path stays for headless QEMU bring-up and
  enables the full kernel mask.
- status  -> vpnhide_format_status: backend id, kver, installed-hook mask,
  dominant error (ok / partial_hooks), via out_msg + clamp_to_line.
- stats   -> format wired; per-(uid,hook) counters are a follow-up (TODO).

Add backend ids (kmod/kpm/zygisk/lsposed, protocol §4.3) to the registry so
the status emitter and the app share one source — codegen now renders them
to C/Rust/Kotlin alongside the hook ids and error codes.
2026-06-28 11:53:30 +03:00
okhsunrog
e85f7cb401 codegen: hook-id registry (protocol §5 single source of truth)
data/hooks.toml is the global hook id space + status error codes shared by
the control/stats protocol: bit N of a config mask == hook id N == the id in
a stats line. scripts/codegen-hooks.py renders the matching id enums,
per-backend 'own' masks, and error codes for every language that touches the
protocol (kmod/KPM C, zygisk Rust, lsposed-native Rust, app Kotlin), so the
numbering can never diverge between backends. Wired into the CI drift-check
beside the iface-list codegen.

The script runs under uv (PEP 723, '#!/usr/bin/env -S uv run' so plain
./scripts/codegen-hooks.py works), matching the repo's other tooling; no
external deps. Generated outputs are rustfmt- and ktlint-clean by
construction. Registry is append-only: ids are permanent so old stats keep
meaning and old readers skip unknown ids.
2026-06-28 02:21:28 +03:00