guacamole

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnableRecording     = "enable-recording"
	RecordingPath       = "recording-path"
	CreateRecordingPath = "create-recording-path"

	FontName     = "font-name"
	FontSize     = "font-size"
	ColorScheme  = "color-scheme"
	Backspace    = "backspace"
	TerminalType = "terminal-type"

	PreConnectionId   = "preconnection-id"
	PreConnectionBlob = "preconnection-blob"

	EnableDrive              = "enable-drive"
	DriveName                = "drive-name"
	DrivePath                = "drive-path"
	EnableWallpaper          = "enable-wallpaper"
	EnableTheming            = "enable-theming"
	EnableFontSmoothing      = "enable-font-smoothing"
	EnableFullWindowDrag     = "enable-full-window-drag"
	EnableDesktopComposition = "enable-desktop-composition"
	EnableMenuAnimations     = "enable-menu-animations"
	DisableBitmapCaching     = "disable-bitmap-caching"
	DisableOffscreenCaching  = "disable-offscreen-caching"
	// DisableGlyphCaching Deprecated
	DisableGlyphCaching = "disable-glyph-caching"
	ForceLossless       = "force-lossless"

	Domain        = "domain"
	RemoteApp     = "remote-app"
	RemoteAppDir  = "remote-app-dir"
	RemoteAppArgs = "remote-app-args"

	ColorDepth  = "color-depth"
	Cursor      = "cursor"
	SwapRedBlue = "swap-red-blue"
	DestHost    = "dest-host"
	DestPort    = "dest-port"
	ReadOnly    = "read-only"

	UsernameRegex     = "username-regex"
	PasswordRegex     = "password-regex"
	LoginSuccessRegex = "login-success-regex"
	LoginFailureRegex = "login-failure-regex"

	Namespace  = "namespace"
	Pod        = "pod"
	Container  = "container"
	UesSSL     = "use-ssl"
	ClientCert = "client-cert"
	ClientKey  = "client-key"
	CaCert     = "ca-cert"
	IgnoreCert = "ignore-cert"
)
View Source
const Delimiter = ';'

Variables

This section is empty.

Functions

func Disconnect

func Disconnect(ws *websocket.Conn, code int, msg string)

Types

type Configuration

type Configuration struct {
	// ConnectionID is used to reconnect to an existing session, otherwise leave blank for a new session.
	ConnectionID string
	// Protocol is the protocol of the connection from guacd to the remote (rdp, ssh, etc).
	Protocol string
	// Parameters are used to configure protocol specific options like sla for rdp or terminal color schemes.
	Parameters map[string]string
}

Config is the data sent to guacd to configure the session during the handshake.

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration

func (*Configuration) GetParameter

func (c *Configuration) GetParameter(name string) string

func (*Configuration) LoadConfig

func (opt *Configuration) LoadConfig() map[string]string

func (*Configuration) SetParameter

func (c *Configuration) SetParameter(name, value string)

func (*Configuration) SetReadOnlyMode

func (c *Configuration) SetReadOnlyMode()

func (*Configuration) UnSetParameter

func (c *Configuration) UnSetParameter(name string)

type Instruction

type Instruction struct {
	Opcode string
	Args   []string
	// contains filtered or unexported fields
}

func NewInstruction

func NewInstruction(opcode string, args ...string) *Instruction

func (*Instruction) Parse

func (i *Instruction) Parse(content string) *Instruction

func (*Instruction) String

func (i *Instruction) String() string

type Manager

type Manager struct {
	// contains filtered or unexported fields
}
var GlobalSessionManager *Manager

func NewManager

func NewManager() *Manager

func NewObserver

func NewObserver(id string) *Manager

func (*Manager) Add

func (m *Manager) Add(s *Session)

func (*Manager) Clear

func (m *Manager) Clear()

func (*Manager) Delete

func (m *Manager) Delete(id string)

func (*Manager) Get

func (m *Manager) Get(id string) *Session

func (*Manager) Range

func (m *Manager) Range(f func(key string, value *Session))

type Session

type Session struct {
	Id          string
	Protocol    string
	Mode        string
	WebSocket   *websocket.Conn
	GuacdTunnel *Tunnel
	Observer    *Manager

	Uptime   int64
	Hostname string
	// contains filtered or unexported fields
}

func (*Session) Close

func (s *Session) Close()

func (*Session) WriteString

func (s *Session) WriteString(str string) error

type Tunnel

type Tunnel struct {
	ConnectionID string

	IsOpen bool
	// contains filtered or unexported fields
}

func NewTunnel

func NewTunnel(address string, config *Configuration) (*Tunnel, error)

func (*Tunnel) Close

func (t *Tunnel) Close() error

func (*Tunnel) Handshake

func (t *Tunnel) Handshake(config *Configuration) (err error)

func (*Tunnel) Read

func (t *Tunnel) Read() (p []byte, err error)

func (*Tunnel) ReadInstruction

func (t *Tunnel) ReadInstruction() (instruction *Instruction, err error)

func (*Tunnel) WriteAndFlush

func (t *Tunnel) WriteAndFlush(p []byte) (int, error)

func (*Tunnel) WriteInstructionAndFlush

func (t *Tunnel) WriteInstructionAndFlush(instruction *Instruction) error

Jump to

Keyboard shortcuts

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