tsshd

package
v0.0.0-...-a91954a Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecvCommand

func RecvCommand(stream net.Conn) (string, error)

func RecvError

func RecvError(stream net.Conn) error

func RecvMessage

func RecvMessage(stream net.Conn, msg any) error

func SendCommand

func SendCommand(stream net.Conn, command string) error

func SendError

func SendError(stream net.Conn, err error)

func SendMessage

func SendMessage(stream net.Conn, msg any) error

func SendSuccess

func SendSuccess(stream net.Conn) error

func TsshdMain

func TsshdMain() int

TsshdMain is the main function of `tsshd` binary.

Types

type AcceptMessage

type AcceptMessage struct {
	ID uint64
}

type AgentRequest

type AgentRequest struct {
	ChannelType string
}

type BusMessage

type BusMessage struct {
	Timeout time.Duration
}

type ChannelMessage

type ChannelMessage struct {
	ChannelType string
	ID          uint64
}

type Client

type Client interface {
	Close() error
	NewStream() (net.Conn, error)
}

func NewClient

func NewClient(host string, info *ServerInfo) (Client, error)

type DialMessage

type DialMessage struct {
	Network string
	Addr    string
	Timeout time.Duration
}

type ErrorMessage

type ErrorMessage struct {
	Msg string
}

type ExitMessage

type ExitMessage struct {
	ID       uint64
	ExitCode int
}

type ListenMessage

type ListenMessage struct {
	Network string
	Addr    string
}

type ResizeMessage

type ResizeMessage struct {
	ID   uint64
	Cols int
	Rows int
}

type ServerInfo

type ServerInfo struct {
	Ver        string
	Port       int
	Mode       string
	Pass       string
	Salt       string
	ServerCert string
	ClientCert string
	ClientKey  string
}

type StartMessage

type StartMessage struct {
	ID    uint64
	Pty   bool
	Shell bool
	Name  string
	Args  []string
	Cols  int
	Rows  int
	Envs  map[string]string
	X11   *X11Request
	Agent *AgentRequest
}

type StderrMessage

type StderrMessage struct {
	ID uint64
}

type X11Request

type X11Request struct {
	ChannelType      string
	SingleConnection bool
	AuthProtocol     string
	AuthCookie       string
	ScreenNumber     uint32
}

Jump to

Keyboard shortcuts

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