francoismichel / ssh3

SSH3: faster and rich secure shell using HTTP/3, checkout our article here: https://arxiv.org/abs/2312.08396 and our Internet-Draft: https://datatracker.ietf.org/doc/draft-michel-ssh3/
https://arxiv.org/abs/2312.08396
Apache License 2.0
3.19k stars 82 forks source link

simplify install #42

Closed drewwells closed 6 months ago

drewwells commented 6 months ago

go supports cloning via git+ssh, so you can use the toolchain to do the install ie. go install github.com/francoismichel/ssh3/cli/server@latest. You need better folder names though, b/c it's going to install the tool as $GOBIN/server

In go, it's more typical to use a cmd sub folder, maybe checkout go tools for ideas on how you want to support it: https://pkg.go.dev/golang.org/x/tools

My suggestion would be something like:

Server install

go install github.com/francoismichel/ssh3/cmd/sshd@latest

Client install

go install github.com/francoismichel/ssh3/cmd/ssh@latest

I'm happy to reoganize the repo to pretty paths.

drewwells commented 6 months ago

fyi, the above doesn't work yet. go.mod needs to be updated with the full module path

go: downloading github.com/francoismichel/ssh3 v0.1.4
go: github.com/francoismichel/ssh3/cli/server@latest: version constraints conflict:
        github.com/francoismichel/ssh3@v0.1.4: parsing go.mod:
        module declares its path as: ssh3
                but was required as: github.com/francoismichel/ssh3
francoismichel commented 6 months ago

That would be pretty neat indeed. If you feel like doing this reorganization work, let's do that. We can work on it together as well if you need input.

Be aware that we have integration tests (in the integration_tests folder, they are run for every PR). They are not run locally by default when running go test because they need to run an SSH3 server, so these test should be adapted to work correctly with that reorganization (it should just be a matter of adapting paths).

Adding tests running go install for new releases would be pretty cool as well.

Thanks for the suggestions !

drewwells commented 6 months ago

What do you want to call the binaries? ssh3 sshd3 ssh sshd

Also curious if you’ve considered making the client contract compatible with existing ssh. It would be great to just drop this in as a daemon replacement on an existing system

On December 17, 2023, Anthony Sottile @.***> wrote:

That would be pretty neat indeed. If you feel like doing this reorganization work, let's do that. We can work on it together as well if you need input.

Be aware that we have integration tests (in the integration_tests folder, they are run for every PR https://github.com/francoismichel/ssh3/blob/96b63ccb4b7d8b44f0697462cb6db1d857c1cd5e/.github/workflows/build.yml#L63). They are not run locally by default when running go test because they need to run an SSH3 server, so these test should be adapted to work correctly with that reorganization (it should just be a matter of adapting paths).

Adding tests running go install for new releases would be pretty cool as well.

Thanks for the suggestions !

— Reply to this email directly, view it on GitHub https://github.com/francoismichel/ssh3/issues/42#issuecomment-1859174961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB2MEYX5FQU7DPSP64B2ITYJ3YNRAVCNFSM6AAAAABAXXEUT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGE3TIOJWGE . You are receiving this because you authored the thread.Message ID: @.***>

drewwells commented 6 months ago

Go test can be altered to spin up things prior to running tests. It’s better to find ways to run them in process without shelling out though.

On December 17, 2023, "Drew (Gmail)" @.***> wrote:

What do you want to call the binaries? ssh3 sshd3 ssh sshd

Also curious if you’ve considered making the client contract compatible with existing ssh. It would be great to just drop this in as a daemon replacement on an existing system

On December 17, 2023, Anthony Sottile @.***> wrote:

That would be pretty neat indeed. If you feel like doing this reorganization work, let's do that. We can work on it together as well if you need input.

Be aware that we have integration tests (in the integration_tests folder, they are run for every PR https://github.com/francoismichel/ssh3/blob/96b63ccb4b7d8b44f0697462cb6db1d857c1cd5e/.github/workflows/build.yml#L63). They are not run locally by default when running go test because they need to run an SSH3 server, so these test should be adapted to work correctly with that reorganization (it should just be a matter of adapting paths).

Adding tests running go install for new releases would be pretty cool as well.

Thanks for the suggestions !

— Reply to this email directly, view it on GitHub https://github.com/francoismichel/ssh3/issues/42#issuecomment-1859174961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB2MEYX5FQU7DPSP64B2ITYJ3YNRAVCNFSM6AAAAABAXXEUT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGE3TIOJWGE . You are receiving this because you authored the thread.Message ID: @.***>

francoismichel commented 6 months ago

I think I'm happy with the names ssh3 and ssh3-server for the moment, we could add an ssh3d binary once we get a real daemon.

Also curious if you’ve considered making the client contract compatible with existing ssh. It would be great to just drop this in as a daemon replacement on an existing system

In a way, it is possible as golang has a whole library for parsing and writing SSHv2 packets etc. It would require quite some work though, but would be great.