Skip to content

fix: restore sing-box after daemon restart - #18

Merged
structName merged 2 commits into
mainfrom
codex/singbox-autorestore
Jun 28, 2026
Merged

fix: restore sing-box after daemon restart#18
structName merged 2 commits into
mainfrom
codex/singbox-autorestore

Conversation

@structName

Copy link
Copy Markdown
Owner

Summary

  • persist the user's desired sing-box running state when the service starts
  • restore sing-box automatically when sbm restarts after power loss or daemon restart
  • add a lightweight monitor that restarts sing-box if it exits unexpectedly while desired-running is set
  • clear desired-running state on manual stop so stopped services stay stopped

Tests

  • npm --prefix web run build
  • GOCACHE=/tmp/sbm-go-cache GOMODCACHE=/tmp/sbm-go-mod-cache go test ./internal/daemon
  • GOCACHE=/tmp/sbm-go-cache GOMODCACHE=/tmp/sbm-go-mod-cache go test ./...

@structName
structName merged commit 3cd7e40 into main Jun 28, 2026
1 check passed
@structName
structName deleted the codex/singbox-autorestore branch June 28, 2026 18:22
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