mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-08-21 06:23:44 +00:00
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. |
||
|---|---|---|
| .. | ||
| hooks.toml | ||
| interfaces.toml | ||