]> git.proxmox.com Git - mirror_novnc.git/log
mirror_novnc.git
13 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Fri, 7 Jan 2011 00:33:22 +0000 (17:33 -0700)]
Merge branch 'master' of git@github.com:kanaka/noVNC

13 years agowsproxy: warn when no cert. C sock close cleanup.
Joel Martin [Tue, 4 Jan 2011 19:14:46 +0000 (13:14 -0600)]
wsproxy: warn when no cert. C sock close cleanup.

Warn early about no SSL cert and add clearer warning when a connection
comes in as SSL but no cert file exists.

For the C version, cleanup closing of the connection socket. Use
shutdown for a cleaner cleanup with the client.

13 years agoREADME: add companies/projects using noVNC.
Joel Martin [Tue, 4 Jan 2011 18:19:54 +0000 (12:19 -0600)]
README: add companies/projects using noVNC.

13 years agoinclude/canvas.js: show full user agent in console.
Joel Martin [Tue, 4 Jan 2011 16:30:26 +0000 (10:30 -0600)]
include/canvas.js: show full user agent in console.

13 years agoinclude/rfb.js: show Flash version in console.
Joel Martin [Tue, 4 Jan 2011 16:27:25 +0000 (10:27 -0600)]
include/rfb.js: show Flash version in console.

13 years agoExpose getKeysym and add keyboard test.
Joel Martin [Mon, 3 Jan 2011 18:34:41 +0000 (12:34 -0600)]
Expose getKeysym and add keyboard test.

Related to issue Non-US keyboard layout option issue:
https://github.com/kanaka/noVNC/issues#issue/21

13 years agoutils/README.md, docs/TODO, docs/notes: updates.
Joel Martin [Thu, 30 Dec 2010 18:00:50 +0000 (11:00 -0700)]
utils/README.md, docs/TODO, docs/notes: updates.

Add wswrapper info to utils/README.md and docs/TODO. Remove innacurate
info from docs/notes.

13 years agowswrapper: update README, DO_MSG def for output.
Joel Martin [Wed, 29 Dec 2010 21:11:28 +0000 (14:11 -0700)]
wswrapper: update README, DO_MSG def for output.

Update README to mention wswrapper. Add DO_MSG define which controls
whether wswrapper code generates basic output.

13 years agowswrapper: interpose on poll/ppoll also.
Joel Martin [Tue, 28 Dec 2010 02:44:14 +0000 (19:44 -0700)]
wswrapper: interpose on poll/ppoll also.

poll/ppoll interposer builds but is untested.

13 years agowswrapper: timeout select.
Joel Martin [Mon, 27 Dec 2010 23:08:27 +0000 (16:08 -0700)]
wswrapper: timeout select.

The select call needs to timeout if a WebSocket socket keeps reporting
ready but actually isn't ready. To prevent it hanging forever in that
condition, the timeout value is now adjusted now for each call.

Move the DO_DEBUG and DO_TRACE settings to wswrapper.c.

13 years agowswrapper: interpose select/pselect. Cleaup.
Joel Martin [Mon, 27 Dec 2010 20:15:59 +0000 (13:15 -0700)]
wswrapper: interpose select/pselect. Cleaup.

Interpose on select/pselect so that WebSockets sockets are only
reported as ready if they have enough to actually decode at least
1 byte of real data. This prevents hanging in read/recv after
WebSocket is reported as ready but is not actually ready because empty
frames or less than four base64 bytes have been received.

Split defines and constant defintions into wswrapper.h.

Cleanup debug output and add TRACE for more detailed tracing debug
output.

Major TODO is that select needs to timeout if WebSocket socket keeps
reporting ready but actually isn't ready. That condition will
currently hang forever because the select timeout value is not
adjusted when looping.

13 years agoFix to "Tolerate fragmented ServerInit".
Joel Martin [Sat, 25 Dec 2010 00:39:13 +0000 (17:39 -0700)]
Fix to "Tolerate fragmented ServerInit".

Issue #39: https://github.com/kanaka/noVNC/issues/issue/39

13 years agoTolerate fragmented ServerInit.
Joel Martin [Fri, 24 Dec 2010 22:02:48 +0000 (15:02 -0700)]
Tolerate fragmented ServerInit.

Issue #39: https://github.com/kanaka/noVNC/issues/issue/39

13 years agoutils/launch.sh: find top web dir (with vnc.html).
Joel Martin [Tue, 21 Dec 2010 16:17:43 +0000 (10:17 -0600)]
utils/launch.sh: find top web dir (with vnc.html).

13 years agouse cd, dirname, and pwd to determine path instead of readlink (Mac fix)
Amir Malik [Tue, 21 Dec 2010 02:02:43 +0000 (10:02 +0800)]
use cd, dirname, and pwd to determine path instead of readlink (Mac fix)

13 years agoset socket option SO_REUSEADDR to prevent "Address already in use" error
Amir Malik [Tue, 21 Dec 2010 02:11:15 +0000 (10:11 +0800)]
set socket option SO_REUSEADDR to prevent  "Address already in use" error

13 years agowswrapper: fix preload path and interpose port.
Joel Martin [Thu, 16 Dec 2010 20:04:16 +0000 (14:04 -0600)]
wswrapper: fix preload path and interpose port.

Make path to ld preload library absolute so wswrapper works even if
path is changed before main program is executed (i.e. by the vncserver
wrapper script).

bind() was using the return value for the port number, but it's
actually the original port number that we should interpose on in the
bind() routine.

13 years agowswrapper: Normalize comments, remove unused headers.
Joel Martin [Tue, 14 Dec 2010 18:05:17 +0000 (13:05 -0500)]
wswrapper: Normalize comments, remove unused headers.

13 years agowswrapper: Allow multiple WebSockets connections.
Joel Martin [Tue, 14 Dec 2010 17:43:34 +0000 (12:43 -0500)]
wswrapper: Allow multiple WebSockets connections.

Allocate buffer and state memory for each accepted connection. This
allows all WebSockets connections to a given listen port to be wrapped
with WebSockets support.

13 years agowswrap: WSWRAP_PORT envvar and wswrap script.
Joel Martin [Mon, 13 Dec 2010 19:20:34 +0000 (14:20 -0500)]
wswrap: WSWRAP_PORT envvar and wswrap script.

wswrapper.so will only interpose on the listen port specified in
WSWRAP_PORT.

Add simple wswrap script that sets the WSWRAP_PORT, LD_PRELOAD and
invokes the command line to wrap.

13 years agoMake compatible with jQuery. Slight API change.
Joel Martin [Fri, 10 Dec 2010 14:25:36 +0000 (08:25 -0600)]
Make compatible with jQuery. Slight API change.

Rename the $() selector to $D() so that it doesn't collide with
the jQuery name.

The API change is that the 'target' option for Canvas and RFB objects
must now be a DOM Canvas element. A string is no longer accepted
because this requires that a DOM lookup is done and the Canvas and RFB
should have no UI code in them. Modularity.

13 years agowswrapper: wrap existing server using LD_PRELOAD.
Joel Martin [Fri, 3 Dec 2010 04:11:02 +0000 (22:11 -0600)]
wswrapper: wrap existing server using LD_PRELOAD.

wswrapper.so is LD_PRELOAD shared library that interposes and turns
a generic TCP socket into a WebSockets service.

This current version works but will only allow work for a single
connection, subsequent connections will not be wrapped. In addition
the wrapper interposes on the first incoming network connection. It
should read an environment variable to determine the port to interpose
on. Also, should limit origin based on another environment variable.
Then there should be a wswrap setup script that allows easier
invocation.

13 years agorfb.js: avoid multiple b64 sequences per frame.
Joel Martin [Mon, 15 Nov 2010 18:43:26 +0000 (13:43 -0500)]
rfb.js: avoid multiple b64 sequences per frame.

Only call encode_message when the WebSockets object is actually
ready to send. Otherwise multiple base64 encode sequences can be
encoded into the same WebSockets frame. This causes the C version of
wsproxy to crash and the python version to ignore the subsequent
base64 sequence(s).

Thanks to Colin Dean (xvpsource.org) for finding this and helping
track it down.

13 years agoRename default_controls.js to ui.js.
Joel Martin [Wed, 10 Nov 2010 22:02:19 +0000 (16:02 -0600)]
Rename default_controls.js to ui.js.

And DefaultControls to UI.

13 years agoAdd Chrome Frame support. Close requests in web.py.
Joel Martin [Tue, 9 Nov 2010 18:06:03 +0000 (12:06 -0600)]
Add Chrome Frame support. Close requests in web.py.

- Add meta tag to vnc.html and vnc_auto.html so that if Chrome Frame
  is installed, it is used.

- Add detection to default_controls.js that shows a message with
  a Chrome Frame install link if the user is using a version of IE
  without Canvas support.

- Fix web.py so that requests have their connection closed after they
  are completed.  This has been a bug for a while but it prevents
  Chrome Frame from working because Chrome Frame doesn't activate
  until the initial request connection closes.

13 years agowsproxy.js: Fix multi-frame decoding.
Joel Martin [Mon, 8 Nov 2010 04:28:08 +0000 (22:28 -0600)]
wsproxy.js: Fix multi-frame decoding.

- Also, discovered node.js bug in base64 decoding. Added test case and
  filed https://github.com/ry/node/issues/issue/402

13 years agoFirst pass at wsproxy using node (node.js).
Joel Martin [Mon, 8 Nov 2010 01:06:20 +0000 (19:06 -0600)]
First pass at wsproxy using node (node.js).

Node:
    http://nodejs.org/
    https://github.com/ry/node

It mostly works, but it eventually gets an error from the target which
is probably due to missing support for re-assembly of client
WebSockets frames.

13 years agowsproxy: Fix --key parameter use.
Joel Martin [Sat, 6 Nov 2010 19:12:37 +0000 (14:12 -0500)]
wsproxy: Fix --key parameter use.

13 years agoFix flush with strict DOCTYPE.
Joel Martin [Sat, 6 Nov 2010 19:11:30 +0000 (14:11 -0500)]
Fix flush with strict DOCTYPE.

- With a strict doctype, the margin size needs a "px" suffix.

13 years agocanvas.js: workaround WebKit bug, issue #28.
Joel Martin [Sat, 6 Nov 2010 17:23:23 +0000 (12:23 -0500)]
canvas.js: workaround WebKit bug, issue #28.

This is WebKit bug https://bugs.webkit.org/show_bug.cgi?id=46319

The workaround is to wrap Canvas render functions with a function that
sets a flush timer. The flush function sets the right margin and then
1ms later sets it back. This triggers the canvas to redraw with the
correct contents.

Two downsides:
- rendering is slower, but only on the busted versions of webkit.
  Correct and useful is better than fast and useless.
- There is a barely perceptible jitter of the control buttons because
  the canvas size is changing by one pixel.

To support this functionality, we also have to read out the exact
webkit version from the user agent in the render engine detection code
in include/util.js.

13 years agodefault_controls.js: canvas fail fix. Misc cleanup.
Joel Martin [Sat, 6 Nov 2010 17:15:08 +0000 (12:15 -0500)]
default_controls.js: canvas fail fix. Misc cleanup.

- Make sure that canvas exists (i.e. didn't throw an error) before
  trying to call canvas method get_canvas_uri.

- Typos in HTML render engine debug output.

13 years agoAdd --key option for separate cert and key file.
Joel Martin [Sat, 6 Nov 2010 15:55:09 +0000 (10:55 -0500)]
Add --key option for separate cert and key file.

If only --cert is specified then continue to assume both certificate
and key are in the same file (key first).

13 years agoRemove left over record code. Squelch compile warnings
Joel Martin [Sat, 6 Nov 2010 15:53:32 +0000 (10:53 -0500)]
Remove left over record code. Squelch compile warnings

13 years agowsproxy: Mac OS X build fixes
François Revol [Sat, 6 Nov 2010 13:49:59 +0000 (14:49 +0100)]
wsproxy: Mac OS X build fixes

- pass CFLAGS and LDFLAGS in case one needs to use -m32
- link to libcrypto for _ERR_print_errors_fp
- __THROW is non-standard define it to nothing by default
- use b64_ntop and b64_pton instead of mangled versions, OSX doesn't mangle them in the same way
- access() takes two arguments!

Signed-off-by: François Revol <revol@free.fr>
13 years agoIssue #34: fix RFB 3.3/3.7 with no auth scheme.
Joel Martin [Thu, 28 Oct 2010 21:30:41 +0000 (16:30 -0500)]
Issue #34: fix RFB 3.3/3.7 with no auth scheme.

- Split out ClientInitialisation state.

- In version 3.3 and 3.7, when the server has no auth (scheme
  1), then we should skip from Authentication to ClientInitialisation.

13 years agoutils/README.md: second try on cmd formatting.
Joel Martin [Thu, 28 Oct 2010 15:53:08 +0000 (10:53 -0500)]
utils/README.md: second try on cmd formatting.

13 years agoutils/README.md: Fix command formatting.
Joel Martin [Thu, 28 Oct 2010 15:52:27 +0000 (10:52 -0500)]
utils/README.md: Fix command formatting.

13 years agoIssue #32, wsproxy README, update webkit bug info,
Joel Martin [Thu, 28 Oct 2010 15:45:26 +0000 (10:45 -0500)]
Issue #32, wsproxy README, update webkit bug info,

- Add wsproxy README.md in utils/ directory.

- Document how to build ssl module for python 2.5 and older in wsproxy
  README.

- Update browsers.md to note revision that have the webkit Canvas
  rendering bug: WebKit build 66396 through 68867 (Chrome/Chromium
  build 57968 through 61278).

13 years agoExpose VNC shared mode setting in UIs.
Joel Martin [Sun, 24 Oct 2010 23:34:50 +0000 (18:34 -0500)]
Expose VNC shared mode setting in UIs.

If shared mode is false, then the server should disconnect other
connections before the current connection is allowed to proceed.

13 years agoFix style caching. Canvas cleanup from Diet-noVNC.
Joel Martin [Mon, 18 Oct 2010 19:30:50 +0000 (14:30 -0500)]
Fix style caching. Canvas cleanup from Diet-noVNC.

- Style caching gives a small performance speedup in firefox, but not
  much. Might not be worth complexity, but leave it in for now.

13 years agoFix reason_len not defined bug.
Joel Martin [Thu, 14 Oct 2010 16:07:54 +0000 (11:07 -0500)]
Fix reason_len not defined bug.

13 years agorfb.js: fail() wrapper for common failed pattern.
Joel Martin [Thu, 14 Oct 2010 15:09:33 +0000 (10:09 -0500)]
rfb.js: fail() wrapper for common failed pattern.

13 years agoAdd manual flash policy socat server info.
Joel Martin [Sun, 10 Oct 2010 23:59:02 +0000 (18:59 -0500)]
Add manual flash policy socat server info.

13 years agoutils/Makefile: clean up md5.o too.
Joel Martin [Mon, 4 Oct 2010 17:30:53 +0000 (13:30 -0400)]
utils/Makefile: clean up md5.o too.

13 years agorfb.js: rQwait, cuttext simplification.
Joel Martin [Fri, 1 Oct 2010 16:50:22 +0000 (11:50 -0500)]
rfb.js: rQwait, cuttext simplification.

- rQwait checks the receive queue to see if there is enough data to
  satisfy the following request. If not it returns true (which is
  almost always translated into an immediate return false by the
  caller).

- rQwait is called quite a bit and this generally allows 4 lines to
  become 1 line where it is called.

- rQwait allows simplification of cuttext processing. No global
  tracking needed anymore.

Overall, about 60 lines less code.

13 years agoinclude/des.js: trim some fat.
Joel Martin [Thu, 30 Sep 2010 16:17:52 +0000 (11:17 -0500)]
include/des.js: trim some fat.

DES is just used once during authentication and is not performance
sensitive so we save some space by generating and/or removing some
lookup tables. Also, shorten some very frequently used variables.

Shaves off about 100 lines.

13 years agowebutil.js, util.js: split cleanup.
Joel Martin [Wed, 29 Sep 2010 20:05:27 +0000 (15:05 -0500)]
webutil.js, util.js: split cleanup.

13 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Wed, 29 Sep 2010 20:01:01 +0000 (15:01 -0500)]
Merge branch 'master' of git@github.com:kanaka/noVNC

13 years agoSplit util into two file:
Antoine Mercadal [Wed, 29 Sep 2010 19:11:23 +0000 (03:11 +0800)]
Split util into two file:
 - util.js that contains essential functions
 - webutils.js that contains the GUI utility function.js

this helps to include noVNC in other project, especially Cappuccino Application
i

13 years agodes.js: remove decrypt and simplify.
Joel Martin [Wed, 29 Sep 2010 19:48:19 +0000 (14:48 -0500)]
des.js: remove decrypt and simplify.

The decrypt functionality is never used so remove it. Also, we can
assume that we are always DES encrypting 16 characters which allows
several things to be simplified in DES.

Overall this removes about 80 lines of code.

13 years agoShow rect/enc counts, add vnc_perf.html test.
Joel Martin [Sat, 25 Sep 2010 20:50:43 +0000 (15:50 -0500)]
Show rect/enc counts, add vnc_perf.html test.

- include/rfb.js: Keep track of the number of rects of each encoding
  type and print them out when we close a connection (if 'info'
  logging level).

- tests/vnc_perf.html: first pass at a noVNC based performance
  benchmark.

- utils/wsproxy.py: Fix the output of the record filename.

13 years agorfb.js, canvas.js: status feedback on Canvas functionality.
Joel Martin [Fri, 24 Sep 2010 15:47:39 +0000 (10:47 -0500)]
rfb.js, canvas.js: status feedback on Canvas functionality.

Read the render mode selected by canvas and report it in the initial
page loaded status message.

13 years agodocs/browsers.md: noVNC webkit bug link format.
Joel Martin [Fri, 24 Sep 2010 15:46:59 +0000 (10:46 -0500)]
docs/browsers.md: noVNC webkit bug link format.

13 years agoREADME.md: move browser page link.
Joel Martin [Fri, 24 Sep 2010 15:45:33 +0000 (10:45 -0500)]
README.md: move browser page link.

13 years agoREADME.md: add link to browsers.md, update requirements.
Joel Martin [Fri, 24 Sep 2010 15:29:42 +0000 (10:29 -0500)]
README.md: add link to browsers.md, update requirements.

13 years agodocs/browsers.md: Separate browser support page.
Joel Martin [Fri, 24 Sep 2010 14:59:54 +0000 (09:59 -0500)]
docs/browsers.md: Separate browser support page.

13 years agoRefactor settings object, add connectTimeout setting.
Joel Martin [Thu, 23 Sep 2010 14:39:24 +0000 (09:39 -0500)]
Refactor settings object, add connectTimeout setting.

- include/util.js: Add type and desc field to conf_default routine.
  Make comment descriptions of settings into desc parameters that can
  be queried. Also, use set_FOO in conf_default to set or coerce the
  current setting so that we always have the right type for the value.

- include/rfb.js, include/default_config.js: add connectTimeout
  setting to address situations with slow connections that may need
  more than 2 seconds.

13 years agorfb.js: wait for SecurityResult failure reason bytes.
Joel Martin [Thu, 23 Sep 2010 14:17:09 +0000 (09:17 -0500)]
rfb.js: wait for SecurityResult failure reason bytes.

Yet another weird VNC server behavior: sending a failure and length
before the reason message. To calculated the length, the reason string
is already available, why not just send everything as one packet. Oh
well.

13 years agoMisc cleanup: debug logging, record filename, etc.
Joel Martin [Thu, 23 Sep 2010 13:17:00 +0000 (08:17 -0500)]
Misc cleanup: debug logging, record filename, etc.

- include/canvas.js: When 'debug' logging, show browser detection
  values.
- test/canvas.html: Only restore the canvas to it's starting state if
  the logging level is not 'debug'.
- wsproxy.py: Append the session number to the record filename so that
  multiple sessions don't stomp on each other.

13 years agoutil.js: detect firefox 4.X correctly.
Joel Martin [Thu, 23 Sep 2010 13:08:08 +0000 (08:08 -0500)]
util.js: detect firefox 4.X correctly.

Update the browser detection code (from mootools) with a fix that
detects firefox 4.0 correctly.

13 years agologging: add Util.get_logging(), canvas clearing.
Joel Martin [Wed, 22 Sep 2010 22:11:57 +0000 (17:11 -0500)]
logging: add Util.get_logging(), canvas clearing.

Only clear canvas if log level is not debug instead of using
'#__debug__' in the URL.

13 years agoplayback.js: move to include/ for easier reference.
Joel Martin [Wed, 22 Sep 2010 21:55:06 +0000 (16:55 -0500)]
playback.js: move to include/ for easier reference.

Easier to reference from web site (gh-pages branch).

13 years agoNo local cursor by default due to issues #27, #29.
Joel Martin [Mon, 20 Sep 2010 21:15:40 +0000 (16:15 -0500)]
No local cursor by default due to issues #27, #29.

In Safari, local cursor rendering is corrupt. In firefox 3.6.10, local
cursor rendering causes a segfault. Probable that the .cur format is
not 100% compliant (even though it works in Chrome and firefox 3.5 and
firefox 4.0). So just disable it by default until I can figure out how
to address the problems.

13 years agoC proxy: Issue #14: wss:// from Safari
Joel Martin [Wed, 15 Sep 2010 23:21:42 +0000 (18:21 -0500)]
C proxy: Issue #14: wss:// from Safari

Addresses this issue:
http://github.com/kanaka/noVNC/issues#issue/14

This goes along with commit 7e63919e6 but for the C proxy.

13 years agoAPI change: add sendKey() to manually send key code.
Joel Martin [Wed, 15 Sep 2010 23:14:27 +0000 (18:14 -0500)]
API change: add sendKey() to manually send key code.

RFB.sendKey(code, down)

If down is not specified then both a down followed by an up code will
be sent.

13 years agoproxy: Issue #14: detect and allow wss:// from Safari.
Joel Martin [Wed, 15 Sep 2010 17:09:17 +0000 (12:09 -0500)]
proxy: Issue #14: detect and allow wss:// from Safari.

Addresses this issue:
http://github.com/kanaka/noVNC/issues#issue/14

Safari starts with '\x80' rather than '\x16' like Chrome and Firefox
and having PROTOCOL_TLSv1 doesn't work with Safari. But just removing
the ssl_version allows things to work with Safari wss:// connections.

Also, if the handshake (after SSL wrapping) is null then terminate the
connection. This probably means the certificate was refused by the
client. Unfortunately Safari (the version I have) doesn't cleanly
shutdown WebSockets connections until the page is reloaded (even if
the object is no longer referenced).

13 years agorfb.js: state refactor, add 'disconnect' state.
Joel Martin [Sat, 11 Sep 2010 20:31:50 +0000 (15:31 -0500)]
rfb.js: state refactor, add 'disconnect' state.

Add a new state 'disconnect' to reflect that we are not truly
'disconnected' until we get an onclose event. Add a disconnect timer
to match.

Handle disconnected cleanup better in updateState(). Anytime we enter
in a disconnect/disconnected state, make sure all running state is
cleaned up (WebSocket, timers, canvas).

13 years agoproxy: always multiprocess and add --verbose.
Joel Martin [Sat, 11 Sep 2010 20:10:54 +0000 (15:10 -0500)]
proxy: always multiprocess and add --verbose.

Always fork handlers processes. Instead printing traffic when
single-processing, print traffic if verbose flag given.

13 years agoweb-socket-js (issue #37): close() when connecting
Joel Martin [Sat, 11 Sep 2010 18:52:49 +0000 (13:52 -0500)]
web-socket-js (issue #37): close() when connecting

Filed this issue for this bug:
http://github.com/gimite/web-socket-js/issues/issue/37

Right now the close() call only calls __flash.close() if readyState is OPEN.
But it should really call close any time that readyState is not CLOSED or
CLOSING.

The case I ran into is when I want to do the following:
1. make a test connection
2. tell the server to setup for a connection
3. connect again

I call close on the test connection, but since it is ignored when CONNECTING,
it eventually times out with a error. But by that time I have already issued a
new connection, it causes the new connection to fail. close() should cancel
CONNECTING state too.

13 years agogimite/web-socket-js issue #35: async onclose.
Joel Martin [Sat, 11 Sep 2010 17:44:39 +0000 (12:44 -0500)]
gimite/web-socket-js issue #35: async onclose.

Filed this bug about this issue:
http://github.com/gimite/web-socket-js/issues#issue/35

To work around the flash "recursive call" problem, WebSocket.as has
the onclose event disabled in the close() call and the javascript half
of the close() call does the onclose() call instead. This is fine, but
it needs to be asynchronous to act more like what happens with
a normal WebSockets object. The current behavior is that the onclose()
method is called inline (synchronously) when the close() is called and
this inconsistency make state handling more difficult.

13 years agoproxy: do handshake in forked process too.
Joel Martin [Fri, 10 Sep 2010 19:31:34 +0000 (14:31 -0500)]
proxy: do handshake in forked process too.

13 years agowsproxy: multiprocess capable.
Joel Martin [Fri, 10 Sep 2010 18:05:48 +0000 (13:05 -0500)]
wsproxy: multiprocess capable.

Add -m, --multiprocess option which forks a handler for each
connection allowing multiple connections to the same target using the
same proxy instance.

Cleaned up the output of the handler process. Each process' output is
prefixed with an ordinal value.

Changed both the C and python versions of the proxy.

13 years agoRemove record option from C wsproxy.
Joel Martin [Fri, 10 Sep 2010 14:58:26 +0000 (09:58 -0500)]
Remove record option from C wsproxy.

I've decided that debug/develop/extra features will just be in the
python version of the proxy. The C version (and other versions) will
just have the core functionality (unless someone wants to support it).

13 years agoLicense header cleanup.
Joel Martin [Wed, 8 Sep 2010 20:06:34 +0000 (15:06 -0500)]
License header cleanup.

13 years agoweb-socket-js: 9e7663771 build and remove source.
Joel Martin [Wed, 8 Sep 2010 19:57:32 +0000 (14:57 -0500)]
web-socket-js: 9e7663771 build and remove source.

web-socket-js now has all the functionality and fixes needed for noVNC
so remove the include/as3crypto_patched directory and the
include/web-socket-js/flash-src directory (i.e. the sources for
web-socket-js). This cleans up almost 3K from the include/ directory.

Update to web-socket-js build based on upstream (gimite/web-socket-js)
9e766377188.

13 years agodefault_controls.js: Fix cursor setting init.
Joel Martin [Wed, 8 Sep 2010 18:46:41 +0000 (13:46 -0500)]
default_controls.js: Fix cursor setting init.

The rfb variable wasn't available at the point settingsDisabled() was
being called since it was called inline with RFB() initialization. To
solve this we pass the updateState rfb variable so that the canvas can
be queried for setting the cursor_uri value.

13 years agoTODO and .gitignore: updates.
Joel Martin [Wed, 8 Sep 2010 15:15:07 +0000 (10:15 -0500)]
TODO and .gitignore: updates.

13 years agoJSLint.
Joel Martin [Wed, 8 Sep 2010 15:11:11 +0000 (10:11 -0500)]
JSLint.

13 years agovnc_playback.html: print frame_idx on error.
Joel Martin [Tue, 7 Sep 2010 21:22:28 +0000 (16:22 -0500)]
vnc_playback.html: print frame_idx on error.

13 years agoEncrypt default to 'false' in vnc_auto.html also.
Joel Martin [Tue, 7 Sep 2010 14:57:37 +0000 (09:57 -0500)]
Encrypt default to 'false' in vnc_auto.html also.

13 years agoplayback.js: realtime playback and split out code.
Joel Martin [Wed, 1 Sep 2010 17:31:54 +0000 (12:31 -0500)]
playback.js: realtime playback and split out code.

Preparation for online demo.

Split general playback code into tests/playback.js.

Use timestamps from recording with proxy to playback in realtime.

13 years agoTODO: move long-term features to github issues.
Joel Martin [Wed, 1 Sep 2010 03:48:11 +0000 (22:48 -0500)]
TODO: move long-term features to github issues.

13 years agoIssue #15 - rfb.js: wait for security type list.
Joel Martin [Wed, 1 Sep 2010 03:22:22 +0000 (22:22 -0500)]
Issue #15 - rfb.js: wait for security type list.

Apparently the virtualbox VNC server send the size and then the
security type list in separate frames so we need to wait for the full
list.

13 years agocanvas.js: Fix ignore for scrolled window.
Joel Martin [Tue, 31 Aug 2010 18:36:14 +0000 (13:36 -0500)]
canvas.js: Fix ignore for scrolled window.

When the documement/window is scrolled, the onMouseDisable routine was
not properly calculating the position to test whether to ignore the
event or not.

13 years agoRename tightpng img queue variable to imgQ.
Joel Martin [Tue, 31 Aug 2010 17:08:47 +0000 (12:08 -0500)]
Rename tightpng img queue variable to imgQ.

13 years agoMore timing "history" purge.
Joel Martin [Mon, 30 Aug 2010 20:59:53 +0000 (15:59 -0500)]
More timing "history" purge.

13 years agorfb.js: JSLint'ing
Joel Martin [Mon, 30 Aug 2010 20:57:58 +0000 (15:57 -0500)]
rfb.js: JSLint'ing

Change RQ and SQ vars to rQ and sQ since caps at the start implies
a classable entity.

13 years agoMerge init() into the constructor.
Joel Martin [Mon, 30 Aug 2010 20:16:07 +0000 (15:16 -0500)]
Merge init() into the constructor.

This is logical now since the external update callback can be provided
when the object is created so we don't need a separate init function.

13 years agoRemove psuedo-UTF8 encoding.
Joel Martin [Fri, 27 Aug 2010 17:10:09 +0000 (12:10 -0500)]
Remove psuedo-UTF8 encoding.

It's less efficient on average that base64 (150% vs 133%). It's
non-standard (0 shifted to 256 before encoding). And I rarely use it.

13 years agorfb.js: remove timing history.
Joel Martin [Fri, 27 Aug 2010 16:29:22 +0000 (11:29 -0500)]
rfb.js: remove timing history.

Turned out not to be useful (pretty much never looked at the info once
I added it). The playback test is much more useful for measuring
performance.

13 years agorfb.js/tight_png: fix indexed receive queue handling.
Joel Martin [Fri, 27 Aug 2010 16:21:30 +0000 (11:21 -0500)]
rfb.js/tight_png: fix indexed receive queue handling.

getCLength was not using the index (RQi) into the receive queue.

13 years agoTest both builtin and base64.js functions.
Joel Martin [Thu, 26 Aug 2010 16:34:44 +0000 (11:34 -0500)]
Test both builtin and base64.js functions.

13 years agoIndexed receive queue. Up to 2X speedup in Chrome.
Joel Martin [Thu, 26 Aug 2010 15:22:29 +0000 (10:22 -0500)]
Indexed receive queue. Up to 2X speedup in Chrome.

Generally, most servers send hextile updates as single updates
containing many rects. Some servers send hextile updates as many small
framebuffer updates with a few rects each (such as QEMU). This latter
cases revealed that shifting off the beginning of the receive queue
(which happens after each hextile FBU) performs poorly.

This change switches to using an indexed receive queue (instead of
actually shifting off the array). When the receive queue has grown to
a certain size, then it is compacted all at once.

The code is not as clean, but this change results in more than 2X
speedup under Chrome for the pessimal case and 10-20% in firefox.

13 years agoAdd Javascript variable container to record data.
Joel Martin [Thu, 12 Aug 2010 14:50:49 +0000 (09:50 -0500)]
Add Javascript variable container to record data.

- This allows the recorded data to be immediately usable by
  tests/vnc_playback.html

13 years agoTreat RFB 3.6 as 3.3.
Joel Martin [Wed, 11 Aug 2010 16:21:15 +0000 (11:21 -0500)]
Treat RFB 3.6 as 3.3.

Apparently there are versions of UltraVNC that report version 3.6.
This is not a legal version according to the spec, but we'll just
force version 3.3 if we receive it. Thanks to Larry Rowe for the info.

13 years agoScroll render test and perf speedup.
Joel Martin [Fri, 6 Aug 2010 20:53:13 +0000 (15:53 -0500)]
Scroll render test and perf speedup.

Turns out when Windows is running in QEMU and a window scroll happens,
there are lots of little hextile rects sent. This is slow in noVNC.

- Some recording/playback improvement.
- Add test harness to drive playback of recordings.
- By pulling off the rect header in one chunk we get a 3X speedup in
  Chrome and a 20% speedup in firefox (specifically for the scroll
  test).
- Also, get rid of some noise from creating timers for handle_message.
  Check to make sure there isn't already a pending timer first.

13 years ago* take care of kanaka's suggestions
primalmotion [Wed, 4 Aug 2010 20:20:53 +0000 (15:20 -0500)]
* take care of kanaka's suggestions
(cherry picked from commit 11f3271a52505dccbf38bea422e7c9a79dddd478)

Signed-off-by: Joel Martin <github@martintribe.org>
13 years ago* Adding a way to set the DOM document to use.
primalmotion [Wed, 4 Aug 2010 15:47:08 +0000 (17:47 +0200)]
* Adding a way to set the DOM document to use.
This is very usefull when you need to open a new window (with a new document) from javascript,
without having to reload the script.js.
(cherry picked from commit 8ded53c1de06d01e50d58543c19e73926f0fbbd4)

Signed-off-by: Joel Martin <github@martintribe.org>
13 years agoJSLint: use ===.
Joel Martin [Wed, 4 Aug 2010 20:14:40 +0000 (15:14 -0500)]
JSLint: use ===.

13 years agoRemove unused imports (sys, ssl) in wsproxy.py
Joel Martin [Wed, 4 Aug 2010 19:33:32 +0000 (14:33 -0500)]
Remove unused imports (sys, ssl) in wsproxy.py