grdp

package module
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: GPL-3.0 Imports: 14 Imported by: 1

README

Golang Remote Desktop Protocol

grdp is a pure Golang implementation of the Microsoft RDP (Remote Desktop Protocol) protocol client

Forked from tomatome/grdp

TODO

  • Ubuntu RDP server support.
  • OS independent clipboard implementation.
  • More feature rich RDP client. (Currently, there is only an example that demonstrates the library's functionality).

How to execute example

Prepare environment variables (In your environment. You may also need to set GRDP_DOMAIN)

export GRDP_USER=user
export GRDP_PASSWORD=password
export GRDP_PORT=3389
export GRDP_HOST=host
export GRDP_WINDOW_SIZE=1280x800

Clone and execute example

git clone https://github.com/nakagami/grdp
cd grdp
go run example/gxui.go

This example uses gxui. Since gxui is no longer being updated, I hope to have some kind of cross-platform GUI example.

See also https://github.com/nakagami/grdpsdl2

Take ideas from

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KbdLayout       uint32 = gcc.US
	KeyboardType    uint32 = gcc.KT_IBM_101_102_KEYS
	KeyboardSubType uint32 = 0
)

Functions

This section is empty.

Types

type Bitmap

type Bitmap struct {
	DestLeft     int
	DestTop      int
	DestRight    int
	DestBottom   int
	Width        int
	Height       int
	BitsPerPixel int
	Data         []byte
}

func (*Bitmap) RGBA added in v0.2.3

func (bm *Bitmap) RGBA() *image.RGBA

type RdpClient

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

func NewRdpClient

func NewRdpClient(host string, width, height int) *RdpClient

func (*RdpClient) Close

func (g *RdpClient) Close()

func (*RdpClient) Height added in v0.2.2

func (g *RdpClient) Height() int

func (*RdpClient) KeyDown

func (g *RdpClient) KeyDown(sc int)

func (*RdpClient) KeyUp

func (g *RdpClient) KeyUp(sc int)

func (*RdpClient) Login

func (g *RdpClient) Login(domain string, user string, password string) error

func (*RdpClient) MouseDown

func (g *RdpClient) MouseDown(button int, x, y int)

func (*RdpClient) MouseMove

func (g *RdpClient) MouseMove(x, y int)

func (*RdpClient) MouseUp

func (g *RdpClient) MouseUp(button int, x, y int)

func (*RdpClient) MouseWheel

func (g *RdpClient) MouseWheel(scroll int)

func (*RdpClient) OnBitmap

func (g *RdpClient) OnBitmap(paint func([]Bitmap)) *RdpClient

func (*RdpClient) OnClose

func (g *RdpClient) OnClose(f func()) *RdpClient

func (*RdpClient) OnError

func (g *RdpClient) OnError(f func(e error)) *RdpClient

func (*RdpClient) OnPointerCached added in v0.3.3

func (g *RdpClient) OnPointerCached(f func(uint16)) *RdpClient

func (*RdpClient) OnPointerHide added in v0.3.3

func (g *RdpClient) OnPointerHide(f func()) *RdpClient

func (*RdpClient) OnPointerUpdate added in v0.3.3

func (g *RdpClient) OnPointerUpdate(f func(uint16, uint16, uint16, uint16, uint16, uint16, []byte, []byte)) *RdpClient

func (*RdpClient) OnReady

func (g *RdpClient) OnReady(f func()) *RdpClient

func (*RdpClient) OnSucces

func (g *RdpClient) OnSucces(f func()) *RdpClient

func (*RdpClient) Width added in v0.2.2

func (g *RdpClient) Width() int

Directories

Path Synopsis
gxui.go
gxui.go
rail
rail.go
rail.go
protocol
lic
nla
pdu
sec

Jump to

Keyboard shortcuts

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