跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] [开源] 低延迟的 ssh,基于 UDP ( KCP ) 实现, 类似 mosh(比 mosh 多了端口转发)

发表于

开源地址

客户端 tsshhttps://github.com/trzsz/trzsz-ssh

服务端 tsshdhttps://github.com/trzsz/tsshd

基本原理

tssh 是一个 go 实现的 ssh 客户端( 已经 1.4K 的 Star 了,感谢大家的支持 ),--udp 是一个新功能。

当使用 tssh —udp 登录时,将在服务器上启动一个新的 tsshd 进程,tsshd 输出 UDP 端口和密钥( tssh 作为 ssh 客户端,可以安全地接收到 )。

然后 tssh 关闭 ssh 的 TCP 连接,再使用 UDP ( KCP ) 与 tsshd 通讯( tsshd 在这里开始承担 sshd 的角色 )。

原理和 mosh 差不多,比 mosh 多了端口转发。

安装方法

  • 在服务器上安装 tsshd( 暂时要用 go install 安装 ):

    go install github.com/trzsz/tsshd/cmd/tsshd@main
    
  • 在客户端上安装 tssh( 这是 main 分支,预计要 v0.1.21 版本才正式支持 ):

    go install github.com/trzsz/trzsz-ssh/cmd/tssh@main
    

使用方法

  • 在使用 tssh 登录时,加 --udp 参数启用,用 --tsshd-path 指定 tsshd 在服务器上的路径。
  • 也可以在 ~/.ssh/config 中如下配置( 命令行参数即可省略 ):
    Host xxx
        #!! UdpMode yes
        #!! TsshdPath ~/go/bin/tsshd
    

界面截屏

tssh 可以当作 ssh 来使用,常用的功能都兼容。不带参数启动时,会列出 ~/.ssh/config 中配置的机器,可选择登录,如图:

tssh

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.