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.
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
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.
List of all available events from server
Connect event is received when rdp stack is connected
Close event is received when rdp stack is close cleanly
Error event is received when a protocol error happened
Bitmap event is received for a bitmap refresh order :
Client inputs are mainly user inputs (mouse and keyboard).
client.sendPointerEvent(x, y, button, isPressed);
client.sendKeyEventScancode(code, isPressed);
client.sendKeyEventUnicode(code, isPressed);
Please see mstsc.js project page to watch an example of node-rdpjs.