wssh

package
v0.0.0-...-ea7aefe Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgType

type MsgType byte
const (
	UNKNOWN MsgType = iota
	CONFIG
	SESSION
	RESIZE
	HEARTBEAT
)

type Option

type Option func(o *options)

Option is an application option.

func Host

func Host(host string) Option

func IdentityFile

func IdentityFile(file string) Option

func ListenPort

func ListenPort(port int) Option

func Password

func Password(password string) Option

func Port

func Port(port int) Option

func User

func User(user string) Option

type WebSocketShell

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

func New

func New(opts ...Option) *WebSocketShell

func (*WebSocketShell) Open

func (w *WebSocketShell) Open() (*ssh.Client, error)

func (*WebSocketShell) Receive

func (w *WebSocketShell) Receive(ws *websocket.Conn, session *ssh.Session, writer io.WriteCloser) (err error)

func (*WebSocketShell) Send

func (w *WebSocketShell) Send(ws *websocket.Conn, reader io.Reader) (err error)

func (*WebSocketShell) WebSocket

func (w *WebSocketShell) WebSocket(ws *websocket.Conn)

type WindowResize

type WindowResize struct {
	Cols int `json:"cols"`
	Rows int `json:"rows"`
}

WindowResize terminal window resize.

Jump to

Keyboard shortcuts

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