Skip to content

feat(install): Windows Service wrapper for headless DNS failover#6

Merged
David Mireles (louzt) merged 1 commit into
mainfrom
feat/windows-service-wrapper
Jun 28, 2026
Merged

feat(install): Windows Service wrapper for headless DNS failover#6
David Mireles (louzt) merged 1 commit into
mainfrom
feat/windows-service-wrapper

Conversation

@louzt

@louzt louzt commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a Windows Service wrapper so DNS failover runs as a native Windows Service, surviving restarts and running without a logged-in user.

Changes

New files

File Purpose
Entry point — calls Windows Service module
ServiceMain handler, STOP control handler, DNS Intel lifecycle
+ recovery options + start
after stopping

Modified files

  • : Added (Windows-only dep) and binary entry
    • : Added Windows Service usage section

Dependencies

  • — stable, minimal (~150KB binary impact)
  • feature added to existing crate

Binary

  • — builds on Linux (stub main), runs on Windows only
  • — unchanged, still for Linux systemd users

Testing

  • ✅ (Linux stub)
  • → 6/6 tests pass

Note: Cannot test Windows Service on Linux. Service tested manually on Windows VM after build.

Summary by CodeRabbit

  • New Features

    • Added Windows DNS Failover Service support, including a new service binary and installer/uninstaller scripts.
    • The service can now be installed, started, checked, and removed from Windows using PowerShell.
  • Documentation

    • Updated the README with Windows service setup, status-check, and uninstall instructions in both English and Spanish.
  • Bug Fixes

    • Improved service handling so existing installations are replaced cleanly and shutdown is handled more reliably.

Add netboozt-service Windows binary using windows-service crate.

- Add windows-service = "0.6" dependency (Windows-only)
- Add netboozt-service binary entry in Cargo.toml
- Add windows_service/ module with ServiceMain handler
- Add install-windows-service.ps1 and uninstall-windows-service.ps1
- Update README with Windows Service instructions (EN + ES)

Binary compiles on Linux (stub main), builds on Windows for actual use.
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds a Windows service implementation for the netboozt DNS failover feature. Includes a new netboozt-service Rust binary with a Windows SCM-integrated runner, two PowerShell scripts for install/uninstall, updated Cargo dependencies, and corresponding documentation sections in both English and Spanish READMEs.

Changes

Windows DNS Failover Service

Layer / File(s) Summary
Rust service binary and Windows runner
platforms/tauri/src-tauri/Cargo.toml, platforms/tauri/src-tauri/src/bin/netboozt-service.rs, platforms/tauri/src-tauri/src/bin/windows_service/mod.rs
Adds windows-service = "0.6" and Win32_System_Services to Cargo deps, defines the netboozt-service binary target, implements the main entry point with a non-Windows fallback, and provides the Windows SCM runner that starts DNS intelligence on a thread, handles Stop via an atomic flag, and transitions service status through RunningStopPending.
PowerShell management scripts
platforms/tauri/scripts/install-windows-service.ps1, platforms/tauri/scripts/uninstall-windows-service.ps1
Install script enforces Admin privileges, validates binary path, removes any existing netboozt-dns service, creates it via sc.exe create with auto-start and failure recovery, starts it, and verifies status. Uninstall script checks Admin, stops and deletes the service via sc.exe delete with exit-code validation.
Documentation
README.md, README.es.md
Adds Windows DNS Failover Service sections in both READMEs covering build, install, status check, and uninstall commands.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Poem

🐰 Hop hop, the service is set,
On Windows it runs — no worries yet!
sc.exe create, a flick of the paw,
DNS failover without a flaw.
Install or uninstall, quick as a wink,
This rabbit's got services faster than you'd think! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a Windows Service wrapper for headless DNS failover.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/windows-service-wrapper

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@louzt
David Mireles (louzt) merged commit 5c46489 into main Jun 28, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant