rfb

package
v0.0.0-...-831e56b Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn represents a client connection.

type Server

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

Server represents an RFB server. A channel is exposed for handling incoming client connections.

func NewServer

func NewServer(opts *ServerOpts) *Server

NewServer creates a new RFB server with an initial width and height.

func (*Server) AuthIsSupported

func (s *Server) AuthIsSupported(code uint8) bool

AuthIsSupported returns true if the given auth type is supported.

func (*Server) GetAuth

func (s *Server) GetAuth(code uint8) auth.Type

GetAuth returns the auth handler for the given code.

func (*Server) GetAuthByName

func (s *Server) GetAuthByName(name string) auth.Type

GetAuthByName returns the auth interface by the given name.

func (*Server) GetEncoding

func (s *Server) GetEncoding(encs []int32) encodings.Encoding

GetEncoding will iterate the requested encodings and return the best match that can be served. If none of the requested encodings are supported (should never happen as at least RAW is required by RFC) this function returns nil.

func (*Server) GetEventHandlerMap

func (s *Server) GetEventHandlerMap() map[uint8]events.Event

GetEventHandlerMap returns a map that can be used for handling events on an rfb connection.

func (*Server) Serve

func (s *Server) Serve(ln net.Listener) error

Serve binds the RFB server to the given listener and starts serving connections.

func (*Server) ServeWebsockify

func (s *Server) ServeWebsockify(ln net.Listener) error

ServeWebsockify will serve websockify connections on the given host and port.

func (*Server) TightIsEnabled

func (s *Server) TightIsEnabled() bool

TightIsEnabled returns true if TightSecurity is enabled. This is used to determine if capabilities being mutated by the user also need to be updated here.

func (*Server) VNCAuthIsEnabled

func (s *Server) VNCAuthIsEnabled() bool

VNCAuthIsEnabled returns true if VNCAuth is enabled on the server. This is used to signal the need to generate (or, in the future, read in) the server password.

type ServerOpts

type ServerOpts struct {
	DisplayProvider  providers.Provider
	Width, Height    int
	ServerPassword   string
	EnabledEncodings []encodings.Encoding
	EnabledAuthTypes []auth.Type
	EnabledEvents    []events.Event
}

ServerOpts represents options that can be used to configure a new RFB server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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