Documentation ¶
Overview ¶
Package session defines an SSH Relay protocol implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadProtocolVersion is returned when a bad protocol version is requested. ErrBadProtocolVersion = errors.New("bad protocol version") )
Functions ¶
func SetDeadline ¶
SetDeadline sets a maximum session deadline, after which the session will be terminated.
Types ¶
type ProtocolVersion ¶
type ProtocolVersion int
ProtocolVersion is the version of the SSH relay protocol to use in a session.
const ( // CorpRelay is the original corp-relay@google.com protocol version. CorpRelay ProtocolVersion = iota // CorpRelayV4 is the corp-relay-v4@google.com protocol version. CorpRelayV4 // SSHFE is the ssh-fe@google.com protocol version. // NOTE: Not implemented. SSHFE )
func (ProtocolVersion) String ¶
func (v ProtocolVersion) String() string
type Session ¶
type Session interface { // String returns the Session ID as a string, used for logging. String() string // SID returns the Session ID. SID() uuid.UUID // Version returns the protocol version in use for the session. Version() ProtocolVersion // Run starts bidirectional communication between the client and server. Run(ws *websocket.Conn) error // Close closes the SSH connection, causing the Session to be invalid. Close() error // Done notifies when the Session has terminated. Done() <-chan struct{} }
A Session handles SSH-over-WebSocket Relay sessions.
Directories ¶
Path | Synopsis |
---|---|
Package corprelay implements the corp-relay@google.com protocol, see https://chromium.googlesource.com/apps/libapps/+/HEAD/nassh/doc/relay-protocol.md#corp-relay.
|
Package corprelay implements the corp-relay@google.com protocol, see https://chromium.googlesource.com/apps/libapps/+/HEAD/nassh/doc/relay-protocol.md#corp-relay. |
Package corprelayv4 implements the corp-relay-v4@google.com protocol, see https://chromium.googlesource.com/apps/libapps/+/HEAD/nassh/doc/relay-protocol.md#corp-relay-v4.
|
Package corprelayv4 implements the corp-relay-v4@google.com protocol, see https://chromium.googlesource.com/apps/libapps/+/HEAD/nassh/doc/relay-protocol.md#corp-relay-v4. |
command
Package command defines the various corp-relay-v4@google.com commands.
|
Package command defines the various corp-relay-v4@google.com commands. |
Click to show internal directories.
Click to hide internal directories.