mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 15:34:06 +01:00
The iptables chain machinery (ensure_chain, trusted_dot_ips, fill_chain_v4/v6, expected_rule_count, chain_intact, enforce_iptables) moves into dns_iptables.sh — a sibling, not a lib/ member, because lib/ does not exist on the phone and deploy.sh copies these files flat into $REMOTE_DIR. Both deploy lists grew the entry, matching how tether_iptables.sh is carried; it is correctly absent from the chmod 755 line, since a sourced library needs read, not execute. extract_shell_functions.py refuses to anchor a source line in a #!/system/bin/sh script, as documented — but when it refuses it still writes the library and does NOT remove the functions from the source, so a naive run leaves every function defined twice and the entry script longer than it started. The excision was done separately; the hash tool confirms all 14 functions moved verbatim. test_dns_enforcer.sh is deleted rather than repaired. Its six assertions targeted extract_ping_ip, extract_package_uid and append_unique_line — none of which dns_enforcer.sh has ever defined. It died at its source line and had never run a single assertion since it was added. Its replacement, test_dns_iptables.sh, covers all seven moved functions with 20 assertions, staged the way test_tether_enforcer.sh stages its subject. Three independent mutations were each caught: undercounting the trusted-resolver ACCEPT, miscounting rules per DoH IP, and moving the ACCEPT after the blanket REJECT. Shared staging lives in dns_iptables_harness.sh so both test files stay under the cap. Not verified on the phone — no deploy has run, by instruction. Over-cap count 23 -> 22. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| adb_test_harness.sh | ||
| dns_iptables_harness.sh | ||
| test_adb_common.sh | ||
| test_adb_trusted.sh | ||
| test_dns_iptables.sh | ||
| test_magisk_service.sh | ||
| test_monitor.sh | ||
| test_tether_enforcer.sh | ||