vadimpronin / guacamole-lite

Node.js library for creating Guacamole-compatible servers. Guacamole is a RDP/VNC/SSH/Telnet client for HTML5 browsers.
Apache License 2.0
250 stars 78 forks source link

SSL support? #31

Closed ankitmhn closed 4 years ago

ankitmhn commented 4 years ago

Does guacamole-lite have SSL support? Can the doc be updated with sample code for it. Thanks!

ankitmhn commented 4 years ago

Got it to work with the following code:

const https = require("https");
const fs = require("fs");
const cors = require("cors");

const app = express();
app.use(cors());

const PORT = 8081;
const server = https.createServer(
  {
    key: fs.readFileSync("./privkey.pem"),
    cert: fs.readFileSync("./cert.pem"),
  },
  app
);

.... 

const guacServer = new GuacamoleLite({ server }, guacdOptions, clientOptions);
server.listen(PORT);