rdpproxy

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MPL-2.0, MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SocketTimeout  = 15 * time.Second
	MaxGuacMessage = 8192
)

Variables

This section is empty.

Functions

func GuacdToWS

func GuacdToWS(ws MessageWriter, guacd guacamole.InstructionReader, done chan bool)

func InitStore

func InitStore(state *global.State, policyFunc models.CheckPolicyFunc)

InitStore initialises package state

func WSToGuacd

func WSToGuacd(ws MessageReader, guacd io.Writer, done chan bool)

Types

type GWAdapter

type GWAdapter interface {
	CheckPolicy(params *models.ConnectionParams, policy *models.Policy, adhoc bool) (bool, consts.FailedReason)
	// contains filtered or unexported methods
}
var Store GWAdapter

Store is the package state variable which contains database connections

type GWStore

type GWStore struct {
	*global.State
	// contains filtered or unexported fields
}

func (GWStore) CheckPolicy

func (s GWStore) CheckPolicy(params *models.ConnectionParams, policy *models.Policy, adhoc bool) (bool, consts.FailedReason)

type MessageReader

type MessageReader interface {
	// ReadMessage should return a single complete message to send to guac
	ReadMessage() (int, []byte, error)
}

MessageReader wraps a websocket connection and only permits Reading

type MessageWriter

type MessageWriter interface {
	// WriteMessage writes one or more complete guac commands to the websocket
	WriteMessage(int, []byte) error
}

MessageWriter wraps a websocket connection and only permits Writing

type Proxy

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

func NewProxy

func NewProxy() *Proxy

TODO remove proxy struct

func (*Proxy) ServeWS

func (p *Proxy) ServeWS(params models.ConnectionParams, uc models.UserContext, ws *websocket.Conn)

ServeWS serves rdp connection through guacamole proxy

type Session

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

func NewSession

func NewSession(params *models.ConnectionParams, authlog *logs.AuthLog) (*Session, error)

NewSession Create new guacamole session

func (*Session) Start

func (s *Session) Start(ws *websocket.Conn) (errcode string, err error)

Jump to

Keyboard shortcuts

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