Skip to content

fix(tunnel): use the DSH home for plugin auto-restore state - #124

Merged
shaobeichen merged 1 commit into
shaobeichen:mainfrom
Shy7777:fix/plugin-tunnel-persistence-home
Sep 16, 2026
Merged

shaobeichen merged 1 commit into
shaobeichen:mainfrom
Shy7777:fix/plugin-tunnel-persistence-home

Conversation

@Shy7777

@Shy7777 Shy7777 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

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 / ~/.dsh fallback 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.

Copilot AI lite review requested due to automatic review settings September 12, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@shaobeichen
shaobeichen merged commit cab1e24 into shaobeichen:main Sep 16, 2026
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.

[Bug] DSH Desktop 下公网隧道「自动恢复」永不生效:internals.home 未注入导致 autoStatePath 为 null(标记从未写入)

3 participants