Repository navigation
Releases
Releases · pphothidaen/homeshield
v1.2.2 — CI/CD Pipeline Fix (Production Release Hardening)
CI/CD Pipeline Fix (Production Release Hardening)
Fixed
- Rust CI Formatting: Fixed import ordering in
router.rs— groupeduse crate::telnet::client::{is_connection_refused, TelnetSession};alphabetically to satisfycargo fmt --check - All CI Green: Rust Embedded Daemon CI (67/67 tests), Python/Shell tests (65/65), CodeQL, Tier 0 CDN Blocklist Pre-Compiler — all passing on
main - Branch Cleanup: All feature branches merged and removed; clean
mainhistory ready for production tag
Production Verified
- Router: ZTE F6107A (PON_2.0) @ 192.168.1.1
- Daemon: ARMv7 musl 509 KB binary
- Status: FULLY_AUTONOMOUS, 604,974 domains blocked
- Operations: deploy → check → update → status all verified
CDN Blocklist
- Domains: 604,973 (29/29 feeds succeeded)
- Hosts: 16.8 MB
- SHA256:
39d4e1ac15d82626206cf60aa41562bc671eb5b876d0d2962dc16b66c5cbffb2
Artifacts
homeshield-daemon(ARMv7, static musl, 509,252 bytes)
v1.2.1 — Stability & Reliability Patch (Production Hardening)
Critical Fixes (Production Stability)
- Signal Handling: Added
signal-hookcrate for graceful SIGTERM/SIGHUP/SIGINT handling in Rust daemon — prevents mid-operation termination duringdo_update/apply_hosts - PID File Liveness Check:
acquire_lock()now verifies PID liveness viakill -0before blocking; atomic write (.tmp+ rename) prevents stale lock corruption - File Descriptor Limit: Daemon sets
RLIMIT_NOFILE=65536at startup vianix::sys::resource— eliminates "Too many open files" during concurrentdo_updateoperations - Memory Pressure Guard: Pre-flight
/proc/meminfoMemAvailablecheck before large allocation indo_update— aborts if < 20 MB free, prevents OOM kill mid-write - Firewall Race Reduction: Reduced
firewall_tick_stridefrom 6→2 (30s→10s) in Supervisor; event-driven dnsmasq detection for faster iptables rule restoration - Resource Hygiene: All file opens use
O_CLOEXEC; watchdog.sh addstrap 'wait' CHLDto reap zombie children
Observability Improvements
- Graceful shutdown logging with reason (signal received, error, normal)
- Lock acquisition telemetry (PID, liveness check result, wait time)
- Memory pressure check result logged before each
do_update
Compatibility
- ✅ ARMv7 musl cross-compile verified (
signal-hook,nixwork on musl) - ✅ Zero-wear Flash delta check preserved (no additional Flash writes)
- ✅ ZTE cspd self-healing (WAN reconnect host restore) unchanged
- ✅ BusyBox ash compatible (no new shell dependencies)
Testing Checklist (Pre-Release)
- ✅ Unit tests:
cargo test --manifest-path rust/Cargo.toml --workspace(67/67 pass) - ✅ Python tests:
python3 -m pytest tests/ -v(65/65 pass) - ✅ Integration: Deploy to 192.168.1.1, verify
ROUTER_AUTONOMY: FULLY_AUTONOMOUS - ✅ Stress: Trigger
do_update10x rapidly — verify no FD exhaustion, no stale lock - ✅ Signal: Send SIGTERM/SIGHUP to running daemon — verify graceful shutdown + lock cleanup
- ✅ Memory: Simulate low memory (
MemAvailable < 20MB) — verifydo_updateaborts cleanly - ✅ Firewall: Restart dnsmasq — verify iptables rules restored within 10s
- ✅ Zombie: Run watchdog.sh for 1 hour — verify no defunct processes accumulate
- ✅ Regression: Full test suite + router deploy + internet connectivity (DNS/HTTPS/Ping)
Artifacts
- ARMv7 binary:
homeshield-daemon(527 KB static, musl) - SHA256: Available from CI artifact
homeshield-daemon-armv7
v1.2.0 — Performance Fine-Tuning & Universal IoT Telemetry Shield
🛡️ HomeShield v1.2.0 — Performance Fine-Tuning & Universal IoT Telemetry Shield
⚡ Performance Fine-Tuning (Design Patterns)
- Builder & Strategy Pattern (
BlocklistCompiler::with_capacity): Pre-sizesHashSet&Vecto300,000+capacity acrosshomeshield-daemonandhomeshield-cli compile, eliminating repeated O(n) rehashing on embedded ARMv7 and CI builds. - Flyweight Pattern (
Arc<HashSet<String>>): Shares immutable whitelist viaBlocklistCompiler::with_shared_whitelistfor zero-clone CDN fallback rebuilds. - Cache-Aside Pattern (
domain_countSidecar): Writes verified unique domain count duringdo_update()sodo_status()reads in O(1) without scanning 8 MB+ hosts files (reporting0cleanly whenPAUSED). - Buffer Reuse Pattern & 128 KB Streaming I/O: Upgraded
file_len_and_fnv1a,write_hosts,write_dual_stack_hosts,apply_hosts,ensure_base_hosts, and fallbackcount_blocked_v4_domainsto 128 KB buffers and single reusedStringline buffers (eliminating 600k+ heap allocations). - Single-Pass Visitor Pattern (
/procscan): AddedSystemOps::find_any_process_pidsto locate resident daemon processes in 1/procdirectory walk instead of 3. - Scatter-Gather Pattern (
JoinSetLAN Probe): Parallelized ADB port 5555 discovery across all LAN DHCP/ARP leases (~800 ms total instead of N × 800 ms sequentially).
🌐 Universal IoT & Device Telemetry Blocking (29 Live Feeds)
- Added 8 verified telemetry feeds (
native.amazon.txt,native.apple.txt,native.huawei.txt,native.oppo-realme.txt,native.vivo.txt,native.roku.txt,native.winoffice.txt,WindowsSpyBlocker/spy.txt). - Added
deviceCLI alias +DeviceCategoryclassifier (Smart TV,Smartphone / Tablet,IP Camera,Smart Speaker,Gaming Console) + built-in OEM telemetry fallback rules & mobile core protection.
📊 Verification Highlights
- TurtleCute Ad Blocker Test: 97% (126 / 130 Blocked) (
4remaining are browser-only cosmetic CSS placeholders and first-partyads.js/pagead.jsscripts). - Embedded Memory Footprint:
408 kBVmRSS on ARMv7 (ZTE ZXHN F6107A). - Diagnostic Whitelist:
adblock.turtlecute.orgwhitelisted for live browser verification.
📦 Release Asset & Checksum
| Asset | SHA-256 |
|---|---|
homeshield-daemon-armv7-unknown-linux-musleabi |
02e651da197b8251b578a1da2608145fd83a22a71c6ef1c0da6957a73164c9ef |