├── utils
├── wsproxy.py
├── Makefile
├── rebind
├── README.md
├── img2js.py
├── web.py
├── rebind.c
├── launch.sh
├── websockify
└── websocket.py
├── favicon.ico
├── .gitignore
├── tests
├── face.png
├── base64.js
├── arrays.html
├── stats.js
├── input.html
├── face.png.js
├── base64.html
├── keyboard.html
├── vnc_playback.html
├── cursor.html
├── canvas.html
├── vnc_perf.html
├── json2graph.py
└── arrays.js
├── images
├── favicon.ico
├── favicon.png
├── full_512x512.png
└── screen_640x435.png
├── docs
├── rfbproto-3.3.pdf
├── rfbproto-3.7.pdf
├── rfbproto-3.8.pdf
├── flash_policy.txt
├── notes
├── TODO
├── links
├── rfb_notes
└── LICENSE.LGPL-3
├── include
├── web-socket-js
│ ├── WebSocketMain.swf
│ ├── README.txt
│ ├── swfobject.js
│ └── web_socket.js
├── vnc.js
├── plain.css
├── playback.js
├── black.css
├── webutil.js
├── base64.js
├── util.js
├── websock.js
├── des.js
└── ui.js
├── LICENSE.txt
├── vnc.html
├── README.md
└── vnc_auto.html
/utils/wsproxy.py:
--------------------------------------------------------------------------------
1 | websockify
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
1 | images/favicon.ico
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.o
3 | wsproxy
4 | tests/data_*.js
5 |
--------------------------------------------------------------------------------
/tests/face.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/tests/face.png
--------------------------------------------------------------------------------
/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/images/favicon.ico
--------------------------------------------------------------------------------
/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/images/favicon.png
--------------------------------------------------------------------------------
/docs/rfbproto-3.3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/docs/rfbproto-3.3.pdf
--------------------------------------------------------------------------------
/docs/rfbproto-3.7.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/docs/rfbproto-3.7.pdf
--------------------------------------------------------------------------------
/docs/rfbproto-3.8.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/docs/rfbproto-3.8.pdf
--------------------------------------------------------------------------------
/images/full_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/images/full_512x512.png
--------------------------------------------------------------------------------
/images/screen_640x435.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/images/screen_640x435.png
--------------------------------------------------------------------------------
/include/web-socket-js/WebSocketMain.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Todo/noVNC/master/include/web-socket-js/WebSocketMain.swf
--------------------------------------------------------------------------------
/utils/Makefile:
--------------------------------------------------------------------------------
1 | TARGETS=rebind.so
2 | CFLAGS += -fPIC
3 |
4 | all: $(TARGETS)
5 |
6 | rebind.so: rebind.o
7 | $(CC) $(LDFLAGS) $^ -shared -fPIC -ldl -o $@
8 |
9 | clean:
10 | rm -f rebind.o rebind.so
11 |
12 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/tests/base64.js:
--------------------------------------------------------------------------------
1 | // The following results in 'hello [MANGLED]'
2 | //
3 | // Filed as https://github.com/ry/node/issues/issue/402
4 |
5 | var sys = require("sys"),
6 | buf = new Buffer(1024), len,
7 | str1 = "aGVsbG8g", // 'hello '
8 | str2 = "d29ybGQ=", // 'world'
9 |
10 | len = buf.write(str1, 0, 'base64');
11 | len += buf.write(str2, len, 'base64');
12 | sys.log("decoded result: " + buf.toString('binary', 0, len));
13 |
--------------------------------------------------------------------------------
/utils/rebind:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | usage() {
4 | echo "Usage: $(basename $0) OLD_PORT NEW_PORT COMMAND_LINE"
5 | echo
6 | echo "Launch COMMAND_LINE, but intercept system calls to bind"
7 | echo "to OLD_PORT and instead bind them to localhost:NEW_PORT"
8 | exit 2
9 | }
10 |
11 | # Parameter defaults
12 | mydir=$(readlink -f $(dirname ${0}))
13 |
14 | export REBIND_PORT_OLD="${1}"; shift
15 | export REBIND_PORT_NEW="${1}"; shift
16 |
17 | LD_PRELOAD=${mydir}/rebind.so "${@}"
18 |
19 |
--------------------------------------------------------------------------------
/utils/README.md:
--------------------------------------------------------------------------------
1 | ## WebSockets Proxy
2 |
3 | wsproxy has become [websockify](https://github.com/kanaka/websockify).
4 | A copy of the python version of websockify (named wsproxy.py) is kept
5 | here for ease of use. The other versions of websockify (C, Node.js)
6 | and the associated test programs have been moved to
7 | [websockify](https://github.com/kanaka/websockify).
8 |
9 | For more detailed description and usage information please refer to
10 | the [websockify README](https://github.com/kanaka/websockify/blob/master/README.md).
11 |
12 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | noVNC is licensed under the LGPL version 3 (see docs/LICENSE.GPL-3 and
2 | docs/LICENSE.LGPL-3) with the following exceptions:
3 |
4 | include/base64.js : Dual GPL-2 or LGPL-2.1
5 |
6 | incluee/des.js : Various BSD style licenses
7 |
8 | include/web-socket-js/ : New BSD license. Source code at
9 | http://github.com/gimite/web-socket-js
10 |
11 | images/ : Creative Commons Attribution-ShareAlike
12 | http://creativecommons.org/licenses/by-sa/3.0/
13 | Uses of the work must be attributed
14 | to the noVNC project.
15 |
--------------------------------------------------------------------------------
/docs/notes:
--------------------------------------------------------------------------------
1 | Some implementation notes:
2 |
3 | There is an included flash object (web-socket-js) that is used to
4 | emulate websocket support on browsers without websocket support
5 | (currently only Chrome has WebSocket support).
6 |
7 | Javascript doesn't have a bytearray type, so what you get out of
8 | a WebSocket object is just Javascript strings. Javascript has UTF-16
9 | unicode strings and anything sent through the WebSocket gets converted
10 | to UTF-8 and vice-versa. So, one additional (and necessary) function
11 | of wsproxy is base64 encoding/decoding what is sent to/from the
12 | browser.
13 |
14 | Building web-socket-js emulator:
15 |
16 | cd include/web-socket-js/flash-src
17 | mxmlc -static-link-runtime-shared-libraries WebSocketMain.as
18 |
--------------------------------------------------------------------------------
/vnc.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 | noVNC
10 |
11 |
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 | Loading
23 |
24 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/utils/img2js.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | #
4 | # Convert image to Javascript compatible base64 Data URI
5 | # Copyright 2011 Joel Martin
6 | # Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3)
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 |
--------------------------------------------------------------------------------
/include/vnc.js:
--------------------------------------------------------------------------------
1 | /*
2 | * noVNC: HTML5 VNC client
3 | * Copyright (C) 2010 Joel Martin
4 | * Licensed under LGPL-3 (see LICENSE.txt)
5 | *
6 | * See README.md for usage and integration instructions.
7 | */
8 |
9 | "use strict";
10 | /*jslint evil: true */
11 | /*global window, document, INCLUDE_URI */
12 |
13 | /*
14 | * Load supporting scripts
15 | */
16 | function get_INCLUDE_URI() {
17 | return (typeof INCLUDE_URI !== "undefined") ? INCLUDE_URI : "include/";
18 | }
19 |
20 | (function () {
21 | var extra = "", start, end;
22 |
23 | start = "
8 | -->
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Javascript Arrays Performance Test
17 | Iterations:
18 | Array Size: *1024
19 |
20 |
22 |
23 |
24 | Results:
25 |
26 |
27 |
28 |
29 |
30 |
31 |
39 |