Linjiangxian0203/dsh-remote-tunnel ↗★ 3
dsh-remote-tunnel
Remote Host Tunnel Manager for dsh: allocate and register remote ports, run dsh web on a remote Linux server via systemd, and keep a resilient SSH tunnel from this machine to it.
AI Analysis
核心用途是管理本地与远程 Linux 服务器之间的 DSH 隧道。适合需要在远程服务器部署 DSH 并通过本地安全访问的高级用户或团队开发场景。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Linjiangxian0203/dsh-remote-tunnelREADME
Read the full README ↗Configuration
$DSH_HOME/remote-tunnel/config.yaml (dsh --profile remote config path prints the path):
hosts:
lab: # manually defined hosts (merged with ~/.ssh/config aliases; wins on name collision)
host: 192.0.2.10
port: 22
user: alice
workspace: /home/alice/project
remotePortRange: [3080, 3119] # optional per-host override
defaults:
remotePortRange: [3080, 3119] # remote dsh port range (occupancy-checked before allocation)
localPortRange: [3081, 3140] # local tunnel port range
registry:
path: /etc/dsh-ports.tsv
lockPath: /etc/dsh-ports.lock
sudo: auto # auto | always | never
fallbackPath: .dsh-ports.tsv # used when the shared registry is not writable (relative = remote home)
unit:
prefix: dsh-web-
restartSec: 5
type: auto # auto | system | user
heartbeatSeconds: 120 # 0 = disable heartbeats
remoteWaitSeconds: 60 # wait for the remote port to listen
localWaitSeconds: 15 # wait for the local URL to respond
reconnect:
delaysMs: [1000, 2000, 4000, 8000, 15000, 30000]
maxAttempts: 0 # 0 = never give up
allocateRetries: 5
ssh:
connectTimeout: 0 # 0 = do not pass -o ConnectTimeout (see Troubleshooting)
extraArgs: []