trzsz / trzsz-ssh

trzsz-ssh ( tssh ) is an ssh client designed as a drop-in replacement for the openssh client. It aims to provide complete compatibility with openssh, mirroring all its features, while also offering additional useful features. Such as login prompt, batch login, remember password, automated interaction, trzsz, zmodem(rz/sz), udp mode like mosh, etc.
https://trzsz.github.io/ssh
MIT License
1.68k stars 100 forks source link

计划支持一种新的传输模式 — 隧道模式,客户端使用 tssh 时生效,服务端先在 Go 版实现。 #12

Closed lonnywong closed 11 months ago

lonnywong commented 1 year ago

基本思路: 1、服务端trz / tsz 在启动时,侦听 127.0.0.1 上的一个随机端口,并将端口号告知客户端。 2、tssh 作为客户端时,会使用 SSH 隧道尝试与 trz / tsz 建立连接,成功则使用隧道模式传输。 3、如果因为跳板机或 docker exec 等原因,导致无法与 trz / tsz 建立连接,则降级使用 trzsz 原有模式。

场景举例:

客户端 跳板机 服务器 传输模式
trzsz ssh trz / tsz 原有模式
tssh trz / tsz ✅ 隧道模式
tssh ssh trz / tsz 原有模式
tssh tssh trz / tsz ✅ 隧道模式
tssh ( ProxyJump ) trz / tsz ✅ 隧道模式
tssh ( ProxyCommand ) trz / tsz ✅ 隧道模式
tssh docker exec -> trz / tsz 原有模式
tssh ssh docker -> trz / tsz 原有模式
tssh tssh docker -> trz / tsz ✅ 隧道模式
trzsz docker exec -> ssh trz / tsz 原有模式
trzsz docker exec -> tssh trz / tsz 原有模式
tssh docker -> ssh trz / tsz 原有模式
tssh docker -> tssh trz / tsz ✅ 隧道模式
maxid commented 1 year ago

支持端口转发吗?

lonnywong commented 1 year ago

支持端口转发吗?

会一并支持的

lonnywong commented 11 months ago

tssh v0.1.12 已支持隧道模式。