fix(tunnel): use the DSH home for plugin auto-restore state - #124
Merged
shaobeichen merged 1 commit intoSep 16, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #121.
When Pocket is loaded as a DSH plugin, starting a tunnel currently leaves no restart marker: the plugin entry passes an undefined home to the service, which disables persistence. A host restart therefore cannot restore the tunnel, even if the marker was created manually.
Use the same
DSH_HOME/~/.dshfallback already used for Pocket's settings and access tokens, while preserving an explicit home override. Regression tests exercise the plugin entry in both web and Desktop contexts, including persistence, restoration, and manual stop.Validation: all 174 tests pass on Node 22.20.0. I also loaded the packed plugin in an isolated DSH 0.1.2-rc.1 web profile and checked three host starts: starting a tunnel writes its marker, restarting restores it, and restarting after a manual stop leaves it stopped. That check used a local cloudflared process fixture; it did not connect to Cloudflare.