This repository was archived by the owner on Jan 6, 2025. It is now read-only.
Open
Conversation
ghost
suggested changes
Apr 19, 2022
internal/sshserver/serverImpl.go
Outdated
| messageCodes "github.com/containerssh/libcontainerssh/message" | ||
| "github.com/containerssh/libcontainerssh/service" | ||
| "golang.org/x/crypto/ssh" | ||
| "github.com/pires/go-proxyproto" |
There was a problem hiding this comment.
This is a third party library and should be abstracted away with its own package, including tests so it can be replaced if need be.
internal/sshserver/serverImpl.go
Outdated
| s.lock.Unlock() | ||
| return messageCodes.Wrap(err, messageCodes.ESSHStartFailed, "failed to start SSH server on %s", s.cfg.Listen) | ||
| } | ||
| if useProxy { |
There was a problem hiding this comment.
It seems to me that PROXY is a wrapper protocol like many others (e.g. websocket). We should consider creating a generic abstraction for wrapper protocols.
Member
Author
There was a problem hiding this comment.
I don't foresee having any other wrapping protocols in-front of the ssh server since, we can consider that if it's necessary further down the line.
Member
Author
|
@janosdebugs This one is ready for another review as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please describe the change you are making
Implement support for the PROXY protocol. Sadly this cannot easily be tested as there are no user-visible changes if this is implemented correctly. (Header is transparently accepted/rejected)
Are you the owner of the code you are sending in, or do you have permission of the owner?
Sent with permission of the owner
The code will be published under the MIT-0 license. Have you read and understood this license?
Yes