├── novnc
├── .gitmodules
├── docs
│ ├── VERSION
│ ├── rfbproto-3.3.pdf
│ ├── rfbproto-3.7.pdf
│ ├── rfbproto-3.8.pdf
│ ├── notes
│ ├── flash_policy.txt
│ ├── release.txt
│ ├── LICENSE.BSD-2-Clause
│ ├── LIBRARY.md
│ ├── LICENSE.BSD-3-Clause
│ ├── links
│ ├── EMBEDDING.md
│ ├── rfb_notes
│ └── LICENSE.OFL-1.1
├── vendor
│ ├── browser-es-module-loader
│ │ ├── .npmignore
│ │ ├── rollup.config.js
│ │ ├── README.md
│ │ └── src
│ │ │ └── babel-worker.js
│ └── pako
│ │ ├── README.md
│ │ ├── lib
│ │ ├── zlib
│ │ │ ├── messages.js
│ │ │ ├── adler32.js
│ │ │ ├── crc32.js
│ │ │ ├── zstream.js
│ │ │ ├── gzheader.js
│ │ │ └── constants.js
│ │ └── utils
│ │ │ └── common.js
│ │ └── LICENSE
├── app
│ ├── sounds
│ │ ├── bell.mp3
│ │ ├── bell.oga
│ │ └── CREDITS
│ ├── styles
│ │ ├── Orbitron700.ttf
│ │ ├── Orbitron700.woff
│ │ └── lite.css
│ ├── images
│ │ ├── icons
│ │ │ ├── novnc-16x16.png
│ │ │ ├── novnc-24x24.png
│ │ │ ├── novnc-32x32.png
│ │ │ ├── novnc-48x48.png
│ │ │ ├── novnc-60x60.png
│ │ │ ├── novnc-64x64.png
│ │ │ ├── novnc-72x72.png
│ │ │ ├── novnc-76x76.png
│ │ │ ├── novnc-96x96.png
│ │ │ ├── novnc-120x120.png
│ │ │ ├── novnc-144x144.png
│ │ │ ├── novnc-152x152.png
│ │ │ ├── novnc-192x192.png
│ │ │ └── Makefile
│ │ ├── handle.svg
│ │ ├── tab.svg
│ │ ├── expander.svg
│ │ ├── settings.svg
│ │ ├── error.svg
│ │ ├── fullscreen.svg
│ │ ├── info.svg
│ │ ├── ctrlaltdel.svg
│ │ ├── connect.svg
│ │ ├── alt.svg
│ │ ├── warning.svg
│ │ ├── power.svg
│ │ ├── clipboard.svg
│ │ ├── ctrl.svg
│ │ ├── toggleextrakeys.svg
│ │ ├── esc.svg
│ │ ├── drag.svg
│ │ └── disconnect.svg
│ ├── error-handler.js
│ └── locale
│ │ ├── zh.json
│ │ ├── sv.json
│ │ ├── es.json
│ │ ├── nl.json
│ │ ├── tr.json
│ │ ├── pl.json
│ │ ├── de.json
│ │ └── el.json
├── .gitignore
├── core
│ ├── util
│ │ ├── strings.js
│ │ ├── eventtarget.js
│ │ ├── logging.js
│ │ ├── polyfill.js
│ │ ├── browser.js
│ │ └── events.js
│ ├── inflator.js
│ ├── encodings.js
│ ├── input
│ │ ├── vkeys.js
│ │ └── fixedkeys.js
│ └── base64.js
├── tests
│ ├── karma-test-main.js
│ ├── vnc_playback.html
│ ├── test.base64.js
│ ├── fake.websocket.js
│ ├── test.util.js
│ ├── test.localization.js
│ └── assertions.js
├── utils
│ ├── b64-to-binary.pl
│ ├── README.md
│ ├── u2x11
│ ├── img2js.py
│ ├── use_require_helpers.js
│ ├── genkeysymdef.js
│ └── launch.sh
├── .npmignore
├── po
│ ├── Makefile
│ ├── po2js
│ └── xgettext-html
├── .travis.yml
├── package.json
├── LICENSE.txt
└── karma.conf.js
├── .dockerignore
├── supervisord.conf
├── blueiris.sh
├── README.md
└── Dockerfile
/novnc/.gitmodules:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | data/
2 |
3 |
--------------------------------------------------------------------------------
/novnc/docs/VERSION:
--------------------------------------------------------------------------------
1 | 1.0.0-testing.2
2 |
--------------------------------------------------------------------------------
/novnc/vendor/browser-es-module-loader/.npmignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/novnc/app/sounds/bell.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/sounds/bell.mp3
--------------------------------------------------------------------------------
/novnc/app/sounds/bell.oga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/sounds/bell.oga
--------------------------------------------------------------------------------
/novnc/docs/rfbproto-3.3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/docs/rfbproto-3.3.pdf
--------------------------------------------------------------------------------
/novnc/docs/rfbproto-3.7.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/docs/rfbproto-3.7.pdf
--------------------------------------------------------------------------------
/novnc/docs/rfbproto-3.8.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/docs/rfbproto-3.8.pdf
--------------------------------------------------------------------------------
/novnc/app/styles/Orbitron700.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/styles/Orbitron700.ttf
--------------------------------------------------------------------------------
/novnc/app/styles/Orbitron700.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/styles/Orbitron700.woff
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-16x16.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-24x24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-24x24.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-32x32.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-48x48.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-60x60.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-64x64.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-72x72.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-76x76.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-96x96.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-120x120.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-144x144.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-152x152.png
--------------------------------------------------------------------------------
/novnc/app/images/icons/novnc-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leonowski/docker-blueiris/HEAD/novnc/app/images/icons/novnc-192x192.png
--------------------------------------------------------------------------------
/novnc/docs/notes:
--------------------------------------------------------------------------------
1 | Rebuilding inflator.js
2 |
3 | - Download pako from npm
4 | - Install browserify using npm
5 | - browserify core/inflator.mod.js -o core/inflator.js -s Inflator
6 |
--------------------------------------------------------------------------------
/novnc/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.o
3 | tests/data_*.js
4 | utils/rebind.so
5 | utils/websockify
6 | /node_modules
7 | /build
8 | /lib
9 | recordings
10 | *.swp
11 | *~
12 | noVNC-*.tgz
13 |
--------------------------------------------------------------------------------
/novnc/app/sounds/CREDITS:
--------------------------------------------------------------------------------
1 | bell
2 | Copyright: Dr. Richard Boulanger et al
3 | URL: http://www.archive.org/details/Berklee44v12
4 | License: CC-BY Attribution 3.0 Unported
5 |
--------------------------------------------------------------------------------
/novnc/docs/flash_policy.txt:
--------------------------------------------------------------------------------
1 | Manual setup:
2 |
3 | DATA="echo \'\'"
4 | /usr/bin/socat -T 1 TCP-L:843,reuseaddr,fork,crlf SYSTEM:"$DATA"
5 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/README.md:
--------------------------------------------------------------------------------
1 | This is an ES6-modules-compatible version of
2 | https://github.com/nodeca/pako, based on pako version 1.0.3.
3 |
4 | It's more-or-less a direct translation of the original, with unused parts
5 | removed, and the dynamic support for non-typed arrays removed (since ES6
6 | modules don't work well with dynamic exports).
7 |
--------------------------------------------------------------------------------
/novnc/core/util/strings.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright (C) 2012 Joel Martin
4 | * Licensed under MPL 2.0 (see LICENSE.txt)
5 | *
6 | * See README.md for usage and integration instructions.
7 | */
8 |
9 | /*
10 | * Decode from UTF-8
11 | */
12 | export function decodeUTF8 (utf8string) {
13 | "use strict";
14 | return decodeURIComponent(escape(utf8string));
15 | };
16 |
--------------------------------------------------------------------------------
/novnc/vendor/browser-es-module-loader/rollup.config.js:
--------------------------------------------------------------------------------
1 | import nodeResolve from 'rollup-plugin-node-resolve';
2 |
3 | export default {
4 | entry: 'src/browser-es-module-loader.js',
5 | dest: 'dist/browser-es-module-loader.js',
6 | format: 'umd',
7 | moduleName: 'BrowserESModuleLoader',
8 | sourceMap: true,
9 |
10 | plugins: [
11 | nodeResolve(),
12 | ],
13 |
14 | // skip rollup warnings (specifically the eval warning)
15 | onwarn: function() {}
16 | };
17 |
--------------------------------------------------------------------------------
/novnc/tests/karma-test-main.js:
--------------------------------------------------------------------------------
1 | var TEST_REGEXP = /test\..*\.js/;
2 | var allTestFiles = [];
3 | var extraFiles = ['/base/tests/assertions.js'];
4 |
5 | Object.keys(window.__karma__.files).forEach(function (file) {
6 | if (TEST_REGEXP.test(file)) {
7 | // TODO: normalize?
8 | allTestFiles.push(file);
9 | }
10 | });
11 |
12 | require.config({
13 | baseUrl: '/base',
14 | deps: allTestFiles.concat(extraFiles),
15 | callback: window.__karma__.start,
16 | });
17 |
--------------------------------------------------------------------------------
/novnc/utils/b64-to-binary.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | use MIME::Base64;
3 |
4 | for (<>) {
5 | unless (/^'([{}])(\d+)\1(.+?)',$/) {
6 | print;
7 | next;
8 | }
9 |
10 | my ($dir, $amt, $b64) = ($1, $2, $3);
11 |
12 | my $decoded = MIME::Base64::decode($b64) or die "Could not base64-decode line `$_`";
13 |
14 | my $decoded_escaped = join "", map { "\\x$_" } unpack("(H2)*", $decoded);
15 |
16 | print "'${dir}${amt}${dir}${decoded_escaped}',\n";
17 | }
18 |
--------------------------------------------------------------------------------
/novnc/vendor/browser-es-module-loader/README.md:
--------------------------------------------------------------------------------
1 | Custom Browser ES Module Loader
2 | ===============================
3 |
4 | This is a module loader using babel and the ES Module Loader polyfill.
5 | It's based heavily on
6 | https://github.com/ModuleLoader/browser-es-module-loader, but uses
7 | WebWorkers to compile the modules in the background.
8 |
9 | To generate, run `rollup -c` in this directory, and then run `browserify
10 | src/babel-worker.js > dist/babel-worker.js`.
11 |
12 | LICENSE
13 | -------
14 |
15 | MIT
16 |
--------------------------------------------------------------------------------
/supervisord.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | nodaemon=true
3 |
4 | [program:X11]
5 | command=/usr/bin/Xvfb :0 -screen 0 800x600x24
6 | autorestart=true
7 |
8 | [program:x11vnc]
9 | command=/usr/bin/x11vnc
10 | autorestart=true
11 |
12 | [program:x11vnc-loc]
13 | command=/usr/bin/x11vnc -localhost
14 | autorestart=true
15 |
16 | [program:novnc]
17 | command=/root/novnc/utils/launch.sh --vnc localhost:5901 --listen 8080
18 | autorestart=true
19 |
20 | [program:progman]
21 | command=bash "/root/blueiris.sh"
22 | autorestart=true
23 |
--------------------------------------------------------------------------------
/blueiris.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | BLUEIRIS_EXE="/root/prefix32/drive_c/Program Files/Blue Iris 5/BlueIris.exe"
4 | PREFIX_DIR="/root/prefix32"
5 | INSTALL_EXE="/root/blueiris.exe"
6 |
7 | if [ ! -d "$PREFIX_DIR/drive_c" ]; then
8 | mv /root/prefix32_original/* /root/prefix32
9 | fi
10 |
11 | chown -R root:root /root/prefix32
12 |
13 | if [ ! -e "$BLUEIRIS_EXE" ] ; then
14 | if [ ! -e "$INSTALL_EXE" ] ; then
15 | wget http://blueirissoftware.com/blueiris.exe
16 | fi
17 | wine blueiris.exe
18 | rm blueiris.exe
19 | fi
20 |
21 | wine "$BLUEIRIS_EXE"
22 |
--------------------------------------------------------------------------------
/novnc/utils/README.md:
--------------------------------------------------------------------------------
1 | ## WebSockets Proxy/Bridge
2 |
3 | Websockify has been forked out into its own project. `launch.sh` wil
4 | automatically download it here if it is not already present and not
5 | installed as system-wide.
6 |
7 | For more detailed description and usage information please refer to
8 | the [websockify README](https://github.com/novnc/websockify/blob/master/README.md).
9 |
10 | The other versions of websockify (C, Node.js) and the associated test
11 | programs have been moved to
12 | [websockify](https://github.com/novnc/websockify). Websockify was
13 | formerly named wsproxy.
14 |
15 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/lib/zlib/messages.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 2: 'need dictionary', /* Z_NEED_DICT 2 */
3 | 1: 'stream end', /* Z_STREAM_END 1 */
4 | 0: '', /* Z_OK 0 */
5 | '-1': 'file error', /* Z_ERRNO (-1) */
6 | '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
7 | '-3': 'data error', /* Z_DATA_ERROR (-3) */
8 | '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
9 | '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
10 | '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
11 | };
12 |
--------------------------------------------------------------------------------
/novnc/.npmignore:
--------------------------------------------------------------------------------
1 | # infra JS
2 | /build/
3 | /node_modules/
4 | /tests/
5 | /utils/
6 | /recordings/
7 | /vendor/sinon.js
8 |
9 | # noVNC application files
10 | /app
11 | /vendor/browser-es-module-loader
12 | /vendor/promise.js
13 | /vnc.html
14 | /vnc_lite.html
15 |
16 | # raw translation files
17 | /po
18 |
19 | # config files
20 | /.travis.yml
21 | /karma.conf.js
22 |
23 | # various other files
24 | /.gitmodules
25 | .*
26 | *~
27 | *.swp
28 | *.swo
29 |
30 | # documentation (except licenses)
31 | /docs/notes
32 | /docs/links
33 | /docs/release.txt
34 | /docs/rfb_notes
35 | /docs/*.pdf
36 | /docs/flash_policy.txt
37 | /CONTRIBUTING.md
38 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/lib/zlib/adler32.js:
--------------------------------------------------------------------------------
1 | // Note: adler32 takes 12% for level 0 and 2% for level 6.
2 | // It doesn't worth to make additional optimizationa as in original.
3 | // Small size is preferable.
4 |
5 | export default function adler32(adler, buf, len, pos) {
6 | var s1 = (adler & 0xffff) |0,
7 | s2 = ((adler >>> 16) & 0xffff) |0,
8 | n = 0;
9 |
10 | while (len !== 0) {
11 | // Set limit ~ twice less than 5552, to keep
12 | // s2 in 31-bits, because we force signed ints.
13 | // in other case %= will fail.
14 | n = len > 2000 ? 2000 : len;
15 | len -= n;
16 |
17 | do {
18 | s1 = (s1 + buf[pos++]) |0;
19 | s2 = (s2 + s1) |0;
20 | } while (--n);
21 |
22 | s1 %= 65521;
23 | s2 %= 65521;
24 | }
25 |
26 | return (s1 | (s2 << 16)) |0;
27 | }
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## docker-blueiris
2 |
3 | This is a Container for BlueIris based on [solarkennedy/wine-x11-novnc-docker
4 | ](https://github.com/solarkennedy/wine-x11-novnc-docker)
5 |
6 | This container runs:
7 |
8 | * Xvfb - X11 in a virtual framebuffer
9 | * x11vnc - A VNC server that scrapes the above X11 server
10 | * [noNVC](https://kanaka.github.io/noVNC/) - A HTML5 canvas vnc viewer
11 | * Fluxbox - a small window manager
12 | * WINE - to run Windows executables on linux
13 | * blueiris.exe - official Windows BlueIris
14 |
15 | ```
16 | docker run -d \
17 | --name="BlueIris" \
18 | -p novnc-port:8080 \
19 | -p vnc-port:5900 \
20 | -p blueiris-webserver-port:81 \
21 | -v /path/to/data:/root/prefix32:rw \
22 | jshridha/blueiris
23 | ```
24 | # Known Issues:
25 | * Saving and restoring settings backup via the BlueIris interface does not work!
26 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/lib/zlib/crc32.js:
--------------------------------------------------------------------------------
1 | // Note: we can't get significant speed boost here.
2 | // So write code to minimize size - no pregenerated tables
3 | // and array tools dependencies.
4 |
5 |
6 | // Use ordinary array, since untyped makes no boost here
7 | export default function makeTable() {
8 | var c, table = [];
9 |
10 | for (var n = 0; n < 256; n++) {
11 | c = n;
12 | for (var k = 0; k < 8; k++) {
13 | c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
14 | }
15 | table[n] = c;
16 | }
17 |
18 | return table;
19 | }
20 |
21 | // Create table on load. Just 255 signed longs. Not a problem.
22 | var crcTable = makeTable();
23 |
24 |
25 | function crc32(crc, buf, len, pos) {
26 | var t = crcTable,
27 | end = pos + len;
28 |
29 | crc ^= -1;
30 |
31 | for (var i = pos; i < end; i++) {
32 | crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
33 | }
34 |
35 | return (crc ^ (-1)); // >>> 0;
36 | }
37 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/lib/zlib/zstream.js:
--------------------------------------------------------------------------------
1 | export default function ZStream() {
2 | /* next input byte */
3 | this.input = null; // JS specific, because we have no pointers
4 | this.next_in = 0;
5 | /* number of bytes available at input */
6 | this.avail_in = 0;
7 | /* total number of input bytes read so far */
8 | this.total_in = 0;
9 | /* next output byte should be put there */
10 | this.output = null; // JS specific, because we have no pointers
11 | this.next_out = 0;
12 | /* remaining free space at output */
13 | this.avail_out = 0;
14 | /* total number of bytes output so far */
15 | this.total_out = 0;
16 | /* last error message, NULL if no error */
17 | this.msg = ''/*Z_NULL*/;
18 | /* not visible by applications */
19 | this.state = null;
20 | /* best guess about the data type: binary or text */
21 | this.data_type = 2/*Z_UNKNOWN*/;
22 | /* adler32 value of the uncompressed data */
23 | this.adler = 0;
24 | }
25 |
--------------------------------------------------------------------------------
/novnc/utils/u2x11:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Convert "U+..." commented entries in /usr/include/X11/keysymdef.h
4 | # into JavaScript for use by noVNC. Note this is likely to produce
5 | # a few duplicate properties with clashing values, that will need
6 | # resolving manually.
7 | #
8 | # Colin Dean
9 | #
10 |
11 | regex="^#define[ \t]+XK_[A-Za-z0-9_]+[ \t]+0x([0-9a-fA-F]+)[ \t]+\/\*[ \t]+U\+([0-9a-fA-F]+)[ \t]+[^*]+.[ \t]+\*\/[ \t]*$"
12 | echo "unicodeTable = {"
13 | while read line; do
14 | if echo "${line}" | egrep -qs "${regex}"; then
15 |
16 | x11=$(echo "${line}" | sed -r "s/${regex}/\1/")
17 | vnc=$(echo "${line}" | sed -r "s/${regex}/\2/")
18 |
19 | if echo "${vnc}" | egrep -qs "^00[2-9A-F][0-9A-F]$"; then
20 | : # skip ISO Latin-1 (U+0020 to U+00FF) as 1-to-1 mapping
21 | else
22 | # note 1-to-1 is possible (e.g. for Euro symbol, U+20AC)
23 | echo " 0x${vnc} : 0x${x11},"
24 | fi
25 | fi
26 | done < /usr/include/X11/keysymdef.h | uniq
27 | echo "};"
28 |
29 |
--------------------------------------------------------------------------------
/novnc/po/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | .PHONY: update-po update-js update-pot
3 |
4 | LINGUAS := de el es nl pl sv tr zh
5 |
6 | VERSION := $(shell grep '"version"' ../package.json | cut -d '"' -f 4)
7 |
8 | POFILES := $(addsuffix .po,$(LINGUAS))
9 | JSONFILES := $(addprefix ../app/locale/,$(addsuffix .json,$(LINGUAS)))
10 |
11 | update-po: $(POFILES)
12 | update-js: $(JSONFILES)
13 |
14 | %.po: noVNC.pot
15 | msgmerge --update --lang=$* $@ $<
16 | ../app/locale/%.json: %.po
17 | ./po2js $< $@
18 |
19 | update-pot:
20 | xgettext --output=noVNC.js.pot \
21 | --copyright-holder="Various Authors" \
22 | --package-name="noVNC" \
23 | --package-version="$(VERSION)" \
24 | --msgid-bugs-address="novnc@googlegroups.com" \
25 | --add-comments=TRANSLATORS: \
26 | --from-code=UTF-8 \
27 | --sort-by-file \
28 | ../app/*.js \
29 | ../core/*.js \
30 | ../core/input/*.js
31 | ./xgettext-html --output=noVNC.html.pot \
32 | ../vnc.html
33 | msgcat --output-file=noVNC.pot \
34 | --sort-by-file noVNC.js.pot noVNC.html.pot
35 | rm -f noVNC.js.pot noVNC.html.pot
36 |
--------------------------------------------------------------------------------
/novnc/app/images/icons/Makefile:
--------------------------------------------------------------------------------
1 | ICONS := \
2 | novnc-16x16.png \
3 | novnc-24x24.png \
4 | novnc-32x32.png \
5 | novnc-48x48.png \
6 | novnc-64x64.png
7 |
8 | ANDROID_LAUNCHER := \
9 | novnc-48x48.png \
10 | novnc-72x72.png \
11 | novnc-96x96.png \
12 | novnc-144x144.png \
13 | novnc-192x192.png
14 |
15 | IPHONE_LAUNCHER := \
16 | novnc-60x60.png \
17 | novnc-120x120.png
18 |
19 | IPAD_LAUNCHER := \
20 | novnc-76x76.png \
21 | novnc-152x152.png
22 |
23 | ALL_ICONS := $(ICONS) $(ANDROID_LAUNCHER) $(IPHONE_LAUNCHER) $(IPAD_LAUNCHER)
24 |
25 | all: $(ALL_ICONS)
26 |
27 | novnc-16x16.png: novnc-icon-sm.svg
28 | convert -density 90 \
29 | -background transparent "$<" "$@"
30 | novnc-24x24.png: novnc-icon-sm.svg
31 | convert -density 135 \
32 | -background transparent "$<" "$@"
33 | novnc-32x32.png: novnc-icon-sm.svg
34 | convert -density 180 \
35 | -background transparent "$<" "$@"
36 |
37 | novnc-%.png: novnc-icon.svg
38 | convert -density $$[`echo $* | cut -d x -f 1` * 90 / 48] \
39 | -background transparent "$<" "$@"
40 |
41 | clean:
42 | rm -f *.png
43 |
--------------------------------------------------------------------------------
/novnc/utils/img2js.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | #
4 | # Convert image to Javascript compatible base64 Data URI
5 | # Copyright 2011 Joel Martin
6 | # Licensed under MPL 2.0 (see docs/LICENSE.MPL-2.0)
7 | #
8 |
9 | import sys, base64
10 |
11 | try:
12 | from PIL import Image
13 | except:
14 | print "python PIL module required (python-imaging package)"
15 | sys.exit(1)
16 |
17 |
18 | if len(sys.argv) < 3:
19 | print "Usage: %s IMAGE JS_VARIABLE" % sys.argv[0]
20 | sys.exit(1)
21 |
22 | fname = sys.argv[1]
23 | var = sys.argv[2]
24 |
25 | ext = fname.lower().split('.')[-1]
26 | if ext == "png": mime = "image/png"
27 | elif ext in ["jpg", "jpeg"]: mime = "image/jpeg"
28 | elif ext == "gif": mime = "image/gif"
29 | else:
30 | print "Only PNG, JPEG and GIF images are supported"
31 | sys.exit(1)
32 | uri = "data:%s;base64," % mime
33 |
34 | im = Image.open(fname)
35 | w, h = im.size
36 |
37 | raw = open(fname).read()
38 |
39 | print '%s = {"width": %s, "height": %s, "data": "%s%s"};' % (
40 | var, w, h, uri, base64.b64encode(raw))
41 |
--------------------------------------------------------------------------------
/novnc/vendor/browser-es-module-loader/src/babel-worker.js:
--------------------------------------------------------------------------------
1 | /*import { transform as babelTransform } from 'babel-core';
2 | import babelTransformDynamicImport from 'babel-plugin-syntax-dynamic-import';
3 | import babelTransformES2015ModulesSystemJS from 'babel-plugin-transform-es2015-modules-systemjs';*/
4 |
5 | // sadly, due to how rollup works, we can't use es6 imports here
6 | var babelTransform = require('babel-core').transform;
7 | var babelTransformDynamicImport = require('babel-plugin-syntax-dynamic-import');
8 | var babelTransformES2015ModulesSystemJS = require('babel-plugin-transform-es2015-modules-systemjs');
9 |
10 | self.onmessage = function (evt) {
11 | // transform source with Babel
12 | var output = babelTransform(evt.data.source, {
13 | compact: false,
14 | filename: evt.data.key + '!transpiled',
15 | sourceFileName: evt.data.key,
16 | moduleIds: false,
17 | sourceMaps: 'inline',
18 | babelrc: false,
19 | plugins: [babelTransformDynamicImport, babelTransformES2015ModulesSystemJS],
20 | });
21 |
22 | self.postMessage({key: evt.data.key, code: output.code, source: evt.data.source});
23 | };
24 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (C) 2014-2016 by Vitaly Puzrin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/novnc/core/util/eventtarget.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright 2017 Pierre Ossman for Cendio AB
4 | * Licensed under MPL 2.0 (see LICENSE.txt)
5 | *
6 | * See README.md for usage and integration instructions.
7 | */
8 |
9 | var EventTargetMixin = {
10 | _listeners: null,
11 |
12 | addEventListener: function(type, callback) {
13 | if (!this._listeners) {
14 | this._listeners = new Map();
15 | }
16 | if (!this._listeners.has(type)) {
17 | this._listeners.set(type, new Set());
18 | }
19 | this._listeners.get(type).add(callback);
20 | },
21 |
22 | removeEventListener: function(type, callback) {
23 | if (!this._listeners || !this._listeners.has(type)) {
24 | return;
25 | }
26 | this._listeners.get(type).delete(callback);
27 | },
28 |
29 | dispatchEvent: function(event) {
30 | if (!this._listeners || !this._listeners.has(event.type)) {
31 | return true;
32 | }
33 | this._listeners.get(event.type).forEach(function (callback) {
34 | callback.call(this, event);
35 | }, this);
36 | return !event.defaultPrevented;
37 | },
38 | };
39 |
40 | export default EventTargetMixin;
41 |
--------------------------------------------------------------------------------
/novnc/vendor/pako/lib/utils/common.js:
--------------------------------------------------------------------------------
1 | // reduce buffer size, avoiding mem copy
2 | export function shrinkBuf (buf, size) {
3 | if (buf.length === size) { return buf; }
4 | if (buf.subarray) { return buf.subarray(0, size); }
5 | buf.length = size;
6 | return buf;
7 | };
8 |
9 |
10 | export function arraySet (dest, src, src_offs, len, dest_offs) {
11 | if (src.subarray && dest.subarray) {
12 | dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
13 | return;
14 | }
15 | // Fallback to ordinary array
16 | for (var i = 0; i < len; i++) {
17 | dest[dest_offs + i] = src[src_offs + i];
18 | }
19 | }
20 |
21 | // Join array of chunks to single array.
22 | export function flattenChunks (chunks) {
23 | var i, l, len, pos, chunk, result;
24 |
25 | // calculate data length
26 | len = 0;
27 | for (i = 0, l = chunks.length; i < l; i++) {
28 | len += chunks[i].length;
29 | }
30 |
31 | // join chunks
32 | result = new Uint8Array(len);
33 | pos = 0;
34 | for (i = 0, l = chunks.length; i < l; i++) {
35 | chunk = chunks[i];
36 | result.set(chunk, pos);
37 | pos += chunk.length;
38 | }
39 |
40 | return result;
41 | }
42 |
43 | export var Buf8 = Uint8Array;
44 | export var Buf16 = Uint16Array;
45 | export var Buf32 = Int32Array;
46 |
--------------------------------------------------------------------------------
/novnc/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: false
3 | cache:
4 | directories:
5 | - node_modules
6 | node_js:
7 | - '6.1'
8 | env:
9 | matrix:
10 | - TEST_BROWSER_NAME=chrome TEST_BROWSER_OS='Windows 10,Linux,OS X 10.11'
11 | - TEST_BROWSER_NAME=firefox TEST_BROWSER_OS='Windows 10,Linux,OS X 10.11'
12 | - TEST_BROWSER_NAME='internet explorer' TEST_BROWSER_OS='Windows 10'
13 | - TEST_BROWSER_NAME=safari TEST_BROWSER_OS='OS X 10.11'
14 | before_script: npm install -g karma-cli
15 | addons:
16 | sauce_connect:
17 | username: "directxman12"
18 | jwt:
19 | secure: "d3ekMYslpn6R4f0ajtRMt9SUFmNGDiItHpqaXC5T4KI0KMEsxgvEOfJot5PiFFJWg1DSpJZH6oaW2UxGZ3duJLZrXIEd/JePY8a6NtT35BNgiDPgcp+eu2Bu3rhrSNg7/HEsD1ma+JeUTnv18Ai5oMFfCCQJx2J6osIxyl/ZVxA="
20 | stages:
21 | - test
22 | - name: deploy
23 | if: tag is PRESENT
24 | jobs:
25 | include:
26 | - stage: deploy
27 | script: skip
28 | before_script: skip
29 | deploy:
30 | provider: npm
31 | email: directxman12+npm@gmail.com
32 | api_key:
33 | secure: cIidkFmvkdmdwWsqBpxyPUCzBqgK8LhPiNxTrIfhwbUunMsJep9MiiBJtv8poVYG2Y4yfiZmqGn4nfetUdc/LDctd73j+/EM4Z/NUDexVAhJ+9/qCogvpJsSQ96VQo7yBceW4E1fBM3WCU0kcGToYIVSSrwvvRDtJfeYJf2Qqw0=
34 | on:
35 | tags: true
36 | repo: novnc/noVNC
37 |
38 |
39 |
--------------------------------------------------------------------------------
/novnc/docs/release.txt:
--------------------------------------------------------------------------------
1 | - Decide a new version number X.Y.Z (follow SemVer)
2 | - Update version in package.json
3 | - Update version in docs/VERSION
4 | - Commit the change with a commit like "Release X.Y.Z"
5 | - Add a new release on GitHub called "vX.Y.Z", and populate it with
6 | release notes of the following form (where A.B.C is the last release):
7 |
8 | Major Changes Since A.B.C
9 | =========================
10 |
11 | *Insert warnings here about incompatibilities*
12 |
13 | *Thanks to all the contributors who filed bugs, added features, and fixed bugs
14 | during this release :tada:*
15 |
16 | App-visible Changes
17 | -------------------
18 |
19 | - *feature* a feature which improves the app usage (#PRNUM)
20 | - *bugfix* a bug fix which fixes the app usage (#PRNUM)
21 | - *refactor* a refactor which changes the app usage (#PRNUM)
22 |
23 | Library-visible Changes
24 | -----------------------
25 |
26 | - *feature* a feature which improves the noVNC APIs (#PRNUM)
27 | - *bugfix* a bug fix which fixes the noVNC APIs (#PRNUM)
28 | - *refactor* a refactor which changes the noVNC APIs (#PRNUM)
29 |
30 | App-internals Changes
31 | ---------------------
32 |
33 | - *bugfix* a bug fix with affects the internals of noVNC only (#PRNUM)
34 | - *refactor* a refactor which affects the internals of noVNC only (#PRNUM)
35 |
--------------------------------------------------------------------------------
/novnc/core/inflator.js:
--------------------------------------------------------------------------------
1 | import { inflateInit, inflate, inflateReset } from "../vendor/pako/lib/zlib/inflate.js";
2 | import ZStream from "../vendor/pako/lib/zlib/zstream.js";
3 |
4 | Inflate.prototype = {
5 | inflate: function (data, flush, expected) {
6 | this.strm.input = data;
7 | this.strm.avail_in = this.strm.input.length;
8 | this.strm.next_in = 0;
9 | this.strm.next_out = 0;
10 |
11 | // resize our output buffer if it's too small
12 | // (we could just use multiple chunks, but that would cause an extra
13 | // allocation each time to flatten the chunks)
14 | if (expected > this.chunkSize) {
15 | this.chunkSize = expected;
16 | this.strm.output = new Uint8Array(this.chunkSize);
17 | }
18 |
19 | this.strm.avail_out = this.chunkSize;
20 |
21 | inflate(this.strm, flush);
22 |
23 | return new Uint8Array(this.strm.output.buffer, 0, this.strm.next_out);
24 | },
25 |
26 | reset: function () {
27 | inflateReset(this.strm);
28 | }
29 | };
30 |
31 | export default function Inflate() {
32 | this.strm = new ZStream();
33 | this.chunkSize = 1024 * 10 * 10;
34 | this.strm.output = new Uint8Array(this.chunkSize);
35 | this.windowBits = 5;
36 |
37 | inflateInit(this.strm, this.windowBits);
38 | };
39 |
--------------------------------------------------------------------------------
/novnc/tests/vnc_playback.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | VNC Playback
5 |
6 |
7 |
8 |
9 |
10 | Iterations:
11 | Perftest:
12 | Realtime:
13 |
14 |
15 |
16 |
17 |
18 | Results:
19 |
20 |
21 |
22 |
23 |
30 |
31 |
32 |
33 |
37 |
38 | `;
13 | },
14 | noCopyOverride: () => {},
15 | },
16 | 'commonjs': {
17 | optionsOverride: (opts) => {
18 | // CommonJS supports properly shifting the default export to work as normal
19 | opts.plugins.unshift("add-module-exports");
20 | },
21 | appWriter: (base_out_path, out_path) => {
22 | var browserify = require('browserify');
23 | var b = browserify(path.join(base_out_path, 'app/ui.js'), {});
24 | b.bundle().pipe(fs.createWriteStream(out_path));
25 | return ``;
26 | },
27 | noCopyOverride: () => {},
28 | },
29 | 'systemjs': {
30 | appWriter: (base_out_path, out_path) => {
31 | fs.writeFile(out_path, 'SystemJS.import("./app/ui.js");', (err) => { if (err) throw err; });
32 | console.log(`Please place SystemJS in ${path.join(base_out_path, 'system-production.js')}`);
33 | return `
34 | \n`;
35 | },
36 | noCopyOverride: (paths, no_copy_files) => {
37 | no_copy_files.delete(path.join(paths.vendor, 'promise.js'));
38 | },
39 | },
40 | 'umd': {
41 | optionsOverride: (opts) => {
42 | // umd supports properly shifting the default export to work as normal
43 | opts.plugins.unshift("add-module-exports");
44 | },
45 | },
46 | }
47 |
--------------------------------------------------------------------------------
/novnc/app/error-handler.js:
--------------------------------------------------------------------------------
1 | // NB: this should *not* be included as a module until we have
2 | // native support in the browsers, so that our error handler
3 | // can catch script-loading errors.
4 |
5 |
6 | (function(){
7 | "use strict";
8 |
9 | // Fallback for all uncought errors
10 | function handleError (event, err) {
11 | try {
12 | var msg = document.getElementById('noVNC_fallback_errormsg');
13 |
14 | // Only show the initial error
15 | if (msg.hasChildNodes()) {
16 | return false;
17 | }
18 |
19 | var div = document.createElement("div");
20 | div.classList.add('noVNC_message');
21 | div.appendChild(document.createTextNode(event.message));
22 | msg.appendChild(div);
23 |
24 | if (event.filename) {
25 | div = document.createElement("div");
26 | div.className = 'noVNC_location';
27 | var text = event.filename;
28 | if (event.lineno !== undefined) {
29 | text += ":" + event.lineno;
30 | if (event.colno !== undefined) {
31 | text += ":" + event.colno;
32 | }
33 | }
34 | div.appendChild(document.createTextNode(text));
35 | msg.appendChild(div);
36 | }
37 |
38 | if (err && (err.stack !== undefined)) {
39 | div = document.createElement("div");
40 | div.className = 'noVNC_stack';
41 | div.appendChild(document.createTextNode(err.stack));
42 | msg.appendChild(div);
43 | }
44 |
45 | document.getElementById('noVNC_fallback_error')
46 | .classList.add("noVNC_open");
47 | } catch (exc) {
48 | document.write("noVNC encountered an error.");
49 | }
50 | // Don't return true since this would prevent the error
51 | // from being printed to the browser console.
52 | return false;
53 | }
54 | window.addEventListener('error', function (evt) { handleError(evt, evt.error); });
55 | window.addEventListener('unhandledrejection', function (evt) { handleError(evt.reason, evt.reason); });
56 | })();
57 |
--------------------------------------------------------------------------------
/novnc/app/locale/zh.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "連線中...",
3 | "Disconnecting...": "正在中斷連線...",
4 | "Reconnecting...": "重新連線中...",
5 | "Internal error": "內部錯誤",
6 | "Must set host": "請提供主機資訊",
7 | "Connected (encrypted) to ": "已加密連線到",
8 | "Connected (unencrypted) to ": "未加密連線到",
9 | "Something went wrong, connection is closed": "發生錯誤,連線已關閉",
10 | "Failed to connect to server": "無法連線到伺服器",
11 | "Disconnected": "連線已中斷",
12 | "New connection has been rejected with reason: ": "連線被拒絕,原因:",
13 | "New connection has been rejected": "連線被拒絕",
14 | "Password is required": "請提供密碼",
15 | "noVNC encountered an error:": "noVNC 遇到一個錯誤:",
16 | "Hide/Show the control bar": "顯示/隱藏控制列",
17 | "Move/Drag Viewport": "拖放顯示範圍",
18 | "viewport drag": "顯示範圍拖放",
19 | "Active Mouse Button": "啟用滑鼠按鍵",
20 | "No mousebutton": "無滑鼠按鍵",
21 | "Left mousebutton": "滑鼠左鍵",
22 | "Middle mousebutton": "滑鼠中鍵",
23 | "Right mousebutton": "滑鼠右鍵",
24 | "Keyboard": "鍵盤",
25 | "Show Keyboard": "顯示鍵盤",
26 | "Extra keys": "額外按鍵",
27 | "Show Extra Keys": "顯示額外按鍵",
28 | "Ctrl": "Ctrl",
29 | "Toggle Ctrl": "切換 Ctrl",
30 | "Alt": "Alt",
31 | "Toggle Alt": "切換 Alt",
32 | "Send Tab": "送出 Tab 鍵",
33 | "Tab": "Tab",
34 | "Esc": "Esc",
35 | "Send Escape": "送出 Escape 鍵",
36 | "Ctrl+Alt+Del": "Ctrl-Alt-Del",
37 | "Send Ctrl-Alt-Del": "送出 Ctrl-Alt-Del 快捷鍵",
38 | "Shutdown/Reboot": "關機/重新啟動",
39 | "Shutdown/Reboot...": "關機/重新啟動...",
40 | "Power": "電源",
41 | "Shutdown": "關機",
42 | "Reboot": "重新啟動",
43 | "Reset": "重設",
44 | "Clipboard": "剪貼簿",
45 | "Clear": "清除",
46 | "Fullscreen": "全螢幕",
47 | "Settings": "設定",
48 | "Shared Mode": "分享模式",
49 | "View Only": "僅檢視",
50 | "Clip to Window": "限制/裁切視窗大小",
51 | "Scaling Mode:": "縮放模式:",
52 | "None": "無",
53 | "Local Scaling": "本機縮放",
54 | "Remote Resizing": "遠端調整大小",
55 | "Advanced": "進階",
56 | "Repeater ID:": "中繼站 ID",
57 | "WebSocket": "WebSocket",
58 | "Encrypt": "加密",
59 | "Host:": "主機:",
60 | "Port:": "連接埠:",
61 | "Path:": "路徑:",
62 | "Automatic Reconnect": "自動重新連線",
63 | "Reconnect Delay (ms):": "重新連線間隔 (ms):",
64 | "Logging:": "日誌級別:",
65 | "Disconnect": "中斷連線",
66 | "Connect": "連線",
67 | "Password:": "密碼:",
68 | "Cancel": "取消"
69 | }
--------------------------------------------------------------------------------
/novnc/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@novnc/novnc",
3 | "version": "1.0.0-beta",
4 | "description": "An HTML5 VNC client",
5 | "directories": {
6 | "doc": "docs",
7 | "test": "tests"
8 | },
9 | "scripts": {
10 | "test": "PATH=$PATH:node_modules/karma/bin karma start karma.conf.js",
11 | "prepare": "node ./utils/use_require.js --as commonjs --clean"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git+https://github.com/novnc/noVNC.git"
16 | },
17 | "author": "Joel Martin (https://github.com/kanaka)",
18 | "contributors": [
19 | "Solly Ross (https://github.com/directxman12)",
20 | "Peter Åstrand (https://github.com/astrand)",
21 | "Samuel Mannehed (https://github.com/samhed)",
22 | "Pierre Ossman (https://github.com/CendioOssman)"
23 | ],
24 | "license": "MPL-2.0",
25 | "bugs": {
26 | "url": "https://github.com/novnc/noVNC/issues"
27 | },
28 | "homepage": "https://github.com/novnc/noVNC",
29 | "devDependencies": {
30 | "babel-core": "^6.22.1",
31 | "babel-plugin-add-module-exports": "^0.2.1",
32 | "babel-plugin-import-redirect": "*",
33 | "babel-plugin-syntax-dynamic-import": "^6.18.0",
34 | "babel-plugin-transform-es2015-modules-amd": "^6.22.0",
35 | "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0",
36 | "babel-plugin-transform-es2015-modules-systemjs": "^6.22.0",
37 | "babel-plugin-transform-es2015-modules-umd": "^6.22.0",
38 | "babelify": "^7.3.0",
39 | "browserify": "^13.1.0",
40 | "chai": "^3.5.0",
41 | "commander": "^2.9.0",
42 | "es-module-loader": "^2.1.0",
43 | "fs-extra": "^1.0.0",
44 | "jsdom": "*",
45 | "karma": "^1.3.0",
46 | "karma-babel-preprocessor": "^6.0.1",
47 | "karma-chai": "^0.1.0",
48 | "karma-mocha": "^1.3.0",
49 | "karma-mocha-reporter": "^2.2.0",
50 | "karma-requirejs": "^1.1.0",
51 | "karma-sauce-launcher": "^1.0.0",
52 | "mocha": "^3.1.2",
53 | "node-getopt": "*",
54 | "po2json": "*",
55 | "requirejs": "^2.3.2",
56 | "rollup": "^0.41.4",
57 | "rollup-plugin-node-resolve": "^2.0.0",
58 | "sinon-chai": "^2.8.0"
59 | },
60 | "dependencies": {},
61 | "keywords": [
62 | "vnc",
63 | "rfb",
64 | "novnc",
65 | "websockify"
66 | ]
67 | }
68 |
--------------------------------------------------------------------------------
/novnc/docs/links:
--------------------------------------------------------------------------------
1 | New tight PNG protocol:
2 | http://wiki.qemu.org/VNC_Tight_PNG
3 | http://xf.iksaif.net/blog/index.php?post/2010/06/14/QEMU:-Tight-PNG-and-some-profiling
4 |
5 | RFB protocol and extensions:
6 | http://tigervnc.org/cgi-bin/rfbproto
7 |
8 | Canvas Browser Compatibility:
9 | http://philip.html5.org/tests/canvas/suite/tests/results.html
10 |
11 | WebSockets API standard:
12 | http://www.whatwg.org/specs/web-apps/current-work/complete.html#websocket
13 | http://dev.w3.org/html5/websockets/
14 | http://www.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-00.txt
15 |
16 | Browser Keyboard Events detailed:
17 | http://unixpapa.com/js/key.html
18 |
19 | ActionScript (Flash) WebSocket implementation:
20 | http://github.com/gimite/web-socket-js
21 |
22 | ActionScript (Flash) crypto/TLS library:
23 | http://code.google.com/p/as3crypto
24 | http://github.com/lyokato/as3crypto_patched
25 |
26 | TLS Protocol:
27 | http://en.wikipedia.org/wiki/Transport_Layer_Security
28 |
29 | Generate self-signed certificate:
30 | http://docs.python.org/dev/library/ssl.html#certificates
31 |
32 | Cursor appearance/style (for Cursor pseudo-encoding):
33 | http://en.wikipedia.org/wiki/ICO_(file_format)
34 | http://www.daubnet.com/en/file-format-cur
35 | https://developer.mozilla.org/en/Using_URL_values_for_the_cursor_property
36 | http://www.fileformat.info/format/bmp/egff.htm
37 |
38 | Icon/Cursor file format:
39 | http://msdn.microsoft.com/en-us/library/ms997538
40 | http://msdn.microsoft.com/en-us/library/aa921550.aspx
41 | http://msdn.microsoft.com/en-us/library/aa930622.aspx
42 |
43 |
44 | RDP Protocol specification:
45 | http://msdn.microsoft.com/en-us/library/cc240445(v=PROT.10).aspx
46 |
47 |
48 | Related projects:
49 |
50 | guacamole: http://guacamole.sourceforge.net/
51 |
52 | - Web client, but Java servlet does pre-processing
53 |
54 | jsvnc: http://code.google.com/p/jsvnc/
55 |
56 | - No releases
57 |
58 | webvnc: http://code.google.com/p/webvnc/
59 |
60 | - Jetty web server gateway, no updates since April 2008.
61 |
62 | RealVNC Java applet: http://www.realvnc.com/support/javavncviewer.html
63 |
64 | - Java applet
65 |
66 | Flashlight-VNC: http://www.wizhelp.com/flashlight-vnc/
67 |
68 | - Adobe Flash implementation
69 |
70 | FVNC: http://osflash.org/fvnc
71 |
72 | - Adbove Flash implementation
73 |
74 | CanVNC: http://canvnc.sourceforge.net/
75 |
76 | - HTML client with REST to VNC python proxy. Mostly vapor.
77 |
--------------------------------------------------------------------------------
/novnc/LICENSE.txt:
--------------------------------------------------------------------------------
1 | noVNC is Copyright (C) 2011 Joel Martin
2 |
3 | The noVNC core library files are licensed under the MPL 2.0 (Mozilla
4 | Public License 2.0). The noVNC core library is composed of the
5 | Javascript code necessary for full noVNC operation. This includes (but
6 | is not limited to):
7 |
8 | core/**/*.js
9 | app/*.js
10 | test/playback.js
11 |
12 | The HTML, CSS, font and images files that included with the noVNC
13 | source distibution (or repository) are not considered part of the
14 | noVNC core library and are licensed under more permissive licenses.
15 | The intent is to allow easy integration of noVNC into existing web
16 | sites and web applications.
17 |
18 | The HTML, CSS, font and image files are licensed as follows:
19 |
20 | *.html : 2-Clause BSD license
21 |
22 | app/styles/*.css : 2-Clause BSD license
23 |
24 | app/styles/Orbitron* : SIL Open Font License 1.1
25 | (Copyright 2009 Matt McInerney)
26 |
27 | app/images/ : Creative Commons Attribution-ShareAlike
28 | http://creativecommons.org/licenses/by-sa/3.0/
29 |
30 | Some portions of noVNC are copyright to their individual authors.
31 | Please refer to the individual source files and/or to the noVNC commit
32 | history: https://github.com/novnc/noVNC/commits/master
33 |
34 | The are several files and projects that have been incorporated into
35 | the noVNC core library. Here is a list of those files and the original
36 | licenses (all MPL 2.0 compatible):
37 |
38 | core/base64.js : MPL 2.0
39 |
40 | core/des.js : Various BSD style licenses
41 |
42 | vendor/pako/ : MIT
43 |
44 | vendor/browser-es-module-loader/src/ : MIT
45 |
46 | vendor/browser-es-module-loader/dist/ : Various BSD style licenses
47 |
48 | vendor/promise.js : MIT
49 |
50 | Any other files not mentioned above are typically marked with
51 | a copyright/license header at the top of the file. The default noVNC
52 | license is MPL-2.0.
53 |
54 | The following license texts are included:
55 |
56 | docs/LICENSE.MPL-2.0
57 | docs/LICENSE.OFL-1.1
58 | docs/LICENSE.BSD-3-Clause (New BSD)
59 | docs/LICENSE.BSD-2-Clause (Simplified BSD / FreeBSD)
60 | vendor/pako/LICENSE (MIT)
61 |
62 | Or alternatively the license texts may be found here:
63 |
64 | http://www.mozilla.org/MPL/2.0/
65 | http://scripts.sil.org/OFL
66 | http://en.wikipedia.org/wiki/BSD_licenses
67 | https://opensource.org/licenses/MIT
68 |
--------------------------------------------------------------------------------
/novnc/tests/fake.websocket.js:
--------------------------------------------------------------------------------
1 | // PhantomJS can't create Event objects directly, so we need to use this
2 | function make_event(name, props) {
3 | var evt = document.createEvent('Event');
4 | evt.initEvent(name, true, true);
5 | if (props) {
6 | for (var prop in props) {
7 | evt[prop] = props[prop];
8 | }
9 | }
10 | return evt;
11 | }
12 |
13 | export default function FakeWebSocket (uri, protocols) {
14 | this.url = uri;
15 | this.binaryType = "arraybuffer";
16 | this.extensions = "";
17 |
18 | if (!protocols || typeof protocols === 'string') {
19 | this.protocol = protocols;
20 | } else {
21 | this.protocol = protocols[0];
22 | }
23 |
24 | this._send_queue = new Uint8Array(20000);
25 |
26 | this.readyState = FakeWebSocket.CONNECTING;
27 | this.bufferedAmount = 0;
28 |
29 | this.__is_fake = true;
30 | };
31 |
32 | FakeWebSocket.prototype = {
33 | close: function (code, reason) {
34 | this.readyState = FakeWebSocket.CLOSED;
35 | if (this.onclose) {
36 | this.onclose(make_event("close", { 'code': code, 'reason': reason, 'wasClean': true }));
37 | }
38 | },
39 |
40 | send: function (data) {
41 | if (this.protocol == 'base64') {
42 | data = Base64.decode(data);
43 | } else {
44 | data = new Uint8Array(data);
45 | }
46 | this._send_queue.set(data, this.bufferedAmount);
47 | this.bufferedAmount += data.length;
48 | },
49 |
50 | _get_sent_data: function () {
51 | var res = new Uint8Array(this._send_queue.buffer, 0, this.bufferedAmount);
52 | this.bufferedAmount = 0;
53 | return res;
54 | },
55 |
56 | _open: function (data) {
57 | this.readyState = FakeWebSocket.OPEN;
58 | if (this.onopen) {
59 | this.onopen(make_event('open'));
60 | }
61 | },
62 |
63 | _receive_data: function (data) {
64 | this.onmessage(make_event("message", { 'data': data }));
65 | }
66 | };
67 |
68 | FakeWebSocket.OPEN = WebSocket.OPEN;
69 | FakeWebSocket.CONNECTING = WebSocket.CONNECTING;
70 | FakeWebSocket.CLOSING = WebSocket.CLOSING;
71 | FakeWebSocket.CLOSED = WebSocket.CLOSED;
72 |
73 | FakeWebSocket.__is_fake = true;
74 |
75 | FakeWebSocket.replace = function () {
76 | if (!WebSocket.__is_fake) {
77 | var real_version = WebSocket;
78 | WebSocket = FakeWebSocket;
79 | FakeWebSocket.__real_version = real_version;
80 | }
81 | };
82 |
83 | FakeWebSocket.restore = function () {
84 | if (WebSocket.__is_fake) {
85 | WebSocket = WebSocket.__real_version;
86 | }
87 | };
88 |
--------------------------------------------------------------------------------
/novnc/app/locale/sv.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Ansluter...",
3 | "Connected (encrypted) to ": "Ansluten (krypterat) till ",
4 | "Connected (unencrypted) to ": "Ansluten (okrypterat) till ",
5 | "Disconnecting...": "Kopplar ner...",
6 | "Disconnected": "Frånkopplad",
7 | "Must set host": "Du måste specifiera en värd",
8 | "Reconnecting...": "Återansluter...",
9 | "Password is required": "Lösenord krävs",
10 | "Disconnect timeout": "Det tog för lång tid att koppla ner",
11 | "noVNC encountered an error:": "noVNC stötte på ett problem:",
12 | "Hide/Show the control bar": "Göm/Visa kontrollbaren",
13 | "Move/Drag Viewport": "Flytta/Dra Vyn",
14 | "viewport drag": "dra vy",
15 | "Active Mouse Button": "Aktiv musknapp",
16 | "No mousebutton": "Ingen musknapp",
17 | "Left mousebutton": "Vänster musknapp",
18 | "Middle mousebutton": "Mitten-musknapp",
19 | "Right mousebutton": "Höger musknapp",
20 | "Keyboard": "Tangentbord",
21 | "Show Keyboard": "Visa Tangentbord",
22 | "Extra keys": "Extraknappar",
23 | "Show Extra Keys": "Visa Extraknappar",
24 | "Ctrl": "Ctrl",
25 | "Toggle Ctrl": "Växla Ctrl",
26 | "Alt": "Alt",
27 | "Toggle Alt": "Växla Alt",
28 | "Send Tab": "Skicka Tab",
29 | "Tab": "Tab",
30 | "Esc": "Esc",
31 | "Send Escape": "Skicka Escape",
32 | "Ctrl+Alt+Del": "Ctrl+Alt+Del",
33 | "Send Ctrl-Alt-Del": "Skicka Ctrl-Alt-Del",
34 | "Shutdown/Reboot": "Stäng av/Boota om",
35 | "Shutdown/Reboot...": "Stäng av/Boota om...",
36 | "Power": "Ström",
37 | "Shutdown": "Stäng av",
38 | "Reboot": "Boota om",
39 | "Reset": "Återställ",
40 | "Clipboard": "Urklipp",
41 | "Clear": "Rensa",
42 | "Fullscreen": "Fullskärm",
43 | "Settings": "Inställningar",
44 | "Shared Mode": "Delat Läge",
45 | "View Only": "Endast Visning",
46 | "Clip to Window": "Begränsa till Fönster",
47 | "Scaling Mode:": "Skalningsläge:",
48 | "None": "Ingen",
49 | "Local Scaling": "Lokal Skalning",
50 | "Local Downscaling": "Lokal Nedskalning",
51 | "Remote Resizing": "Ändra Storlek",
52 | "Advanced": "Avancerat",
53 | "Local Cursor": "Lokal Muspekare",
54 | "Repeater ID:": "Repeater-ID:",
55 | "WebSocket": "WebSocket",
56 | "Encrypt": "Kryptera",
57 | "Host:": "Värd:",
58 | "Port:": "Port:",
59 | "Path:": "Sökväg:",
60 | "Automatic Reconnect": "Automatisk Återanslutning",
61 | "Reconnect Delay (ms):": "Fördröjning (ms):",
62 | "Logging:": "Loggning:",
63 | "Disconnect": "Koppla från",
64 | "Connect": "Anslut",
65 | "Password:": "Lösenord:",
66 | "Cancel": "Avbryt",
67 | "Canvas not supported.": "Canvas stöds ej"
68 | }
--------------------------------------------------------------------------------
/novnc/tests/test.util.js:
--------------------------------------------------------------------------------
1 | var assert = chai.assert;
2 | var expect = chai.expect;
3 |
4 | import * as Log from '../core/util/logging.js';
5 |
6 | import sinon from '../vendor/sinon.js';
7 |
8 | describe('Utils', function() {
9 | "use strict";
10 |
11 | describe('logging functions', function () {
12 | beforeEach(function () {
13 | sinon.spy(console, 'log');
14 | sinon.spy(console, 'debug');
15 | sinon.spy(console, 'warn');
16 | sinon.spy(console, 'error');
17 | sinon.spy(console, 'info');
18 | });
19 |
20 | afterEach(function () {
21 | console.log.restore();
22 | console.debug.restore();
23 | console.warn.restore();
24 | console.error.restore();
25 | console.info.restore();
26 | Log.init_logging();
27 | });
28 |
29 | it('should use noop for levels lower than the min level', function () {
30 | Log.init_logging('warn');
31 | Log.Debug('hi');
32 | Log.Info('hello');
33 | expect(console.log).to.not.have.been.called;
34 | });
35 |
36 | it('should use console.debug for Debug', function () {
37 | Log.init_logging('debug');
38 | Log.Debug('dbg');
39 | expect(console.debug).to.have.been.calledWith('dbg');
40 | });
41 |
42 | it('should use console.info for Info', function () {
43 | Log.init_logging('debug');
44 | Log.Info('inf');
45 | expect(console.info).to.have.been.calledWith('inf');
46 | });
47 |
48 | it('should use console.warn for Warn', function () {
49 | Log.init_logging('warn');
50 | Log.Warn('wrn');
51 | expect(console.warn).to.have.been.called;
52 | expect(console.warn).to.have.been.calledWith('wrn');
53 | });
54 |
55 | it('should use console.error for Error', function () {
56 | Log.init_logging('error');
57 | Log.Error('err');
58 | expect(console.error).to.have.been.called;
59 | expect(console.error).to.have.been.calledWith('err');
60 | });
61 | });
62 |
63 | // TODO(directxman12): test the conf_default and conf_defaults methods
64 | // TODO(directxman12): test decodeUTF8
65 | // TODO(directxman12): test the event methods (addEvent, removeEvent, stopEvent)
66 | // TODO(directxman12): figure out a good way to test getPosition and getEventPosition
67 | // TODO(directxman12): figure out how to test the browser detection functions properly
68 | // (we can't really test them against the browsers, except for Gecko
69 | // via PhantomJS, the default test driver)
70 | });
71 |
--------------------------------------------------------------------------------
/novnc/core/util/browser.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright (C) 2012 Joel Martin
4 | * Licensed under MPL 2.0 (see LICENSE.txt)
5 | *
6 | * See README.md for usage and integration instructions.
7 | */
8 |
9 | import * as Log from './logging.js';
10 |
11 | // Touch detection
12 | export var isTouchDevice = ('ontouchstart' in document.documentElement) ||
13 | // requried for Chrome debugger
14 | (document.ontouchstart !== undefined) ||
15 | // required for MS Surface
16 | (navigator.maxTouchPoints > 0) ||
17 | (navigator.msMaxTouchPoints > 0);
18 | window.addEventListener('touchstart', function onFirstTouch() {
19 | isTouchDevice = true;
20 | window.removeEventListener('touchstart', onFirstTouch, false);
21 | }, false);
22 |
23 | var _cursor_uris_supported = null;
24 |
25 | export function supportsCursorURIs () {
26 | if (_cursor_uris_supported === null) {
27 | try {
28 | var target = document.createElement('canvas');
29 | target.style.cursor = 'url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default';
30 |
31 | if (target.style.cursor) {
32 | Log.Info("Data URI scheme cursor supported");
33 | _cursor_uris_supported = true;
34 | } else {
35 | Log.Warn("Data URI scheme cursor not supported");
36 | _cursor_uris_supported = false;
37 | }
38 | } catch (exc) {
39 | Log.Error("Data URI scheme cursor test exception: " + exc);
40 | _cursor_uris_supported = false;
41 | }
42 | }
43 |
44 | return _cursor_uris_supported;
45 | };
46 |
47 | export function isMac() {
48 | return navigator && !!(/mac/i).exec(navigator.platform);
49 | }
50 |
51 | export function isIE() {
52 | return navigator && !!(/trident/i).exec(navigator.userAgent);
53 | }
54 |
55 | export function isEdge() {
56 | return navigator && !!(/edge/i).exec(navigator.userAgent);
57 | }
58 |
59 | export function isWindows() {
60 | return navigator && !!(/win/i).exec(navigator.platform);
61 | }
62 |
63 | export function isIOS() {
64 | return navigator &&
65 | (!!(/ipad/i).exec(navigator.platform) ||
66 | !!(/iphone/i).exec(navigator.platform) ||
67 | !!(/ipod/i).exec(navigator.platform));
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/novnc/app/images/handle.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
83 |
--------------------------------------------------------------------------------
/novnc/app/locale/es.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Conectando...",
3 | "Connected (encrypted) to ": "Conectado (con encriptación) a",
4 | "Connected (unencrypted) to ": "Conectado (sin encriptación) a",
5 | "Disconnecting...": "Desconectando...",
6 | "Disconnected": "Desconectado",
7 | "Must set host": "Debes configurar el host",
8 | "Reconnecting...": "Reconectando...",
9 | "Password is required": "Contraseña es obligatoria",
10 | "Disconnect timeout": "Tiempo de desconexión agotado",
11 | "noVNC encountered an error:": "noVNC ha encontrado un error:",
12 | "Hide/Show the control bar": "Ocultar/Mostrar la barra de control",
13 | "Move/Drag Viewport": "Mover/Arrastrar la ventana",
14 | "viewport drag": "Arrastrar la ventana",
15 | "Active Mouse Button": "Botón activo del ratón",
16 | "No mousebutton": "Ningún botón del ratón",
17 | "Left mousebutton": "Botón izquierdo del ratón",
18 | "Middle mousebutton": "Botón central del ratón",
19 | "Right mousebutton": "Botón derecho del ratón",
20 | "Keyboard": "Teclado",
21 | "Show Keyboard": "Mostrar teclado",
22 | "Extra keys": "Teclas adicionales",
23 | "Show Extra Keys": "Mostrar Teclas Adicionales",
24 | "Ctrl": "Ctrl",
25 | "Toggle Ctrl": "Pulsar/Soltar Ctrl",
26 | "Alt": "Alt",
27 | "Toggle Alt": "Pulsar/Soltar Alt",
28 | "Send Tab": "Enviar Tabulación",
29 | "Tab": "Tabulación",
30 | "Esc": "Esc",
31 | "Send Escape": "Enviar Escape",
32 | "Ctrl+Alt+Del": "Ctrl+Alt+Del",
33 | "Send Ctrl-Alt-Del": "Enviar Ctrl+Alt+Del",
34 | "Shutdown/Reboot": "Apagar/Reiniciar",
35 | "Shutdown/Reboot...": "Apagar/Reiniciar...",
36 | "Power": "Encender",
37 | "Shutdown": "Apagar",
38 | "Reboot": "Reiniciar",
39 | "Reset": "Restablecer",
40 | "Clipboard": "Portapapeles",
41 | "Clear": "Vaciar",
42 | "Fullscreen": "Pantalla Completa",
43 | "Settings": "Configuraciones",
44 | "Shared Mode": "Modo Compartido",
45 | "View Only": "Solo visualización",
46 | "Clip to Window": "Recortar al tamaño de la ventana",
47 | "Scaling Mode:": "Modo de escalado:",
48 | "None": "Ninguno",
49 | "Local Scaling": "Escalado Local",
50 | "Local Downscaling": "Reducción de escala local",
51 | "Remote Resizing": "Cambio de tamaño remoto",
52 | "Advanced": "Avanzado",
53 | "Local Cursor": "Cursor Local",
54 | "Repeater ID:": "ID del Repetidor",
55 | "WebSocket": "WebSocket",
56 | "Encrypt": "",
57 | "Host:": "Host",
58 | "Port:": "Puesto",
59 | "Path:": "Ruta",
60 | "Automatic Reconnect": "Reconexión automática",
61 | "Reconnect Delay (ms):": "Retraso en la reconexión (ms)",
62 | "Logging:": "Logging",
63 | "Disconnect": "Desconectar",
64 | "Connect": "Conectar",
65 | "Password:": "Contraseña",
66 | "Cancel": "Cancelar",
67 | "Canvas not supported.": "Canvas no está soportado"
68 | }
--------------------------------------------------------------------------------
/novnc/app/locale/nl.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Verbinden...",
3 | "Connected (encrypted) to ": "Verbonden (versleuteld) met ",
4 | "Connected (unencrypted) to ": "Verbonden (onversleuteld) met ",
5 | "Disconnecting...": "Verbinding verbreken...",
6 | "Disconnected": "Verbinding verbroken",
7 | "Must set host": "Host moeten worden ingesteld",
8 | "Reconnecting...": "Opnieuw verbinding maken...",
9 | "Password is required": "Wachtwoord is vereist",
10 | "Disconnect timeout": "Timeout tijdens verbreken van verbinding",
11 | "noVNC encountered an error:": "noVNC heeft een fout bemerkt:",
12 | "Hide/Show the control bar": "Verberg/Toon de bedieningsbalk",
13 | "Move/Drag Viewport": "Verplaats/Versleep Kijkvenster",
14 | "viewport drag": "kijkvenster slepen",
15 | "Active Mouse Button": "Actieve Muisknop",
16 | "No mousebutton": "Geen muisknop",
17 | "Left mousebutton": "Linker muisknop",
18 | "Middle mousebutton": "Middelste muisknop",
19 | "Right mousebutton": "Rechter muisknop",
20 | "Keyboard": "Toetsenbord",
21 | "Show Keyboard": "Toon Toetsenbord",
22 | "Extra keys": "Extra toetsen",
23 | "Show Extra Keys": "Toon Extra Toetsen",
24 | "Ctrl": "Ctrl",
25 | "Toggle Ctrl": "Ctrl aan/uitzetten",
26 | "Alt": "Alt",
27 | "Toggle Alt": "Alt aan/uitzetten",
28 | "Send Tab": "Tab Sturen",
29 | "Tab": "Tab",
30 | "Esc": "Esc",
31 | "Send Escape": "Escape Sturen",
32 | "Ctrl+Alt+Del": "Ctrl-Alt-Del",
33 | "Send Ctrl-Alt-Del": "Ctrl-Alt-Del Sturen",
34 | "Shutdown/Reboot": "Uitschakelen/Herstarten",
35 | "Shutdown/Reboot...": "Uitschakelen/Herstarten...",
36 | "Power": "Systeem",
37 | "Shutdown": "Uitschakelen",
38 | "Reboot": "Herstarten",
39 | "Reset": "Resetten",
40 | "Clipboard": "Klembord",
41 | "Clear": "Wissen",
42 | "Fullscreen": "Volledig Scherm",
43 | "Settings": "Instellingen",
44 | "Shared Mode": "Gedeelde Modus",
45 | "View Only": "Alleen Kijken",
46 | "Clip to Window": "Randen buiten venster afsnijden",
47 | "Scaling Mode:": "Schaalmodus:",
48 | "None": "Geen",
49 | "Local Scaling": "Lokaal Schalen",
50 | "Local Downscaling": "Lokaal Neerschalen",
51 | "Remote Resizing": "Op Afstand Formaat Wijzigen",
52 | "Advanced": "Geavanceerd",
53 | "Local Cursor": "Lokale Cursor",
54 | "Repeater ID:": "Repeater ID:",
55 | "WebSocket": "WebSocket",
56 | "Encrypt": "Versleutelen",
57 | "Host:": "Host:",
58 | "Port:": "Poort:",
59 | "Path:": "Pad:",
60 | "Automatic Reconnect": "Automatisch Opnieuw Verbinden",
61 | "Reconnect Delay (ms):": "Vertraging voor Opnieuw Verbinden (ms):",
62 | "Logging:": "Logmeldingen:",
63 | "Disconnect": "Verbinding verbreken",
64 | "Connect": "Verbinden",
65 | "Password:": "Wachtwoord:",
66 | "Cancel": "Annuleren",
67 | "Canvas not supported.": "Canvas wordt niet ondersteund."
68 | }
--------------------------------------------------------------------------------
/novnc/app/locale/tr.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Bağlanıyor...",
3 | "Disconnecting...": "Bağlantı kesiliyor...",
4 | "Reconnecting...": "Yeniden bağlantı kuruluyor...",
5 | "Internal error": "İç hata",
6 | "Must set host": "Sunucuyu kur",
7 | "Connected (encrypted) to ": "Bağlı (şifrelenmiş)",
8 | "Connected (unencrypted) to ": "Bağlandı (şifrelenmemiş)",
9 | "Something went wrong, connection is closed": "Bir şeyler ters gitti, bağlantı kesildi",
10 | "Disconnected": "Bağlantı kesildi",
11 | "New connection has been rejected with reason: ": "Bağlantı aşağıdaki nedenlerden dolayı reddedildi: ",
12 | "New connection has been rejected": "Bağlantı reddedildi",
13 | "Password is required": "Şifre gerekli",
14 | "noVNC encountered an error:": "Bir hata oluştu:",
15 | "Hide/Show the control bar": "Denetim masasını Gizle/Göster",
16 | "Move/Drag Viewport": "Görünümü Taşı/Sürükle",
17 | "viewport drag": "Görüntü penceresini sürükle",
18 | "Active Mouse Button": "Aktif Fare Düğmesi",
19 | "No mousebutton": "Fare düğmesi yok",
20 | "Left mousebutton": "Farenin sol düğmesi",
21 | "Middle mousebutton": "Farenin orta düğmesi",
22 | "Right mousebutton": "Farenin sağ düğmesi",
23 | "Keyboard": "Klavye",
24 | "Show Keyboard": "Klavye Düzenini Göster",
25 | "Extra keys": "Ekstra tuşlar",
26 | "Show Extra Keys": "Ekstra tuşları göster",
27 | "Ctrl": "Ctrl",
28 | "Toggle Ctrl": "Ctrl Değiştir ",
29 | "Alt": "Alt",
30 | "Toggle Alt": "Alt Değiştir",
31 | "Send Tab": "Sekme Gönder",
32 | "Tab": "Sekme",
33 | "Esc": "Esc",
34 | "Send Escape": "Boşluk Gönder",
35 | "Ctrl+Alt+Del": "Ctrl + Alt + Del",
36 | "Send Ctrl-Alt-Del": "Ctrl-Alt-Del Gönder",
37 | "Shutdown/Reboot": "Kapat/Yeniden Başlat",
38 | "Shutdown/Reboot...": "Kapat/Yeniden Başlat...",
39 | "Power": "Güç",
40 | "Shutdown": "Kapat",
41 | "Reboot": "Yeniden Başlat",
42 | "Reset": "Sıfırla",
43 | "Clipboard": "Pano",
44 | "Clear": "Temizle",
45 | "Fullscreen": "Tam Ekran",
46 | "Settings": "Ayarlar",
47 | "Shared Mode": "Paylaşım Modu",
48 | "View Only": "Sadece Görüntüle",
49 | "Clip to Window": "Pencereye Tıkla",
50 | "Scaling Mode:": "Ölçekleme Modu:",
51 | "None": "Bilinmeyen",
52 | "Local Scaling": "Yerel Ölçeklendirme",
53 | "Remote Resizing": "Uzaktan Yeniden Boyutlandırma",
54 | "Advanced": "Gelişmiş",
55 | "Repeater ID:": "Tekralayıcı ID:",
56 | "WebSocket": "WebSocket",
57 | "Encrypt": "Şifrele",
58 | "Host:": "Ana makine:",
59 | "Port:": "Port:",
60 | "Path:": "Yol:",
61 | "Automatic Reconnect": "Otomatik Yeniden Bağlan",
62 | "Reconnect Delay (ms):": "Yeniden Bağlanma Süreci (ms):",
63 | "Logging:": "Giriş yapılıyor:",
64 | "Disconnect": "Bağlantıyı Kes",
65 | "Connect": "Bağlan",
66 | "Password:": "Parola:",
67 | "Cancel": "Vazgeç",
68 | "Canvas not supported.": "Tuval desteklenmiyor."
69 | }
--------------------------------------------------------------------------------
/novnc/app/locale/pl.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Łączenie...",
3 | "Disconnecting...": "Rozłączanie...",
4 | "Reconnecting...": "Łączenie...",
5 | "Internal error": "Błąd wewnętrzny",
6 | "Must set host": "Host i port są wymagane",
7 | "Connected (encrypted) to ": "Połączenie (szyfrowane) z ",
8 | "Connected (unencrypted) to ": "Połączenie (nieszyfrowane) z ",
9 | "Something went wrong, connection is closed": "Coś poszło źle, połączenie zostało zamknięte",
10 | "Disconnected": "Rozłączony",
11 | "New connection has been rejected with reason: ": "Nowe połączenie zostało odrzucone z powodu: ",
12 | "New connection has been rejected": "Nowe połączenie zostało odrzucone",
13 | "Password is required": "Hasło jest wymagane",
14 | "noVNC encountered an error:": "noVNC napotkało błąd:",
15 | "Hide/Show the control bar": "Pokaż/Ukryj pasek ustawień",
16 | "Move/Drag Viewport": "Ruszaj/Przeciągaj Viewport",
17 | "viewport drag": "przeciągnij viewport",
18 | "Active Mouse Button": "Aktywny Przycisk Myszy",
19 | "No mousebutton": "Brak przycisku myszy",
20 | "Left mousebutton": "Lewy przycisk myszy",
21 | "Middle mousebutton": "Środkowy przycisk myszy",
22 | "Right mousebutton": "Prawy przycisk myszy",
23 | "Keyboard": "Klawiatura",
24 | "Show Keyboard": "Pokaż klawiaturę",
25 | "Extra keys": "Przyciski dodatkowe",
26 | "Show Extra Keys": "Pokaż przyciski dodatkowe",
27 | "Ctrl": "Ctrl",
28 | "Toggle Ctrl": "Przełącz Ctrl",
29 | "Alt": "Alt",
30 | "Toggle Alt": "Przełącz Alt",
31 | "Send Tab": "Wyślij Tab",
32 | "Tab": "Tab",
33 | "Esc": "Esc",
34 | "Send Escape": "Wyślij Escape",
35 | "Ctrl+Alt+Del": "Ctrl+Alt+Del",
36 | "Send Ctrl-Alt-Del": "Wyślij Ctrl-Alt-Del",
37 | "Shutdown/Reboot": "Wyłącz/Uruchom ponownie",
38 | "Shutdown/Reboot...": "Wyłącz/Uruchom ponownie...",
39 | "Power": "Włączony",
40 | "Shutdown": "Wyłącz",
41 | "Reboot": "Uruchom ponownie",
42 | "Reset": "Resetuj",
43 | "Clipboard": "Schowek",
44 | "Clear": "Wyczyść",
45 | "Fullscreen": "Pełny ekran",
46 | "Settings": "Ustawienia",
47 | "Shared Mode": "Tryb Współdzielenia",
48 | "View Only": "Tylko Podgląd",
49 | "Clip to Window": "Przytnij do Okna",
50 | "Scaling Mode:": "Tryb Skalowania:",
51 | "None": "Brak",
52 | "Local Scaling": "Skalowanie lokalne",
53 | "Remote Resizing": "Skalowanie zdalne",
54 | "Advanced": "Zaawansowane",
55 | "Repeater ID:": "ID Repeatera:",
56 | "WebSocket": "WebSocket",
57 | "Encrypt": "Szyfrowanie",
58 | "Host:": "Host:",
59 | "Port:": "Port:",
60 | "Path:": "Ścieżka:",
61 | "Automatic Reconnect": "Automatycznie wznawiaj połączenie",
62 | "Reconnect Delay (ms):": "Opóźnienie wznawiania (ms):",
63 | "Logging:": "Poziom logowania:",
64 | "Disconnect": "Rozłącz",
65 | "Connect": "Połącz",
66 | "Password:": "Hasło:",
67 | "Cancel": "Anuluj",
68 | "Canvas not supported.": "Element Canvas nie jest wspierany."
69 | }
--------------------------------------------------------------------------------
/novnc/app/locale/de.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Verbinden...",
3 | "Disconnecting...": "Verbindung trennen...",
4 | "Reconnecting...": "Verbindung wiederherstellen...",
5 | "Internal error": "Interner Fehler",
6 | "Must set host": "Richten Sie den Server ein",
7 | "Connected (encrypted) to ": "Verbunden mit (verschlüsselt) ",
8 | "Connected (unencrypted) to ": "Verbunden mit (unverschlüsselt) ",
9 | "Something went wrong, connection is closed": "Etwas lief schief, Verbindung wurde getrennt",
10 | "Disconnected": "Verbindung zum Server getrennt",
11 | "New connection has been rejected with reason: ": "Verbindung wurde aus folgendem Grund abgelehnt: ",
12 | "New connection has been rejected": "Verbindung wurde abgelehnt",
13 | "Password is required": "Passwort ist erforderlich",
14 | "noVNC encountered an error:": "Ein Fehler ist aufgetreten:",
15 | "Hide/Show the control bar": "Kontrollleiste verstecken/anzeigen",
16 | "Move/Drag Viewport": "Ansichtsfenster verschieben/ziehen",
17 | "viewport drag": "Ansichtsfenster ziehen",
18 | "Active Mouse Button": "Aktive Maustaste",
19 | "No mousebutton": "Keine Maustaste",
20 | "Left mousebutton": "Linke Maustaste",
21 | "Middle mousebutton": "Mittlere Maustaste",
22 | "Right mousebutton": "Rechte Maustaste",
23 | "Keyboard": "Tastatur",
24 | "Show Keyboard": "Tastatur anzeigen",
25 | "Extra keys": "Zusatztasten",
26 | "Show Extra Keys": "Zusatztasten anzeigen",
27 | "Ctrl": "Strg",
28 | "Toggle Ctrl": "Strg umschalten",
29 | "Alt": "Alt",
30 | "Toggle Alt": "Alt umschalten",
31 | "Send Tab": "Tab senden",
32 | "Tab": "Tab",
33 | "Esc": "Esc",
34 | "Send Escape": "Escape senden",
35 | "Ctrl+Alt+Del": "Strg+Alt+Entf",
36 | "Send Ctrl-Alt-Del": "Strg+Alt+Entf senden",
37 | "Shutdown/Reboot": "Herunterfahren/Neustarten",
38 | "Shutdown/Reboot...": "Herunterfahren/Neustarten...",
39 | "Power": "Energie",
40 | "Shutdown": "Herunterfahren",
41 | "Reboot": "Neustarten",
42 | "Reset": "Zurücksetzen",
43 | "Clipboard": "Zwischenablage",
44 | "Clear": "Löschen",
45 | "Fullscreen": "Vollbild",
46 | "Settings": "Einstellungen",
47 | "Shared Mode": "Geteilter Modus",
48 | "View Only": "Nur betrachten",
49 | "Clip to Window": "Auf Fenster begrenzen",
50 | "Scaling Mode:": "Skalierungsmodus:",
51 | "None": "Keiner",
52 | "Local Scaling": "Lokales skalieren",
53 | "Remote Resizing": "Serverseitiges skalieren",
54 | "Advanced": "Erweitert",
55 | "Repeater ID:": "Repeater ID:",
56 | "WebSocket": "WebSocket",
57 | "Encrypt": "Verschlüsselt",
58 | "Host:": "Server:",
59 | "Port:": "Port:",
60 | "Path:": "Pfad:",
61 | "Automatic Reconnect": "Automatisch wiederverbinden",
62 | "Reconnect Delay (ms):": "Wiederverbindungsverzögerung (ms):",
63 | "Logging:": "Protokollierung:",
64 | "Disconnect": "Verbindung trennen",
65 | "Connect": "Verbinden",
66 | "Password:": "Passwort:",
67 | "Cancel": "Abbrechen",
68 | "Canvas not supported.": "Canvas nicht unterstützt."
69 | }
--------------------------------------------------------------------------------
/novnc/core/input/vkeys.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright (C) 2017 Pierre Ossman for Cendio AB
4 | * Licensed under MPL 2.0 or any later version (see LICENSE.txt)
5 | */
6 |
7 | /*
8 | * Mapping between Microsoft® Windows® Virtual-Key codes and
9 | * HTML key codes.
10 | */
11 |
12 | export default {
13 | 0x08: 'Backspace',
14 | 0x09: 'Tab',
15 | 0x0a: 'NumpadClear',
16 | 0x0d: 'Enter',
17 | 0x10: 'ShiftLeft',
18 | 0x11: 'ControlLeft',
19 | 0x12: 'AltLeft',
20 | 0x13: 'Pause',
21 | 0x14: 'CapsLock',
22 | 0x15: 'Lang1',
23 | 0x19: 'Lang2',
24 | 0x1b: 'Escape',
25 | 0x1c: 'Convert',
26 | 0x1d: 'NonConvert',
27 | 0x20: 'Space',
28 | 0x21: 'PageUp',
29 | 0x22: 'PageDown',
30 | 0x23: 'End',
31 | 0x24: 'Home',
32 | 0x25: 'ArrowLeft',
33 | 0x26: 'ArrowUp',
34 | 0x27: 'ArrowRight',
35 | 0x28: 'ArrowDown',
36 | 0x29: 'Select',
37 | 0x2c: 'PrintScreen',
38 | 0x2d: 'Insert',
39 | 0x2e: 'Delete',
40 | 0x2f: 'Help',
41 | 0x30: 'Digit0',
42 | 0x31: 'Digit1',
43 | 0x32: 'Digit2',
44 | 0x33: 'Digit3',
45 | 0x34: 'Digit4',
46 | 0x35: 'Digit5',
47 | 0x36: 'Digit6',
48 | 0x37: 'Digit7',
49 | 0x38: 'Digit8',
50 | 0x39: 'Digit9',
51 | 0x5b: 'MetaLeft',
52 | 0x5c: 'MetaRight',
53 | 0x5d: 'ContextMenu',
54 | 0x5f: 'Sleep',
55 | 0x60: 'Numpad0',
56 | 0x61: 'Numpad1',
57 | 0x62: 'Numpad2',
58 | 0x63: 'Numpad3',
59 | 0x64: 'Numpad4',
60 | 0x65: 'Numpad5',
61 | 0x66: 'Numpad6',
62 | 0x67: 'Numpad7',
63 | 0x68: 'Numpad8',
64 | 0x69: 'Numpad9',
65 | 0x6a: 'NumpadMultiply',
66 | 0x6b: 'NumpadAdd',
67 | 0x6c: 'NumpadDecimal',
68 | 0x6d: 'NumpadSubtract',
69 | 0x6e: 'NumpadDecimal', // Duplicate, because buggy on Windows
70 | 0x6f: 'NumpadDivide',
71 | 0x70: 'F1',
72 | 0x71: 'F2',
73 | 0x72: 'F3',
74 | 0x73: 'F4',
75 | 0x74: 'F5',
76 | 0x75: 'F6',
77 | 0x76: 'F7',
78 | 0x77: 'F8',
79 | 0x78: 'F9',
80 | 0x79: 'F10',
81 | 0x7a: 'F11',
82 | 0x7b: 'F12',
83 | 0x7c: 'F13',
84 | 0x7d: 'F14',
85 | 0x7e: 'F15',
86 | 0x7f: 'F16',
87 | 0x80: 'F17',
88 | 0x81: 'F18',
89 | 0x82: 'F19',
90 | 0x83: 'F20',
91 | 0x84: 'F21',
92 | 0x85: 'F22',
93 | 0x86: 'F23',
94 | 0x87: 'F24',
95 | 0x90: 'NumLock',
96 | 0x91: 'ScrollLock',
97 | 0xa6: 'BrowserBack',
98 | 0xa7: 'BrowserForward',
99 | 0xa8: 'BrowserRefresh',
100 | 0xa9: 'BrowserStop',
101 | 0xaa: 'BrowserSearch',
102 | 0xab: 'BrowserFavorites',
103 | 0xac: 'BrowserHome',
104 | 0xad: 'AudioVolumeMute',
105 | 0xae: 'AudioVolumeDown',
106 | 0xaf: 'AudioVolumeUp',
107 | 0xb0: 'MediaTrackNext',
108 | 0xb1: 'MediaTrackPrevious',
109 | 0xb2: 'MediaStop',
110 | 0xb3: 'MediaPlayPause',
111 | 0xb4: 'LaunchMail',
112 | 0xb5: 'MediaSelect',
113 | 0xb6: 'LaunchApp1',
114 | 0xb7: 'LaunchApp2',
115 | 0xe1: 'AltRight', // Only when it is AltGraph
116 | };
117 |
--------------------------------------------------------------------------------
/novnc/app/locale/el.json:
--------------------------------------------------------------------------------
1 | {
2 | "Connecting...": "Συνδέεται...",
3 | "Disconnecting...": "Aποσυνδέεται...",
4 | "Reconnecting...": "Επανασυνδέεται...",
5 | "Internal error": "Εσωτερικό σφάλμα",
6 | "Must set host": "Πρέπει να οριστεί ο διακομιστής",
7 | "Connected (encrypted) to ": "Συνδέθηκε (κρυπτογραφημένα) με το ",
8 | "Connected (unencrypted) to ": "Συνδέθηκε (μη κρυπτογραφημένα) με το ",
9 | "Something went wrong, connection is closed": "Κάτι πήγε στραβά, η σύνδεση διακόπηκε",
10 | "Disconnected": "Αποσυνδέθηκε",
11 | "New connection has been rejected with reason: ": "Η νέα σύνδεση απορρίφθηκε διότι: ",
12 | "New connection has been rejected": "Η νέα σύνδεση απορρίφθηκε ",
13 | "Password is required": "Απαιτείται ο κωδικός πρόσβασης",
14 | "noVNC encountered an error:": "το noVNC αντιμετώπισε ένα σφάλμα:",
15 | "Hide/Show the control bar": "Απόκρυψη/Εμφάνιση γραμμής ελέγχου",
16 | "Move/Drag Viewport": "Μετακίνηση/Σύρσιμο Θεατού πεδίου",
17 | "viewport drag": "σύρσιμο θεατού πεδίου",
18 | "Active Mouse Button": "Ενεργό Πλήκτρο Ποντικιού",
19 | "No mousebutton": "Χωρίς Πλήκτρο Ποντικιού",
20 | "Left mousebutton": "Αριστερό Πλήκτρο Ποντικιού",
21 | "Middle mousebutton": "Μεσαίο Πλήκτρο Ποντικιού",
22 | "Right mousebutton": "Δεξί Πλήκτρο Ποντικιού",
23 | "Keyboard": "Πληκτρολόγιο",
24 | "Show Keyboard": "Εμφάνιση Πληκτρολογίου",
25 | "Extra keys": "Επιπλέον πλήκτρα",
26 | "Show Extra Keys": "Εμφάνιση Επιπλέον Πλήκτρων",
27 | "Ctrl": "Ctrl",
28 | "Toggle Ctrl": "Εναλλαγή Ctrl",
29 | "Alt": "Alt",
30 | "Toggle Alt": "Εναλλαγή Alt",
31 | "Send Tab": "Αποστολή Tab",
32 | "Tab": "Tab",
33 | "Esc": "Esc",
34 | "Send Escape": "Αποστολή Escape",
35 | "Ctrl+Alt+Del": "Ctrl+Alt+Del",
36 | "Send Ctrl-Alt-Del": "Αποστολή Ctrl-Alt-Del",
37 | "Shutdown/Reboot": "Κλείσιμο/Επανεκκίνηση",
38 | "Shutdown/Reboot...": "Κλείσιμο/Επανεκκίνηση...",
39 | "Power": "Απενεργοποίηση",
40 | "Shutdown": "Κλείσιμο",
41 | "Reboot": "Επανεκκίνηση",
42 | "Reset": "Επαναφορά",
43 | "Clipboard": "Πρόχειρο",
44 | "Clear": "Καθάρισμα",
45 | "Fullscreen": "Πλήρης Οθόνη",
46 | "Settings": "Ρυθμίσεις",
47 | "Shared Mode": "Κοινόχρηστη Λειτουργία",
48 | "View Only": "Μόνο Θέαση",
49 | "Clip to Window": "Αποκοπή στο όριο του Παράθυρου",
50 | "Scaling Mode:": "Λειτουργία Κλιμάκωσης:",
51 | "None": "Καμία",
52 | "Local Scaling": "Τοπική Κλιμάκωση",
53 | "Remote Resizing": "Απομακρυσμένη Αλλαγή μεγέθους",
54 | "Advanced": "Για προχωρημένους",
55 | "Repeater ID:": "Repeater ID:",
56 | "WebSocket": "WebSocket",
57 | "Encrypt": "Κρυπτογράφηση",
58 | "Host:": "Όνομα διακομιστή:",
59 | "Port:": "Πόρτα διακομιστή:",
60 | "Path:": "Διαδρομή:",
61 | "Automatic Reconnect": "Αυτόματη επανασύνδεση",
62 | "Reconnect Delay (ms):": "Καθυστέρηση επανασύνδεσης (ms):",
63 | "Logging:": "Καταγραφή:",
64 | "Disconnect": "Αποσύνδεση",
65 | "Connect": "Σύνδεση",
66 | "Password:": "Κωδικός Πρόσβασης:",
67 | "Cancel": "Ακύρωση",
68 | "Canvas not supported.": "Δεν υποστηρίζεται το στοιχείο Canvas"
69 | }
--------------------------------------------------------------------------------
/novnc/tests/test.localization.js:
--------------------------------------------------------------------------------
1 | var assert = chai.assert;
2 | var expect = chai.expect;
3 |
4 | import l10nGet, { l10n } from '../app/localization.js';
5 |
6 | describe('Localization', function() {
7 | "use strict";
8 |
9 | describe('language selection', function () {
10 | var origNavigator;
11 | beforeEach(function () {
12 | // window.navigator is a protected read-only property in many
13 | // environments, so we need to redefine it whilst running these
14 | // tests.
15 | origNavigator = Object.getOwnPropertyDescriptor(window, "navigator");
16 | if (origNavigator === undefined) {
17 | // Object.getOwnPropertyDescriptor() doesn't work
18 | // properly in any version of IE
19 | this.skip();
20 | }
21 |
22 | Object.defineProperty(window, "navigator", {value: {}});
23 | if (window.navigator.languages !== undefined) {
24 | // Object.defineProperty() doesn't work properly in old
25 | // versions of Chrome
26 | this.skip();
27 | }
28 |
29 | window.navigator.languages = [];
30 | });
31 | afterEach(function () {
32 | Object.defineProperty(window, "navigator", origNavigator);
33 | });
34 |
35 | it('should use English by default', function() {
36 | expect(l10n.language).to.equal('en');
37 | });
38 | it('should use English if no user language matches', function() {
39 | window.navigator.languages = ["nl", "de"];
40 | l10n.setup(["es", "fr"]);
41 | expect(l10n.language).to.equal('en');
42 | });
43 | it('should use the most preferred user language', function() {
44 | window.navigator.languages = ["nl", "de", "fr"];
45 | l10n.setup(["es", "fr", "de"]);
46 | expect(l10n.language).to.equal('de');
47 | });
48 | it('should prefer sub-languages languages', function() {
49 | window.navigator.languages = ["pt-BR"];
50 | l10n.setup(["pt", "pt-BR"]);
51 | expect(l10n.language).to.equal('pt-BR');
52 | });
53 | it('should fall back to language "parents"', function() {
54 | window.navigator.languages = ["pt-BR"];
55 | l10n.setup(["fr", "pt", "de"]);
56 | expect(l10n.language).to.equal('pt');
57 | });
58 | it('should not use specific language when user asks for a generic language', function() {
59 | window.navigator.languages = ["pt", "de"];
60 | l10n.setup(["fr", "pt-BR", "de"]);
61 | expect(l10n.language).to.equal('de');
62 | });
63 | it('should handle underscore as a separator', function() {
64 | window.navigator.languages = ["pt-BR"];
65 | l10n.setup(["pt_BR"]);
66 | expect(l10n.language).to.equal('pt_BR');
67 | });
68 | it('should handle difference in case', function() {
69 | window.navigator.languages = ["pt-br"];
70 | l10n.setup(["pt-BR"]);
71 | expect(l10n.language).to.equal('pt-BR');
72 | });
73 | });
74 | });
75 |
--------------------------------------------------------------------------------
/novnc/docs/EMBEDDING.md:
--------------------------------------------------------------------------------
1 | # Embedding and Deploying noVNC Application
2 |
3 | This document describes how to embed and deploy the noVNC application, which
4 | includes settings and a full user interface. If you are looking for
5 | documentation on how to use the core noVNC library in your own application,
6 | then please see our [library documentation](LIBRARY.md).
7 |
8 | ## Files
9 |
10 | The noVNC application consists of the following files and directories:
11 |
12 | * `vnc.html` - The main page for the application and where users should go. It
13 | is possible to rename this file.
14 |
15 | * `app/` - Support files for the application. Contains code, images, styles and
16 | translations.
17 |
18 | * `core/` - The core noVNC library.
19 |
20 | * `vendor/` - Third party support libraries used by the application and the
21 | core library.
22 |
23 | The most basic deployment consists of simply serving these files from a web
24 | server and setting up a WebSocket proxy to the VNC server.
25 |
26 | ## Parameters
27 |
28 | The noVNC application can be controlled by including certain settings in the
29 | query string. Currently the following options are available:
30 |
31 | * `autoconnect` - Automatically connect as soon as the page has finished
32 | loading.
33 |
34 | * `reconnect` - If noVNC should automatically reconnect if the connection is
35 | dropped.
36 |
37 | * `reconnect_delay` - How long to wait in milliseconds before attempting to
38 | reconnect.
39 |
40 | * `host` - The WebSocket host to connect to.
41 |
42 | * `port` - The WebSocket port to connect to.
43 |
44 | * `encrypt` - If TLS should be used for the WebSocket connection.
45 |
46 | * `path` - The WebSocket path to use.
47 |
48 | * `password` - The password sent to the server, if required.
49 |
50 | * `repeaterID` - The repeater ID to use if a VNC repeater is detected.
51 |
52 | * `shared` - If other VNC clients should be disconnected when noVNC connects.
53 |
54 | * `bell` - If the keyboard bell should be enabled or not.
55 |
56 | * `view_only` - If the remote session should be in non-interactive mode.
57 |
58 | * `view_clip` - If the remote session should be clipped or use scrollbars if
59 | it cannot fit in the browser.
60 |
61 | * `resize` - How to resize the remote session if it is not the same size as
62 | the browser window. Can be one of `off`, `scale` and `remote`.
63 |
64 | * `logging` - The console log level. Can be one of `error`, `warn`, `info` or
65 | `debug`.
66 |
67 | ## Pre-conversion of Modules
68 |
69 | noVNC is written using ECMAScript 6 modules. Many of the major browsers support
70 | these modules natively, but not all. By default the noVNC application includes
71 | a script that can convert these modules to an older format as they are being
72 | loaded. However this process can be slow and severely increases the load time
73 | for the application.
74 |
75 | It is possible to perform this conversion ahead of time, avoiding the extra
76 | load times. To do this please follow these steps:
77 |
78 | 1. Install Node.js
79 | 2. Run `npm install` in the noVNC directory
80 | 3. Run `./utils/use_require.js --with-app --as commonjs`
81 |
82 | This will produce a `build/` directory that includes everything needed to run
83 | the noVNC application.
84 |
--------------------------------------------------------------------------------
/novnc/app/images/tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
87 |
--------------------------------------------------------------------------------
/novnc/app/images/expander.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
70 |
--------------------------------------------------------------------------------
/novnc/app/images/settings.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
77 |
--------------------------------------------------------------------------------
/novnc/app/images/error.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
82 |
--------------------------------------------------------------------------------
/novnc/app/images/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
94 |
--------------------------------------------------------------------------------
/novnc/app/images/info.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
82 |
--------------------------------------------------------------------------------
/novnc/app/images/ctrlaltdel.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
101 |
--------------------------------------------------------------------------------
/novnc/utils/genkeysymdef.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | /*
3 | * genkeysymdef: X11 keysymdef.h to JavaScript converter
4 | * Copyright 2013 jalf
5 | * Copyright 2017 Pierre Ossman for Cendio AB
6 | * Licensed under MPL 2.0 (see LICENSE.txt)
7 | */
8 |
9 | "use strict";
10 |
11 | var fs = require('fs');
12 |
13 | var show_help = process.argv.length === 2;
14 | var filename;
15 |
16 | for (var i = 2; i < process.argv.length; ++i) {
17 | switch (process.argv[i]) {
18 | case "--help":
19 | case "-h":
20 | show_help = true;
21 | break;
22 | case "--file":
23 | case "-f":
24 | default:
25 | filename = process.argv[i];
26 | }
27 | }
28 |
29 | if (!filename) {
30 | show_help = true;
31 | console.log("Error: No filename specified\n");
32 | }
33 |
34 | if (show_help) {
35 | console.log("Parses a *nix keysymdef.h to generate Unicode code point mappings");
36 | console.log("Usage: node parse.js [options] filename:");
37 | console.log(" -h [ --help ] Produce this help message");
38 | console.log(" filename The keysymdef.h file to parse");
39 | return;
40 | }
41 |
42 | var buf = fs.readFileSync(filename);
43 | var str = buf.toString('utf8');
44 |
45 | var re = /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-fA-F]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/m;
46 |
47 | var arr = str.split('\n');
48 |
49 | var codepoints = {};
50 |
51 | for (var i = 0; i < arr.length; ++i) {
52 | var result = re.exec(arr[i]);
53 | if (result){
54 | var keyname = result[1];
55 | var keysym = parseInt(result[2], 16);
56 | var remainder = result[3];
57 |
58 | var unicodeRes = /U\+([0-9a-fA-F]+)/.exec(remainder);
59 | if (unicodeRes) {
60 | var unicode = parseInt(unicodeRes[1], 16);
61 | // The first entry is the preferred one
62 | if (!codepoints[unicode]){
63 | codepoints[unicode] = { keysym: keysym, name: keyname };
64 | }
65 | }
66 | }
67 | }
68 |
69 | var out =
70 | "/*\n" +
71 | " * Mapping from Unicode codepoints to X11/RFB keysyms\n" +
72 | " *\n" +
73 | " * This file was automatically generated from keysymdef.h\n" +
74 | " * DO NOT EDIT!\n" +
75 | " */\n" +
76 | "\n" +
77 | "/* Functions at the bottom */\n" +
78 | "\n" +
79 | "var codepoints = {\n";
80 |
81 | function toHex(num) {
82 | var s = num.toString(16);
83 | if (s.length < 4) {
84 | s = ("0000" + s).slice(-4);
85 | }
86 | return "0x" + s;
87 | };
88 |
89 | for (var codepoint in codepoints) {
90 | codepoint = parseInt(codepoint);
91 |
92 | // Latin-1?
93 | if ((codepoint >= 0x20) && (codepoint <= 0xff)) {
94 | continue;
95 | }
96 |
97 | // Handled by the general Unicode mapping?
98 | if ((codepoint | 0x01000000) === codepoints[codepoint].keysym) {
99 | continue;
100 | }
101 |
102 | out += " " + toHex(codepoint) + ": " +
103 | toHex(codepoints[codepoint].keysym) +
104 | ", // XK_" + codepoints[codepoint].name + "\n";
105 | }
106 |
107 | out +=
108 | "};\n" +
109 | "\n" +
110 | "export default {\n" +
111 | " lookup : function(u) {\n" +
112 | " // Latin-1 is one-to-one mapping\n" +
113 | " if ((u >= 0x20) && (u <= 0xff)) {\n" +
114 | " return u;\n" +
115 | " }\n" +
116 | "\n" +
117 | " // Lookup table (fairly random)\n" +
118 | " var keysym = codepoints[u];\n" +
119 | " if (keysym !== undefined) {\n" +
120 | " return keysym;\n" +
121 | " }\n" +
122 | "\n" +
123 | " // General mapping as final fallback\n" +
124 | " return 0x01000000 | u;\n" +
125 | " },\n" +
126 | "};";
127 |
128 | console.log(out);
129 |
--------------------------------------------------------------------------------
/novnc/app/images/connect.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
97 |
--------------------------------------------------------------------------------
/novnc/app/images/alt.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
93 |
--------------------------------------------------------------------------------
/novnc/po/xgettext-html:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | /*
3 | * xgettext-html: HTML gettext parser
4 | * Copyright (C) 2016 Pierre Ossman
5 | * Licensed under MPL 2.0 (see LICENSE.txt)
6 | */
7 |
8 | var getopt = require('node-getopt');
9 |
10 | var jsdom = require("jsdom");
11 | var fs = require("fs");
12 |
13 | opt = getopt.create([
14 | ['o' , 'output=FILE' , 'write output to specified file'],
15 | ['h' , 'help' , 'display this help'],
16 | ]).bindHelp().parseSystem();
17 |
18 | var strings = {};
19 |
20 | function addString(str, location) {
21 | if (str.length == 0) {
22 | return;
23 | }
24 |
25 | if (strings[str] === undefined) {
26 | strings[str] = {}
27 | }
28 | strings[str][location] = null;
29 | }
30 |
31 | // See https://html.spec.whatwg.org/multipage/dom.html#attr-translate
32 | function process(elem, locator, enabled) {
33 | function isAnyOf(searchElement, items) {
34 | return items.indexOf(searchElement) !== -1;
35 | }
36 |
37 | if (elem.hasAttribute("translate")) {
38 | if (isAnyOf(elem.getAttribute("translate"), ["", "yes"])) {
39 | enabled = true;
40 | } else if (isAnyOf(elem.getAttribute("translate"), ["no"])) {
41 | enabled = false;
42 | }
43 | }
44 |
45 | if (enabled) {
46 | if (elem.hasAttribute("abbr") &&
47 | elem.tagName === "TH") {
48 | addString(elem.getAttribute("abbr"), locator(elem));
49 | }
50 | if (elem.hasAttribute("alt") &&
51 | isAnyOf(elem.tagName, ["AREA", "IMG", "INPUT"])) {
52 | addString(elem.getAttribute("alt"), locator(elem));
53 | }
54 | if (elem.hasAttribute("download") &&
55 | isAnyOf(elem.tagName, ["A", "AREA"])) {
56 | addString(elem.getAttribute("download"), locator(elem));
57 | }
58 | if (elem.hasAttribute("label") &&
59 | isAnyOf(elem.tagName, ["MENUITEM", "MENU", "OPTGROUP",
60 | "OPTION", "TRACK"])) {
61 | addString(elem.getAttribute("label"), locator(elem));
62 | }
63 | if (elem.hasAttribute("placeholder") &&
64 | isAnyOf(elem.tagName in ["INPUT", "TEXTAREA"])) {
65 | addString(elem.getAttribute("placeholder"), locator(elem));
66 | }
67 | if (elem.hasAttribute("title")) {
68 | addString(elem.getAttribute("title"), locator(elem));
69 | }
70 | if (elem.hasAttribute("value") &&
71 | elem.tagName === "INPUT" &&
72 | isAnyOf(elem.getAttribute("type"), ["reset", "button", "submit"])) {
73 | addString(elem.getAttribute("value"), locator(elem));
74 | }
75 | }
76 |
77 | for (var i = 0;i < elem.childNodes.length;i++) {
78 | node = elem.childNodes[i];
79 | if (node.nodeType === node.ELEMENT_NODE) {
80 | process(node, locator, enabled);
81 | } else if (node.nodeType === node.TEXT_NODE && enabled) {
82 | addString(node.data.trim(), locator(node));
83 | }
84 | }
85 | }
86 |
87 | for (var i = 0;i < opt.argv.length;i++) {
88 | var file;
89 |
90 | fn = opt.argv[i];
91 | file = fs.readFileSync(fn, "utf8");
92 | dom = new jsdom.JSDOM(file, { includeNodeLocations: true });
93 | body = dom.window.document.body;
94 |
95 | locator = function (elem) {
96 | offset = dom.nodeLocation(elem).startOffset;
97 | line = file.slice(0, offset).split("\n").length;
98 | return fn + ":" + line;
99 | };
100 |
101 | process(body, locator, true);
102 | }
103 |
104 | var output = "";
105 |
106 | for (str in strings) {
107 | output += "#:";
108 | for (location in strings[str]) {
109 | output += " " + location;
110 | }
111 | output += "\n";
112 |
113 | output += "msgid " + JSON.stringify(str) + "\n";
114 | output += "msgstr \"\"\n";
115 | output += "\n";
116 | }
117 |
118 | fs.writeFileSync(opt.options.output, output);
119 |
--------------------------------------------------------------------------------
/novnc/app/images/warning.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
82 |
--------------------------------------------------------------------------------
/novnc/docs/rfb_notes:
--------------------------------------------------------------------------------
1 | 5.1.1 ProtocolVersion: 12, 12 bytes
2 |
3 | - Sent by server, max supported
4 | 12 ascii - "RFB 003.008\n"
5 | - Response by client, version to use
6 | 12 ascii - "RFB 003.003\n"
7 |
8 | 5.1.2 Authentication: >=4, [16, 4] bytes
9 |
10 | - Sent by server
11 | CARD32 - authentication-scheme
12 | 0 - connection failed
13 | CARD32 - length
14 | length - reason
15 | 1 - no authentication
16 |
17 | 2 - VNC authentication
18 | 16 CARD8 - challenge (random bytes)
19 |
20 | - Response by client (if VNC authentication)
21 | 16 CARD8 - client encrypts the challenge with DES, using user
22 | password as key, sends resulting 16 byte response
23 |
24 | - Response by server (if VNC authentication)
25 | CARD32 - 0 - OK
26 | 1 - failed
27 | 2 - too-many
28 |
29 | 5.1.3 ClientInitialisation: 1 byte
30 | - Sent by client
31 | CARD8 - shared-flag, 0 exclusive, non-zero shared
32 |
33 | 5.1.4 ServerInitialisation: >=24 bytes
34 | - Sent by server
35 | CARD16 - framebuffer-width
36 | CARD16 - framebuffer-height
37 | 16 byte PIXEL_FORMAT - server-pixel-format
38 | CARD8 - bits-per-pixel
39 | CARD8 - depth
40 | CARD8 - big-endian-flag, non-zero is big endian
41 | CARD8 - true-color-flag, non-zero then next 6 apply
42 | CARD16 - red-max
43 | CARD16 - green-max
44 | CARD16 - blue-max
45 | CARD8 - red-shift
46 | CARD8 - green-shift
47 | CARD8 - blue-shift
48 | 3 bytes - padding
49 | CARD32 - name-length
50 |
51 | CARD8[length] - name-string
52 |
53 |
54 |
55 | Client to Server Messages:
56 |
57 | 5.2.1 SetPixelFormat: 20 bytes
58 | CARD8: 0 - message-type
59 | ...
60 |
61 | 5.2.2 FixColourMapEntries: >=6 bytes
62 | CARD8: 1 - message-type
63 | ...
64 |
65 | 5.2.3 SetEncodings: >=8 bytes
66 | CARD8: 2 - message-type
67 | CARD8 - padding
68 | CARD16 - numer-of-encodings
69 |
70 | CARD32 - encoding-type in preference order
71 | 0 - raw
72 | 1 - copy-rectangle
73 | 2 - RRE
74 | 4 - CoRRE
75 | 5 - hextile
76 |
77 | 5.2.4 FramebufferUpdateRequest (10 bytes)
78 | CARD8: 3 - message-type
79 | CARD8 - incremental (0 for full-update, non-zero for incremental)
80 | CARD16 - x-position
81 | CARD16 - y-position
82 | CARD16 - width
83 | CARD16 - height
84 |
85 |
86 | 5.2.5 KeyEvent: 8 bytes
87 | CARD8: 4 - message-type
88 | CARD8 - down-flag
89 | 2 bytes - padding
90 | CARD32 - key (X-Windows keysym values)
91 |
92 | 5.2.6 PointerEvent: 6 bytes
93 | CARD8: 5 - message-type
94 | CARD8 - button-mask
95 | CARD16 - x-position
96 | CARD16 - y-position
97 |
98 | 5.2.7 ClientCutText: >=9 bytes
99 | CARD8: 6 - message-type
100 | ...
101 |
102 |
103 | Server to Client Messages:
104 |
105 | 5.3.1 FramebufferUpdate
106 | CARD8: 0 - message-type
107 | 1 byte - padding
108 | CARD16 - number-of-rectangles
109 |
110 | CARD16 - x-position
111 | CARD16 - y-position
112 | CARD16 - width
113 | CARD16 - height
114 | CARD16 - encoding-type:
115 | 0 - raw
116 | 1 - copy rectangle
117 | 2 - RRE
118 | 4 - CoRRE
119 | 5 - hextile
120 |
121 | raw:
122 | - width x height pixel values
123 |
124 | copy rectangle:
125 | CARD16 - src-x-position
126 | CARD16 - src-y-position
127 |
128 | RRE:
129 | CARD32 - N number-of-subrectangles
130 | Nxd bytes - background-pixel-value (d bits-per-pixel)
131 |
132 | ...
133 |
134 | 5.3.2 SetColourMapEntries (no support)
135 | CARD8: 1 - message-type
136 | ...
137 |
138 | 5.3.3 Bell
139 | CARD8: 2 - message-type
140 |
141 | 5.3.4 ServerCutText
142 | CARD8: 3 - message-type
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/novnc/app/images/power.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
88 |
--------------------------------------------------------------------------------
/novnc/core/input/fixedkeys.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright (C) 2017 Pierre Ossman for Cendio AB
4 | * Licensed under MPL 2.0 or any later version (see LICENSE.txt)
5 | */
6 |
7 | /*
8 | * Fallback mapping between HTML key codes (physical keys) and
9 | * HTML key values. This only works for keys that don't vary
10 | * between layouts. We also omit those who manage fine by mapping the
11 | * Unicode representation.
12 | *
13 | * See https://www.w3.org/TR/uievents-code/ for possible codes.
14 | * See https://www.w3.org/TR/uievents-key/ for possible values.
15 | */
16 |
17 | export default {
18 |
19 | // 3.1.1.1. Writing System Keys
20 |
21 | 'Backspace': 'Backspace',
22 |
23 | // 3.1.1.2. Functional Keys
24 |
25 | 'AltLeft': 'Alt',
26 | 'AltRight': 'Alt', // This could also be 'AltGraph'
27 | 'CapsLock': 'CapsLock',
28 | 'ContextMenu': 'ContextMenu',
29 | 'ControlLeft': 'Control',
30 | 'ControlRight': 'Control',
31 | 'Enter': 'Enter',
32 | 'MetaLeft': 'Meta',
33 | 'MetaRight': 'Meta',
34 | 'ShiftLeft': 'Shift',
35 | 'ShiftRight': 'Shift',
36 | 'Tab': 'Tab',
37 | // FIXME: Japanese/Korean keys
38 |
39 | // 3.1.2. Control Pad Section
40 |
41 | 'Delete': 'Delete',
42 | 'End': 'End',
43 | 'Help': 'Help',
44 | 'Home': 'Home',
45 | 'Insert': 'Insert',
46 | 'PageDown': 'PageDown',
47 | 'PageUp': 'PageUp',
48 |
49 | // 3.1.3. Arrow Pad Section
50 |
51 | 'ArrowDown': 'ArrowDown',
52 | 'ArrowLeft': 'ArrowLeft',
53 | 'ArrowRight': 'ArrowRight',
54 | 'ArrowUp': 'ArrowUp',
55 |
56 | // 3.1.4. Numpad Section
57 |
58 | 'NumLock': 'NumLock',
59 | 'NumpadBackspace': 'Backspace',
60 | 'NumpadClear': 'Clear',
61 |
62 | // 3.1.5. Function Section
63 |
64 | 'Escape': 'Escape',
65 | 'F1': 'F1',
66 | 'F2': 'F2',
67 | 'F3': 'F3',
68 | 'F4': 'F4',
69 | 'F5': 'F5',
70 | 'F6': 'F6',
71 | 'F7': 'F7',
72 | 'F8': 'F8',
73 | 'F9': 'F9',
74 | 'F10': 'F10',
75 | 'F11': 'F11',
76 | 'F12': 'F12',
77 | 'F13': 'F13',
78 | 'F14': 'F14',
79 | 'F15': 'F15',
80 | 'F16': 'F16',
81 | 'F17': 'F17',
82 | 'F18': 'F18',
83 | 'F19': 'F19',
84 | 'F20': 'F20',
85 | 'F21': 'F21',
86 | 'F22': 'F22',
87 | 'F23': 'F23',
88 | 'F24': 'F24',
89 | 'F25': 'F25',
90 | 'F26': 'F26',
91 | 'F27': 'F27',
92 | 'F28': 'F28',
93 | 'F29': 'F29',
94 | 'F30': 'F30',
95 | 'F31': 'F31',
96 | 'F32': 'F32',
97 | 'F33': 'F33',
98 | 'F34': 'F34',
99 | 'F35': 'F35',
100 | 'PrintScreen': 'PrintScreen',
101 | 'ScrollLock': 'ScrollLock',
102 | 'Pause': 'Pause',
103 |
104 | // 3.1.6. Media Keys
105 |
106 | 'BrowserBack': 'BrowserBack',
107 | 'BrowserFavorites': 'BrowserFavorites',
108 | 'BrowserForward': 'BrowserForward',
109 | 'BrowserHome': 'BrowserHome',
110 | 'BrowserRefresh': 'BrowserRefresh',
111 | 'BrowserSearch': 'BrowserSearch',
112 | 'BrowserStop': 'BrowserStop',
113 | 'Eject': 'Eject',
114 | 'LaunchApp1': 'LaunchMyComputer',
115 | 'LaunchApp2': 'LaunchCalendar',
116 | 'LaunchMail': 'LaunchMail',
117 | 'MediaPlayPause': 'MediaPlay',
118 | 'MediaStop': 'MediaStop',
119 | 'MediaTrackNext': 'MediaTrackNext',
120 | 'MediaTrackPrevious': 'MediaTrackPrevious',
121 | 'Power': 'Power',
122 | 'Sleep': 'Sleep',
123 | 'AudioVolumeDown': 'AudioVolumeDown',
124 | 'AudioVolumeMute': 'AudioVolumeMute',
125 | 'AudioVolumeUp': 'AudioVolumeUp',
126 | 'WakeUp': 'WakeUp',
127 | };
128 |
--------------------------------------------------------------------------------
/novnc/tests/assertions.js:
--------------------------------------------------------------------------------
1 | // Assertions that make it easier to use sinon
2 | import sinonChai from '../node_modules/sinon-chai/lib/sinon-chai.js';
3 | chai.use(sinonChai);
4 |
5 | // noVNC specific assertions
6 | chai.use(function (_chai, utils) {
7 | _chai.Assertion.addMethod('displayed', function (target_data) {
8 | var obj = this._obj;
9 | var ctx = obj._target.getContext('2d');
10 | var data_cl = ctx.getImageData(0, 0, obj._target.width, obj._target.height).data;
11 | // NB(directxman12): PhantomJS 1.x doesn't implement Uint8ClampedArray, so work around that
12 | var data = new Uint8Array(data_cl);
13 | var len = data_cl.length;
14 | new chai.Assertion(len).to.be.equal(target_data.length, "unexpected display size");
15 | var same = true;
16 | for (var i = 0; i < len; i++) {
17 | if (data[i] != target_data[i]) {
18 | same = false;
19 | break;
20 | }
21 | }
22 | if (!same) {
23 | console.log("expected data: %o, actual data: %o", target_data, data);
24 | }
25 | this.assert(same,
26 | "expected #{this} to have displayed the image #{exp}, but instead it displayed #{act}",
27 | "expected #{this} not to have displayed the image #{act}",
28 | target_data,
29 | data);
30 | });
31 |
32 | _chai.Assertion.addMethod('sent', function (target_data) {
33 | var obj = this._obj;
34 | obj.inspect = function () {
35 | var res = { _websocket: obj._websocket, rQi: obj._rQi, _rQ: new Uint8Array(obj._rQ.buffer, 0, obj._rQlen),
36 | _sQ: new Uint8Array(obj._sQ.buffer, 0, obj._sQlen) };
37 | res.prototype = obj;
38 | return res;
39 | };
40 | var data = obj._websocket._get_sent_data();
41 | var same = true;
42 | if (data.length != target_data.length) {
43 | same = false;
44 | } else {
45 | for (var i = 0; i < data.length; i++) {
46 | if (data[i] != target_data[i]) {
47 | same = false;
48 | break;
49 | }
50 | }
51 | }
52 | if (!same) {
53 | console.log("expected data: %o, actual data: %o", target_data, data);
54 | }
55 | this.assert(same,
56 | "expected #{this} to have sent the data #{exp}, but it actually sent #{act}",
57 | "expected #{this} not to have sent the data #{act}",
58 | Array.prototype.slice.call(target_data),
59 | Array.prototype.slice.call(data));
60 | });
61 |
62 | _chai.Assertion.addProperty('array', function () {
63 | utils.flag(this, 'array', true);
64 | });
65 |
66 | _chai.Assertion.overwriteMethod('equal', function (_super) {
67 | return function assertArrayEqual(target) {
68 | if (utils.flag(this, 'array')) {
69 | var obj = this._obj;
70 |
71 | var i;
72 | var same = true;
73 |
74 | if (utils.flag(this, 'deep')) {
75 | for (i = 0; i < obj.length; i++) {
76 | if (!utils.eql(obj[i], target[i])) {
77 | same = false;
78 | break;
79 | }
80 | }
81 |
82 | this.assert(same,
83 | "expected #{this} to have elements deeply equal to #{exp}",
84 | "expected #{this} not to have elements deeply equal to #{exp}",
85 | Array.prototype.slice.call(target));
86 | } else {
87 | for (i = 0; i < obj.length; i++) {
88 | if (obj[i] != target[i]) {
89 | same = false;
90 | break;
91 | }
92 | }
93 |
94 | this.assert(same,
95 | "expected #{this} to have elements equal to #{exp}",
96 | "expected #{this} not to have elements equal to #{exp}",
97 | Array.prototype.slice.call(target));
98 | }
99 | } else {
100 | _super.apply(this, arguments);
101 | }
102 | };
103 | });
104 | });
105 |
--------------------------------------------------------------------------------
/novnc/app/images/clipboard.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
107 |
--------------------------------------------------------------------------------
/novnc/docs/LICENSE.OFL-1.1:
--------------------------------------------------------------------------------
1 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
2 | This license is copied below, and is also available with a FAQ at:
3 | http://scripts.sil.org/OFL
4 |
5 |
6 | -----------------------------------------------------------
7 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
8 | -----------------------------------------------------------
9 |
10 | PREAMBLE
11 | The goals of the Open Font License (OFL) are to stimulate worldwide
12 | development of collaborative font projects, to support the font creation
13 | efforts of academic and linguistic communities, and to provide a free and
14 | open framework in which fonts may be shared and improved in partnership
15 | with others.
16 |
17 | The OFL allows the licensed fonts to be used, studied, modified and
18 | redistributed freely as long as they are not sold by themselves. The
19 | fonts, including any derivative works, can be bundled, embedded,
20 | redistributed and/or sold with any software provided that any reserved
21 | names are not used by derivative works. The fonts and derivatives,
22 | however, cannot be released under any other type of license. The
23 | requirement for fonts to remain under this license does not apply
24 | to any document created using the fonts or their derivatives.
25 |
26 | DEFINITIONS
27 | "Font Software" refers to the set of files released by the Copyright
28 | Holder(s) under this license and clearly marked as such. This may
29 | include source files, build scripts and documentation.
30 |
31 | "Reserved Font Name" refers to any names specified as such after the
32 | copyright statement(s).
33 |
34 | "Original Version" refers to the collection of Font Software components as
35 | distributed by the Copyright Holder(s).
36 |
37 | "Modified Version" refers to any derivative made by adding to, deleting,
38 | or substituting -- in part or in whole -- any of the components of the
39 | Original Version, by changing formats or by porting the Font Software to a
40 | new environment.
41 |
42 | "Author" refers to any designer, engineer, programmer, technical
43 | writer or other person who contributed to the Font Software.
44 |
45 | PERMISSION & CONDITIONS
46 | Permission is hereby granted, free of charge, to any person obtaining
47 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
48 | redistribute, and sell modified and unmodified copies of the Font
49 | Software, subject to the following conditions:
50 |
51 | 1) Neither the Font Software nor any of its individual components,
52 | in Original or Modified Versions, may be sold by itself.
53 |
54 | 2) Original or Modified Versions of the Font Software may be bundled,
55 | redistributed and/or sold with any software, provided that each copy
56 | contains the above copyright notice and this license. These can be
57 | included either as stand-alone text files, human-readable headers or
58 | in the appropriate machine-readable metadata fields within text or
59 | binary files as long as those fields can be easily viewed by the user.
60 |
61 | 3) No Modified Version of the Font Software may use the Reserved Font
62 | Name(s) unless explicit written permission is granted by the corresponding
63 | Copyright Holder. This restriction only applies to the primary font name as
64 | presented to the users.
65 |
66 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
67 | Software shall not be used to promote, endorse or advertise any
68 | Modified Version, except to acknowledge the contribution(s) of the
69 | Copyright Holder(s) and the Author(s) or with their explicit written
70 | permission.
71 |
72 | 5) The Font Software, modified or unmodified, in part or in whole,
73 | must be distributed entirely under this license, and must not be
74 | distributed under any other license. The requirement for fonts to
75 | remain under this license does not apply to any document created
76 | using the Font Software.
77 |
78 | TERMINATION
79 | This license becomes null and void if any of the above conditions are
80 | not met.
81 |
82 | DISCLAIMER
83 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
84 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
85 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
86 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
87 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
88 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
89 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
90 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
91 | OTHER DEALINGS IN THE FONT SOFTWARE.
92 |
--------------------------------------------------------------------------------
/novnc/app/images/ctrl.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
97 |
--------------------------------------------------------------------------------
/novnc/app/images/toggleextrakeys.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
91 |
--------------------------------------------------------------------------------
/novnc/app/images/esc.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
93 |
--------------------------------------------------------------------------------
/novnc/core/base64.js:
--------------------------------------------------------------------------------
1 | /* This Source Code Form is subject to the terms of the Mozilla Public
2 | * License, v. 2.0. If a copy of the MPL was not distributed with this
3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 |
5 | // From: http://hg.mozilla.org/mozilla-central/raw-file/ec10630b1a54/js/src/devtools/jint/sunspider/string-base64.js
6 |
7 | import * as Log from './util/logging.js';
8 |
9 | export default {
10 | /* Convert data (an array of integers) to a Base64 string. */
11 | toBase64Table : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='.split(''),
12 | base64Pad : '=',
13 |
14 | encode: function (data) {
15 | "use strict";
16 | var result = '';
17 | var toBase64Table = this.toBase64Table;
18 | var length = data.length;
19 | var lengthpad = (length % 3);
20 | // Convert every three bytes to 4 ascii characters.
21 |
22 | for (var i = 0; i < (length - 2); i += 3) {
23 | result += toBase64Table[data[i] >> 2];
24 | result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)];
25 | result += toBase64Table[((data[i + 1] & 0x0f) << 2) + (data[i + 2] >> 6)];
26 | result += toBase64Table[data[i + 2] & 0x3f];
27 | }
28 |
29 | // Convert the remaining 1 or 2 bytes, pad out to 4 characters.
30 | var j = 0;
31 | if (lengthpad === 2) {
32 | j = length - lengthpad;
33 | result += toBase64Table[data[j] >> 2];
34 | result += toBase64Table[((data[j] & 0x03) << 4) + (data[j + 1] >> 4)];
35 | result += toBase64Table[(data[j + 1] & 0x0f) << 2];
36 | result += toBase64Table[64];
37 | } else if (lengthpad === 1) {
38 | j = length - lengthpad;
39 | result += toBase64Table[data[j] >> 2];
40 | result += toBase64Table[(data[j] & 0x03) << 4];
41 | result += toBase64Table[64];
42 | result += toBase64Table[64];
43 | }
44 |
45 | return result;
46 | },
47 |
48 | /* Convert Base64 data to a string */
49 | toBinaryTable : [
50 | -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
51 | -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
52 | -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
53 | 52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
54 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
55 | 15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
56 | -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
57 | 41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
58 | ],
59 |
60 | decode: function (data, offset) {
61 | "use strict";
62 | offset = typeof(offset) !== 'undefined' ? offset : 0;
63 | var toBinaryTable = this.toBinaryTable;
64 | var base64Pad = this.base64Pad;
65 | var result, result_length;
66 | var leftbits = 0; // number of bits decoded, but yet to be appended
67 | var leftdata = 0; // bits decoded, but yet to be appended
68 | var data_length = data.indexOf('=') - offset;
69 |
70 | if (data_length < 0) { data_length = data.length - offset; }
71 |
72 | /* Every four characters is 3 resulting numbers */
73 | result_length = (data_length >> 2) * 3 + Math.floor((data_length % 4) / 1.5);
74 | result = new Array(result_length);
75 |
76 | // Convert one by one.
77 | for (var idx = 0, i = offset; i < data.length; i++) {
78 | var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
79 | var padding = (data.charAt(i) === base64Pad);
80 | // Skip illegal characters and whitespace
81 | if (c === -1) {
82 | Log.Error("Illegal character code " + data.charCodeAt(i) + " at position " + i);
83 | continue;
84 | }
85 |
86 | // Collect data into leftdata, update bitcount
87 | leftdata = (leftdata << 6) | c;
88 | leftbits += 6;
89 |
90 | // If we have 8 or more bits, append 8 bits to the result
91 | if (leftbits >= 8) {
92 | leftbits -= 8;
93 | // Append if not padding.
94 | if (!padding) {
95 | result[idx++] = (leftdata >> leftbits) & 0xff;
96 | }
97 | leftdata &= (1 << leftbits) - 1;
98 | }
99 | }
100 |
101 | // If there are any bits left, the base64 string was corrupted
102 | if (leftbits) {
103 | err = new Error('Corrupted base64 string');
104 | err.name = 'Base64-Error';
105 | throw err;
106 | }
107 |
108 | return result;
109 | }
110 | }; /* End of Base64 namespace */
111 |
--------------------------------------------------------------------------------
/novnc/core/util/events.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright (C) 2012 Joel Martin
4 | * Licensed under MPL 2.0 (see LICENSE.txt)
5 | *
6 | * See README.md for usage and integration instructions.
7 | */
8 |
9 | /*
10 | * Cross-browser event and position routines
11 | */
12 |
13 | export function getPointerEvent (e) {
14 | return e.changedTouches ? e.changedTouches[0] : e.touches ? e.touches[0] : e;
15 | };
16 |
17 | export function stopEvent (e) {
18 | e.stopPropagation();
19 | e.preventDefault();
20 | };
21 |
22 | // Emulate Element.setCapture() when not supported
23 | var _captureRecursion = false;
24 | var _captureElem = null;
25 | function _captureProxy(e) {
26 | // Recursion protection as we'll see our own event
27 | if (_captureRecursion) return;
28 |
29 | // Clone the event as we cannot dispatch an already dispatched event
30 | var newEv = new e.constructor(e.type, e);
31 |
32 | _captureRecursion = true;
33 | _captureElem.dispatchEvent(newEv);
34 | _captureRecursion = false;
35 |
36 | // Avoid double events
37 | e.stopPropagation();
38 |
39 | // Respect the wishes of the redirected event handlers
40 | if (newEv.defaultPrevented) {
41 | e.preventDefault();
42 | }
43 |
44 | // Implicitly release the capture on button release
45 | if (e.type === "mouseup") {
46 | releaseCapture();
47 | }
48 | };
49 |
50 | // Follow cursor style of target element
51 | function _captureElemChanged() {
52 | var captureElem = document.getElementById("noVNC_mouse_capture_elem");
53 | captureElem.style.cursor = window.getComputedStyle(_captureElem).cursor;
54 | };
55 | var _captureObserver = new MutationObserver(_captureElemChanged);
56 |
57 | var _captureIndex = 0;
58 |
59 | export function setCapture (elem) {
60 | if (elem.setCapture) {
61 |
62 | elem.setCapture();
63 |
64 | // IE releases capture on 'click' events which might not trigger
65 | elem.addEventListener('mouseup', releaseCapture);
66 |
67 | } else {
68 | // Release any existing capture in case this method is
69 | // called multiple times without coordination
70 | releaseCapture();
71 |
72 | var captureElem = document.getElementById("noVNC_mouse_capture_elem");
73 |
74 | if (captureElem === null) {
75 | captureElem = document.createElement("div");
76 | captureElem.id = "noVNC_mouse_capture_elem";
77 | captureElem.style.position = "fixed";
78 | captureElem.style.top = "0px";
79 | captureElem.style.left = "0px";
80 | captureElem.style.width = "100%";
81 | captureElem.style.height = "100%";
82 | captureElem.style.zIndex = 10000;
83 | captureElem.style.display = "none";
84 | document.body.appendChild(captureElem);
85 |
86 | // This is to make sure callers don't get confused by having
87 | // our blocking element as the target
88 | captureElem.addEventListener('contextmenu', _captureProxy);
89 |
90 | captureElem.addEventListener('mousemove', _captureProxy);
91 | captureElem.addEventListener('mouseup', _captureProxy);
92 | }
93 |
94 | _captureElem = elem;
95 | _captureIndex++;
96 |
97 | // Track cursor and get initial cursor
98 | _captureObserver.observe(elem, {attributes:true});
99 | _captureElemChanged();
100 |
101 | captureElem.style.display = "";
102 |
103 | // We listen to events on window in order to keep tracking if it
104 | // happens to leave the viewport
105 | window.addEventListener('mousemove', _captureProxy);
106 | window.addEventListener('mouseup', _captureProxy);
107 | }
108 | };
109 |
110 | export function releaseCapture () {
111 | if (document.releaseCapture) {
112 |
113 | document.releaseCapture();
114 |
115 | } else {
116 | if (!_captureElem) {
117 | return;
118 | }
119 |
120 | // There might be events already queued, so we need to wait for
121 | // them to flush. E.g. contextmenu in Microsoft Edge
122 | window.setTimeout(function(expected) {
123 | // Only clear it if it's the expected grab (i.e. no one
124 | // else has initiated a new grab)
125 | if (_captureIndex === expected) {
126 | _captureElem = null;
127 | }
128 | }, 0, _captureIndex);
129 |
130 | _captureObserver.disconnect();
131 |
132 | var captureElem = document.getElementById("noVNC_mouse_capture_elem");
133 | captureElem.style.display = "none";
134 |
135 | window.removeEventListener('mousemove', _captureProxy);
136 | window.removeEventListener('mouseup', _captureProxy);
137 | }
138 | };
139 |
--------------------------------------------------------------------------------
/novnc/app/images/drag.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
77 |
--------------------------------------------------------------------------------
/novnc/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration
2 |
3 | module.exports = function(config) {
4 | var customLaunchers = {};
5 | var browsers = [];
6 | var useSauce = false;
7 |
8 | // use Sauce when running on Travis
9 | if (process.env.TRAVIS_JOB_NUMBER) {
10 | useSauce = true;
11 | }
12 |
13 | if (useSauce && process.env.TEST_BROWSER_NAME && process.env.TEST_BROWSER_NAME != 'PhantomJS') {
14 | var names = process.env.TEST_BROWSER_NAME.split(',');
15 | var platforms = process.env.TEST_BROWSER_OS.split(',');
16 | var versions = [];
17 | if (process.env.TEST_BROWSER_VERSION) {
18 | versions = process.env.TEST_BROWSER_VERSION.split(',');
19 | } else {
20 | versions = [null];
21 | }
22 |
23 | for (var i = 0; i < names.length; i++) {
24 | for (var j = 0; j < platforms.length; j++) {
25 | for (var k = 0; k < versions.length; k++) {
26 | var launcher_name = 'sl_' + platforms[j].replace(/[^a-zA-Z0-9]/g, '') + '_' + names[i];
27 | if (versions[k]) {
28 | launcher_name += '_' + versions[k];
29 | }
30 |
31 | customLaunchers[launcher_name] = {
32 | base: 'SauceLabs',
33 | browserName: names[i],
34 | platform: platforms[j],
35 | };
36 |
37 | if (versions[i]) {
38 | customLaunchers[launcher_name].version = versions[k];
39 | }
40 | }
41 | }
42 | }
43 |
44 | browsers = Object.keys(customLaunchers);
45 | } else {
46 | useSauce = false;
47 | //browsers = ['PhantomJS'];
48 | browsers = [];
49 | }
50 |
51 | var my_conf = {
52 |
53 | // base path that will be used to resolve all patterns (eg. files, exclude)
54 | basePath: '',
55 |
56 | // frameworks to use
57 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
58 | frameworks: ['requirejs', 'mocha', 'chai'],
59 |
60 | // list of files / patterns to load in the browser (loaded in order)
61 | files: [
62 | { pattern: 'vendor/sinon.js', included: false },
63 | { pattern: 'node_modules/sinon-chai/lib/sinon-chai.js', included: false },
64 | { pattern: 'app/localization.js', included: false },
65 | { pattern: 'core/**/*.js', included: false },
66 | { pattern: 'vendor/pako/**/*.js', included: false },
67 | { pattern: 'tests/test.*.js', included: false },
68 | { pattern: 'tests/fake.*.js', included: false },
69 | { pattern: 'tests/assertions.js', included: false },
70 | 'tests/karma-test-main.js',
71 | ],
72 |
73 | client: {
74 | mocha: {
75 | // replace Karma debug page with mocha display
76 | 'reporter': 'html',
77 | 'ui': 'bdd'
78 | }
79 | },
80 |
81 | // list of files to exclude
82 | exclude: [
83 | ],
84 |
85 | customLaunchers: customLaunchers,
86 |
87 | // start these browsers
88 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
89 | browsers: browsers,
90 |
91 | // preprocess matching files before serving them to the browser
92 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
93 | preprocessors: {
94 | 'app/localization.js': ['babel'],
95 | 'core/**/*.js': ['babel'],
96 | 'tests/test.*.js': ['babel'],
97 | 'tests/fake.*.js': ['babel'],
98 | 'tests/assertions.js': ['babel'],
99 | 'vendor/pako/**/*.js': ['babel'],
100 | },
101 |
102 | babelPreprocessor: {
103 | options: {
104 | plugins: ['transform-es2015-modules-amd', 'syntax-dynamic-import'],
105 | sourceMap: 'inline',
106 | },
107 | },
108 |
109 | // test results reporter to use
110 | // possible values: 'dots', 'progress'
111 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
112 | reporters: ['mocha'],
113 |
114 |
115 | // web server port
116 | port: 9876,
117 |
118 |
119 | // enable / disable colors in the output (reporters and logs)
120 | colors: true,
121 |
122 |
123 | // level of logging
124 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
125 | logLevel: config.LOG_INFO,
126 |
127 |
128 | // enable / disable watching file and executing tests whenever any file changes
129 | autoWatch: false,
130 |
131 | // Continuous Integration mode
132 | // if true, Karma captures browsers, runs the tests and exits
133 | singleRun: true,
134 |
135 | // Increase timeout in case connection is slow/we run more browsers than possible
136 | // (we currently get 3 for free, and we try to run 7, so it can take a while)
137 | captureTimeout: 240000,
138 |
139 | // similarly to above
140 | browserNoActivityTimeout: 100000,
141 | };
142 |
143 | if (useSauce) {
144 | my_conf.reporters.push('saucelabs');
145 | my_conf.captureTimeout = 0; // use SL timeout
146 | my_conf.sauceLabs = {
147 | testName: 'noVNC Tests (all)',
148 | startConnect: false,
149 | tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
150 | };
151 | }
152 |
153 | config.set(my_conf);
154 | };
155 |
--------------------------------------------------------------------------------
/novnc/app/images/disconnect.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
95 |
--------------------------------------------------------------------------------
/novnc/utils/launch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Copyright 2016 Joel Martin
4 | # Copyright 2016 Solly Ross
5 | # Licensed under MPL 2.0 or any later version (see LICENSE.txt)
6 |
7 | usage() {
8 | if [ "$*" ]; then
9 | echo "$*"
10 | echo
11 | fi
12 | echo "Usage: ${NAME} [--listen PORT] [--vnc VNC_HOST:PORT] [--cert CERT] [--ssl-only]"
13 | echo
14 | echo "Starts the WebSockets proxy and a mini-webserver and "
15 | echo "provides a cut-and-paste URL to go to."
16 | echo
17 | echo " --listen PORT Port for proxy/webserver to listen on"
18 | echo " Default: 6080"
19 | echo " --vnc VNC_HOST:PORT VNC server host:port proxy target"
20 | echo " Default: localhost:5900"
21 | echo " --cert CERT Path to combined cert/key file"
22 | echo " Default: self.pem"
23 | echo " --web WEB Path to web files (e.g. vnc.html)"
24 | echo " Default: ./"
25 | echo " --ssl-only Disable non-https connections."
26 | echo " "
27 | exit 2
28 | }
29 |
30 | NAME="$(basename $0)"
31 | REAL_NAME="$(readlink -f $0)"
32 | HERE="$(cd "$(dirname "$REAL_NAME")" && pwd)"
33 | PORT="6080"
34 | VNC_DEST="localhost:5900"
35 | CERT=""
36 | WEB=""
37 | proxy_pid=""
38 | SSLONLY=""
39 |
40 | die() {
41 | echo "$*"
42 | exit 1
43 | }
44 |
45 | cleanup() {
46 | trap - TERM QUIT INT EXIT
47 | trap "true" CHLD # Ignore cleanup messages
48 | echo
49 | if [ -n "${proxy_pid}" ]; then
50 | echo "Terminating WebSockets proxy (${proxy_pid})"
51 | kill ${proxy_pid}
52 | fi
53 | }
54 |
55 | # Process Arguments
56 |
57 | # Arguments that only apply to chrooter itself
58 | while [ "$*" ]; do
59 | param=$1; shift; OPTARG=$1
60 | case $param in
61 | --listen) PORT="${OPTARG}"; shift ;;
62 | --vnc) VNC_DEST="${OPTARG}"; shift ;;
63 | --cert) CERT="${OPTARG}"; shift ;;
64 | --web) WEB="${OPTARG}"; shift ;;
65 | --ssl-only) SSLONLY="--ssl-only" ;;
66 | -h|--help) usage ;;
67 | -*) usage "Unknown chrooter option: ${param}" ;;
68 | *) break ;;
69 | esac
70 | done
71 |
72 | # Sanity checks
73 | which netstat >/dev/null 2>&1 \
74 | || die "Must have netstat installed"
75 |
76 | netstat -ltn | grep -qs ":${PORT} .*LISTEN" \
77 | && die "Port ${PORT} in use. Try --listen PORT"
78 |
79 | trap "cleanup" TERM QUIT INT EXIT
80 |
81 | # Find vnc.html
82 | if [ -n "${WEB}" ]; then
83 | if [ ! -e "${WEB}/vnc.html" ]; then
84 | die "Could not find ${WEB}/vnc.html"
85 | fi
86 | elif [ -e "$(pwd)/vnc.html" ]; then
87 | WEB=$(pwd)
88 | elif [ -e "${HERE}/../vnc.html" ]; then
89 | WEB=${HERE}/../
90 | elif [ -e "${HERE}/vnc.html" ]; then
91 | WEB=${HERE}
92 | elif [ -e "${HERE}/../share/novnc/vnc.html" ]; then
93 | WEB=${HERE}/../share/novnc/
94 | else
95 | die "Could not find vnc.html"
96 | fi
97 |
98 | # Find self.pem
99 | if [ -n "${CERT}" ]; then
100 | if [ ! -e "${CERT}" ]; then
101 | die "Could not find ${CERT}"
102 | fi
103 | elif [ -e "$(pwd)/self.pem" ]; then
104 | CERT="$(pwd)/self.pem"
105 | elif [ -e "${HERE}/../self.pem" ]; then
106 | CERT="${HERE}/../self.pem"
107 | elif [ -e "${HERE}/self.pem" ]; then
108 | CERT="${HERE}/self.pem"
109 | else
110 | echo "Warning: could not find self.pem"
111 | fi
112 |
113 | # try to find websockify (prefer local, try global, then download local)
114 | if [[ -e ${HERE}/websockify ]]; then
115 | WEBSOCKIFY=${HERE}/websockify/run
116 |
117 | if [[ ! -x $WEBSOCKIFY ]]; then
118 | echo "The path ${HERE}/websockify exists, but $WEBSOCKIFY either does not exist or is not executable."
119 | echo "If you intended to use an installed websockify package, please remove ${HERE}/websockify."
120 | exit 1
121 | fi
122 |
123 | echo "Using local websockify at $WEBSOCKIFY"
124 | else
125 | WEBSOCKIFY=$(which websockify 2>/dev/null)
126 |
127 | if [[ $? -ne 0 ]]; then
128 | echo "No installed websockify, attempting to clone websockify..."
129 | WEBSOCKIFY=${HERE}/websockify/run
130 | git clone https://github.com/novnc/websockify ${HERE}/websockify
131 |
132 | if [[ ! -e $WEBSOCKIFY ]]; then
133 | echo "Unable to locate ${HERE}/websockify/run after downloading"
134 | exit 1
135 | fi
136 |
137 | echo "Using local websockify at $WEBSOCKIFY"
138 | else
139 | echo "Using installed websockify at $WEBSOCKIFY"
140 | fi
141 | fi
142 |
143 | echo "Starting webserver and WebSockets proxy on port ${PORT}"
144 | #${HERE}/websockify --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
145 | ${WEBSOCKIFY} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
146 | proxy_pid="$!"
147 | sleep 1
148 | if ! ps -p ${proxy_pid} >/dev/null; then
149 | proxy_pid=
150 | echo "Failed to start WebSockets proxy"
151 | exit 1
152 | fi
153 |
154 | echo -e "\n\nNavigate to this URL:\n"
155 | if [ "x$SSLONLY" == "x" ]; then
156 | echo -e " http://$(hostname):${PORT}/vnc.html?host=$(hostname)&port=${PORT}\n"
157 | else
158 | echo -e " https://$(hostname):${PORT}/vnc.html?host=$(hostname)&port=${PORT}\n"
159 | fi
160 |
161 | echo -e "Press Ctrl-C to exit\n\n"
162 |
163 | wait ${proxy_pid}
164 |
--------------------------------------------------------------------------------