Home

Awesome

node-rdpjs

Remote Desktop Protocol for Node.js

node-rdpjs is a pure implementation of the Microsoft RDP (Remote Desktop Protocol) protocol (client and server side). node-rdpjs support only SSL security layer.

Install

You can install last release node-rdpjs through npm :

npm install node-rdpjs

Or work with dev branch :

git clone https://github.com/citronneur/node-rdpjs.git
cd node-rdpjs
npm install

RDP Client

To create a simple rdp client :

var rdp = require('node-rdpjs');

var client = rdp.createClient({ 
	domain : 'my_domain', 
	userName : 'my_username',
	password : 'my_password',
	enablePerf : true,
	autoLogin : true,
	decompress : false,
	screen : { width : 800, height : 600 },
	locale : 'en',
	logLevel : 'INFO'
}).on('connect', function () {
}).on('close', function() {
}).on('bitmap', function(bitmap) {
}).on('error', function(err) {
}).connect('XXX.XXX.XXX.XXX', 3389);

Client parameters :

Use of decompress parameter impact performance.

Client Events

List of all available events from server

connect

Connect event is received when rdp stack is connected

close

Close event is received when rdp stack is close cleanly

error

Error event is received when a protocol error happened

bitmap

Bitmap event is received for a bitmap refresh order :

Client Inputs

Client inputs are mainly user inputs (mouse and keyboard).

Mouse

client.sendPointerEvent(x, y, button, isPressed);

Keyboard

client.sendKeyEventScancode(code, isPressed);
client.sendKeyEventUnicode(code, isPressed);

Project

Please see mstsc.js project page to watch an example of node-rdpjs.

Roadmap