Linjiangxian0203/dsh-remote-tunnel ↗★ 5
dsh-remote-tunnel
管理远程主机隧道、端口分配及服务运行 适合需要通过SSH隧道在远程Linux服务器上运行和管理DSH Web服务的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Linjiangxian0203/dsh-remote-tunnel說明文件
閱讀完整 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: []