server

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtrlC byte = 0x3
	CtrlD byte = 0x4
)

Variables

View Source
var (
	SSHEnabledFlag     = "ssh-enabled"
	SSHAddressFlag     = "ssh-address"
	SSHHostKeyFlag     = "ssh-host-key"
	SSHHostKeyPathFlag = "ssh-host-key-path"

	TelnetEnabledFlag = "telnet-enabled"
	TelnetAddressFlag = "telnet-address"
)

Functions

func Flags

func Flags(flags *flag.FlagSet)

func ListenForExit added in v1.2.1

func ListenForExit(ctx context.Context, cancel context.CancelFunc, in io.Reader)

func RemoteIp

func RemoteIp(remoteIpPort string) string

Types

type Config

type Config struct {
	Enabled bool
	Address string
	Log     *log.Entry
	Movie   *movie.Movie
}

type SSH

type SSH struct {
	Config
	HostKeyPEM  string
	HostKeyPath string
}

func NewSSH

func NewSSH(flags *flag.FlagSet) SSH

func (*SSH) Listen

func (s *SSH) Listen(ctx context.Context, m *movie.Movie) error

func (*SSH) ServeSSH

func (s *SSH) ServeSSH(m *movie.Movie) wish.Middleware

type Telnet

type Telnet Config

func NewTelnet

func NewTelnet(flags *flag.FlagSet) Telnet

func (*Telnet) Listen

func (t *Telnet) Listen(ctx context.Context, m *movie.Movie) error

func (*Telnet) ServeTelnet

func (t *Telnet) ServeTelnet(conn net.Conn, m *movie.Movie)

Jump to

Keyboard shortcuts

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