Skip to content

Commit

Permalink
support QUIC protocol ( upgrade to go1.21 )
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnywong committed Jun 30, 2024
1 parent 15740c8 commit 0cf50dd
Show file tree
Hide file tree
Showing 14 changed files with 309 additions and 213 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "1.21"
- name: go test
run: go test -v -count=1 ./tssh
go-test-on-macos:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "1.21"
- name: go test
run: go test -v -count=1 ./tssh
go-test-on-windows:
Expand All @@ -31,6 +31,6 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "1.21"
- name: go test
run: go test -v -count=1 ./tssh
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "1.21"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
11 changes: 9 additions & 2 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ trzsz-ssh ( tssh ) 设计为 ssh 客户端的直接替代品,提供与 openssh

</details>

- 用 Go 直接安装( 要求 go 1.20 以上 )
- 用 Go 直接安装( 要求 go 1.21 以上 )

<details><summary><code>go install github.com/trzsz/trzsz-ssh/cmd/tssh@latest</code></summary>

Expand All @@ -131,7 +131,7 @@ trzsz-ssh ( tssh ) 设计为 ssh 客户端的直接替代品,提供与 openssh
</details>
- 用 Go 自己编译( 要求 go 1.20 以上 )
- 用 Go 自己编译( 要求 go 1.21 以上 )
<details><summary><code>sudo make install</code></summary>
Expand Down Expand Up @@ -679,6 +679,13 @@ trzsz-ssh ( tssh ) 设计为 ssh 客户端的直接替代品,提供与 openssh

- `tsshd` 进程会随机侦听一个 61000 到 62000 之间的 UDP 端口,并将其端口和密钥通过 ssh 通道发回给 `tssh` 进程。登录的 ssh 连接会被关闭,然后 `tssh` 进程通过 UDP 与 `tsshd` 进程通讯。

- `tsshd` 支持 `QUIC` 协议和 `KCP` 协议(默认是 `QUIC` 协议),可以命令行指定(如 `-oUdpMode=KCP`),或如下配置:

```
Host xxx
#!! UdpMode KCP
```

## 故障排除

- 在 Warp 终端,分块 Blocks 的功能需要将 `tssh` 重命名为 `ssh`,推荐建个软链接( 对更新友好 ):
Expand Down
11 changes: 9 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ trzsz-ssh ( tssh ) is an ssh client designed as a drop-in replacement for the op
</details>
- Install with Go ( Requires go 1.20 or later )
- Install with Go ( Requires go 1.21 or later )
<details><summary><code>go install github.com/trzsz/trzsz-ssh/cmd/tssh@latest</code></summary>
Expand All @@ -131,7 +131,7 @@ trzsz-ssh ( tssh ) is an ssh client designed as a drop-in replacement for the op
</details>
- Build from source ( Requires go 1.20 or later )
- Build from source ( Requires go 1.21 or later )
<details><summary><code>sudo make install</code></summary>
Expand Down Expand Up @@ -681,6 +681,13 @@ trzsz-ssh ( tssh ) is an ssh client designed as a drop-in replacement for the op
- The `tsshd` process listens on a random udp port between 61000 and 62000, and sends its port number and a secret key back to the `tssh` process over the ssh channel. The ssh connection is then shut down, and the `tssh` process communicates with the `tsshd` process over udp.
- The `tsshd` supports `QUIC` protocol and `KCP` protocol (the default is `QUIC`), which can be specified on the command line (such as `-oUdpMode=KCP`), or configured as follows:
```
Host xxx
#!! UdpMode KCP
```
## Trouble shooting
- In the Warp terminal, the features like Blocks requires renaming `tssh` to `ssh`. It is recommended to create a soft link (friendly for updates):
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ trzsz-ssh ( tssh ) offers additional useful features:
</details>
- Install with Go ( Requires go 1.20 or later )
- Install with Go ( Requires go 1.21 or later )
<details><summary><code>go install github.com/trzsz/trzsz-ssh/cmd/tssh@latest</code></summary>
Expand All @@ -155,7 +155,7 @@ trzsz-ssh ( tssh ) offers additional useful features:
</details>
- Build from source ( Requires go 1.20 or later )
- Build from source ( Requires go 1.21 or later )
<details><summary><code>sudo make install</code></summary>
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: utils
Priority: optional
Maintainer: Lonny Wong <[email protected]>
Build-Depends: debhelper (>=9),
golang-1.20-go
golang-1.21-go
Standards-Version: 3.9.6
Homepage: https://trzsz.github.io/ssh
Vcs-Browser: https://github.com/trzsz/trzsz-ssh
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export CGO_ENABLED=0
export GOCACHE=/tmp/.cache/go-build

%:
PATH="/usr/lib/go-1.20/bin:${PATH}" dh $@
PATH="/usr/lib/go-1.21/bin:${PATH}" dh $@
21 changes: 15 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/trzsz/trzsz-ssh

go 1.20
go 1.21

require (
github.com/Microsoft/go-winio v0.6.2
github.com/alessio/shellescape v1.4.2
github.com/charmbracelet/bubbles v0.18.0
github.com/charmbracelet/bubbletea v0.26.5
github.com/charmbracelet/bubbletea v0.26.6
github.com/charmbracelet/lipgloss v0.11.0
github.com/chzyer/readline v1.5.1
github.com/creack/pty v1.1.21
Expand All @@ -24,8 +24,7 @@ require (
github.com/trzsz/promptui v0.10.7
github.com/trzsz/ssh_config v1.3.6
github.com/trzsz/trzsz-go v1.1.8-0.20240525015006-6424386a6738
github.com/trzsz/tsshd v0.1.0
github.com/xtaci/kcp-go/v5 v5.6.1
github.com/trzsz/tsshd v0.1.1
golang.org/x/crypto v0.24.0
golang.org/x/sys v0.21.0
golang.org/x/term v0.21.0
Expand All @@ -46,6 +45,8 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dchest/jsmin v0.0.0-20220218165748-59f39799265f // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/josephspurrier/goversioninfo v1.4.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
Expand All @@ -57,18 +58,26 @@ require (
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/ncruces/zenity v0.10.12 // indirect
github.com/onsi/ginkgo/v2 v2.19.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/quic-go v0.45.1 // indirect
github.com/randall77/makefat v0.0.0-20210315173500-7ddd0e42c844 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/templexxx/cpu v0.1.0 // indirect
github.com/templexxx/cpu v0.1.1-0.20240303154708-598a14b050c5 // indirect
github.com/templexxx/xorsimd v0.4.2 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/image v0.17.0 // indirect
github.com/xtaci/kcp-go/v5 v5.6.8 // indirect
github.com/xtaci/smux v1.5.24 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.22.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 0cf50dd

Please sign in to comment.