vnc

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWorker

func RunWorker(port uint16, cursor bool)

RunWorker run vnc worker

Types

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

Link vnc link

func (*Link) Fork

func (link *Link) Fork(confDir string) error

Fork fork worker process

func (*Link) Forward

func (link *Link) Forward()

Forward forward data

func (*Link) GetBytes

func (link *Link) GetBytes() (uint64, uint64)

GetBytes get send and recv bytes

func (*Link) GetID

func (link *Link) GetID() string

GetID get link id

func (*Link) GetPackets

func (link *Link) GetPackets() (uint64, uint64)

GetPackets get send and recv packets

func (*Link) SetCursor

func (link *Link) SetCursor(b bool)

SetCursor set show cursor

func (*Link) SetQuality

func (link *Link) SetQuality(q uint32)

SetQuality transfer quality

type VNC

type VNC struct {
	sync.RWMutex
	Name string
	// contains filtered or unexported fields
}

VNC vnc handler

func New

func New(cfg global.Rule, readTimeout, writeTimeout time.Duration) *VNC

New new vnc

func (*VNC) Clipboard

func (v *VNC) Clipboard(conn *conn.Conn, w http.ResponseWriter, r *http.Request)

Clipboard get/set clipboard

func (*VNC) Ctrl

func (v *VNC) Ctrl(conn *conn.Conn, w http.ResponseWriter, r *http.Request)

Ctrl change vnc rule config

func (v *VNC) GetLinks() []rule.Link

GetLinks get rule links

func (*VNC) GetName

func (v *VNC) GetName() string

GetName get vnc rule name

func (*VNC) GetPort

func (v *VNC) GetPort() uint16

GetPort get listen port

func (*VNC) GetRemote

func (v *VNC) GetRemote() string

GetRemote get remote target name

func (*VNC) GetTarget

func (v *VNC) GetTarget() string

GetTarget get target of this rule

func (*VNC) GetTypeName

func (v *VNC) GetTypeName() string

GetTypeName get vnc rule type name

func (*VNC) Handle

func (v *VNC) Handle(c *conn.Conn)

Handle handle shell

func (*VNC) New

func (v *VNC) New(conn *conn.Conn, w http.ResponseWriter, r *http.Request)

New new vnc

func (v *VNC) NewLink(id, remote string, localConn net.Conn, remoteConn *conn.Conn) rule.Link

NewLink new link

func (*VNC) Render

func (v *VNC) Render(w http.ResponseWriter, r *http.Request)

Render render asset file

func (*VNC) WS

func (v *VNC) WS(conn *conn.Conn, w http.ResponseWriter, r *http.Request)

WS websocket handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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