corprelayv4

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSession is returned when a session is in an invalid state.
	ErrInvalidSession = errors.New("invalid session")
)

Functions

This section is empty.

Types

type Session

type Session struct {
	// contains filtered or unexported fields
}

A Session is a V4 SSH-over-Websocket Relay session. TODO: Implement reconnect logic.

func New

func New(ssh io.ReadWriteCloser, role session.Role) *Session

New creates a *Session from a given SSH connection.

func (*Session) Close

func (s *Session) Close() error

Close closes the SSH connection, causing the Session to be invalid.

func (*Session) Done

func (s *Session) Done() <-chan struct{}

Done notifies when a session has terminated.

func (*Session) Run

func (s *Session) Run(ws *websocket.Conn) error

Run starts a new session between the WebSocket and SSH connections.

func (*Session) SID

func (s *Session) SID() uuid.UUID

SID returns the Session ID.

func (Session) String

func (s Session) String() string

func (*Session) Version

func (s *Session) Version() session.ProtocolVersion

Version returns the protocol version in use for the session.

Directories

Path Synopsis
Package command defines the various corp-relay-v4@google.com commands.
Package command defines the various corp-relay-v4@google.com commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL