Documentation ¶
Overview ¶
Package corprelay implements the corp-relay@google.com protocol, see https://chromium.googlesource.com/apps/libapps/+/HEAD/nassh/doc/relay-protocol.md#corp-relay.
Index ¶
Constants ¶
View Source
const ( // AckByteSize is the size in bytes for READ_ACK/WRITE_ACKs. AckByteSize = 4 // AckErrMask is the bit mask for error ack ranges. AckErrMask = 0xff000000 // ChunkSize is the size in bytes for valid read/write requests. ChunkSize = 0xffffff )
Variables ¶
View Source
var ( // ErrInvalidAck is returned when an ack has any error bits set. ErrInvalidAck = errors.New("invalid ack range") )
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
A Session is an SSH-over-WebSocket Relay session. One leg of the session is a WebSocket, the other is an io.Reader/io.Writer pair that talks plain SSH.
func New ¶
func New(ssh io.ReadWriteCloser) *Session
New creates a *Session from a plain SSH connection.
func (*Session) Done ¶
func (s *Session) Done() <-chan struct{}
Done notifies when a session has terminated.
func (*Session) Run ¶
Run starts bidirectional communication between the WebSocket and SSH connections.
func (*Session) Version ¶
func (s *Session) Version() session.ProtocolVersion
Version returns the protocol version in use for the session.
Click to show internal directories.
Click to hide internal directories.