diff --git a/README.md b/README.md index 5bd75ad5..2be5adc8 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ their products including: [Ganeti Web Manager](http://code.osuosl.org/projects/g * Easy site integration and theming (3 example themes included) * Licensed under the [LGPLv3](http://www.gnu.org/licenses/lgpl.html) - +* Support for tight encoding (contributed by Mercuri.ca) ### Screenshots diff --git a/include/jsunzip.js b/include/jsunzip.js index 1d2957bd..f815218f 100755 --- a/include/jsunzip.js +++ b/include/jsunzip.js @@ -195,6 +195,9 @@ function JSUnzip() { /* * tinflate javascript port by Erik Moller in May 2011. * emoller@opera.com + * + * read_bits() patched by mike@imidio.com to allow + * reading more then 8 bits (needed in some zlib streams) */ "use strict"; diff --git a/include/rfb.js b/include/rfb.js index cb01fe1e..c1c121a2 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -4,6 +4,9 @@ * Licensed under LGPL-3 (see LICENSE.txt) * * See README.md for usage and integration instructions. + * + * TIGHT decoder portion: + * (c) 2012 Michael Tinglof, Joe Balaz, Les Piech (Mercuri.ca) */ /*jslint white: false, browser: true, bitwise: false, plusplus: false */ @@ -275,14 +278,18 @@ function constructor() { function connect() { Util.Debug(">> RFB.connect"); - - var uri = ""; - if (conf.encrypt) { - uri = "wss://"; + var uri; + + if (typeof UsingSocketIO !== "undefined") { + uri = "http://" + rfb_host + ":" + rfb_port + "/" + rfb_path; } else { - uri = "ws://"; + if (conf.encrypt) { + uri = "wss://"; + } else { + uri = "ws://"; + } + uri += rfb_host + ":" + rfb_port + "/" + rfb_path; } - uri += rfb_host + ":" + rfb_port + "/" + rfb_path; Util.Info("connecting to " + uri); ws.open(uri); diff --git a/include/vnc.js b/include/vnc.js index 2b31f458..145e9acb 100644 --- a/include/vnc.js +++ b/include/vnc.js @@ -32,9 +32,11 @@ function get_INCLUDE_URI() { extra += start + "webutil.js" + end; extra += start + "base64.js" + end; extra += start + "websock.js" + end; + // extra += start + "socketio.js" + end; extra += start + "des.js" + end; extra += start + "input.js" + end; extra += start + "display.js" + end; + extra += start + "blowfish.js" + end; extra += start + "rfb.js" + end; extra += start + "jsunzip.js" + end;