Introduction¶
When exposing local services via dsh-bridge within DSH, Cloudflare’s free-login temporary tunnel changes the *.trycloudflare.com domain every time it restarts. If you are on the public network, or have a second machine at home, you often don’t know which address to connect to right now. Manually copying addresses or sending messages to sync is slow and prone to expiration.
Below is an introduction to the community plugin dsh-bridge-tunnel-hub (maintainer NEVSTOP-LAB): It writes the current public tunnel address of each machine to a shared GitHub secret Gist. The address changes automatically update, and it refreshes the “last online time” at regular intervals for easy checking at any time. The plugin belongs to the “Networking Tools” category of the DSH community; the directory page can be found at SkillHub.
What is it¶
In one sentence: In each DSH process, collect the local machine’s available public address via dsh-bridge, and after a successful health check, write it to a shared Gist. Other machines or the user can find the latest link via the Gist or built-in tools. Compared to “taking notes individually,” the plugin performs collection, health checking, and writing within the process. It is agreed that each machine takes one line, and the Markdown is clickable. Multiple machines share one Gist, which is automatically merged if it is newly created or already registered under the account.
Core Features¶
Every DSH process with the plugin installed does three things:
- Read the local machine’s current public address from dsh-bridge’s persisted state (logs or fixed domain config);
- Perform an end-to-end health check on that address, only reporting if successful;
- Write to Gist: one line per machine, Markdown link directly clickable.
Additionally, by default, it collects and performs a health check again every 4 hours on the hour (local timezone 00:00 / 04:00 / 08:00 / 12:00 / 16:00 / 20:00), only refreshing the “last online time”; machines that haven’t refreshed beyond the interval may be marked as possibly offline in the list. When the address changes, it reports immediately without waiting for the top of the hour.
The Gist contains mainly two files:
| File | Content |
|---|---|
tunnels.md |
One line per machine, including link and last online time |
dsh-bridge-tunnel-hub.json |
Machine name, machineId, url, tunnel type, updatedAt, etc. for minimal online status judgment |
The URL written externally will be converged to scheme://host, without query strings or paths, to avoid writing unsecured parameters like ?auth= into the Gist.
Installation and Enablement¶
Execute the official installation command under the target DSH profile:
dsh plugin --profile <profile> add github:NEVSTOP-LAB/dsh-bridge-tunnel-hub
After installation, an item titled “Summary of Tunnel Addresses” will appear in the plugin list on the DSH settings page. The package version in the current documentation is 0.3.4, the runtime environment requires Node.js >= 22, and the license is MIT. After replacing the plugin package, DSH needs to be restarted once. The Host module caches by path; refreshing the settings page after restart will show the new interface.
The priority for the GitHub write token is: token in plugin settings → environment variables GH_TOKEN / GITHUB_TOKEN → gh auth token. If gh auth login has been used locally and the gist permission is available, it is usually not necessary to configure it separately.
Typical Usage¶
First Run¶
- After the plugin starts, scan
~/.dsh-bridge/cloudflared.log(or dsh-bridge’s fixed domain config) to get the local address; - If the local machine hasn’t registered a Gist yet, it will search for existing registered ones under the account (description equals plugin name, or file contains both
tunnels.mdanddsh-bridge-tunnel-hub.json); if found, join it, don’t create a new one; only create a new secret Gist if not found; - The Gist ID is recorded in the local status file, and subsequent read/write operations target the same Gist.
To write to the same Gist from multiple machines, you must use a token from the same GitHub account; for read-only queries, a token is not required.
Settings Page¶
Path: Settings → Summary of Tunnel Addresses. You can view the local machine’s address, recent reports, next top-of-hour refresh, Gist link, and errors; clicking Update Now forces collection, health check, and writing to Gist without waiting for the top of the hour; you can change machine name, Gist, token, scan/health check/heartbeat and other parameters. Runtime logs can be found at %USERPROFILE%\.dsh\dsh-bridge-tunnel-hub\logs\dsh-bridge-tunnel-hub.log (single file limit 256 KiB, interface displays the last 24 hours).
Tools¶
| Tool | Purpose |
|---|---|
tunnel_self |
Local tunnel address, collection source, report result, next top-of-hour refresh, Gist location |
tunnel_list |
Addresses of all machines in the summary, last online, reachability, and whether possibly offline (stale) |
tunnel_publish |
Immediately rewrite local address to Gist |
Address Collection Priority¶
- If the config item
manualUrlhas a value, use it; cloudflared.hostnamefixed domain inconfig.json;- Otherwise, take the last occurrence of
*.trycloudflare.comincloudflared.log.
Common configuration items (full table in the repository README):
| Config Item | Default | Description |
|---|---|---|
heartbeatHours |
4 | Top-of-hour refresh interval (hours), 0 to disable |
scanIntervalSec |
20 | Address change detection interval (minimum 5 seconds) |
autoPublish |
true | When disabled, only collects without reporting, but tunnel_publish manual write is still available |
Use Cases and Notes¶
Suitable for: Multi-machine or remote personal use scenarios where dsh-bridge + Cloudflare tunnels are already in use and there is a need to centrally view “which machine to connect to now, which URL, and if it is still online”.
Permissions and Security: The plugin runs under the current dsh process permissions. Before installation, you should review the source code and the MIT license yourself. A secret Gist is readable by anyone holding the link; the documentation requires that Gist links are not posted publicly. The Gist does not contain unsecured queries; access still relies on authentication on the dsh-bridge side.
Troubleshooting: Check cloudflared and logPath when there is no tunnel address. Health check failures will retry. 401/403 usually indicate the token is missing gist permission. stale: true in tunnel_list means it hasn’t been refreshed for more than “heartbeat interval + 1 hour”, indicating the machine might be offline or DSH is not running.
The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is a community directory with no official affiliation with DeepSeek / Huanfang.
Conclusion¶
Through the steps above, the problem of dsh-bridge temporary domain drift can be converged into a single secret Gist: automatically following address changes, viewing online status with periodic heartbeats, and checking via tools and settings page locally. When installation commands and configuration details are needed, refer to the repository README.