]> git.proxmox.com Git - mirror_novnc.git/log
mirror_novnc.git
12 years agoModifed UI. Move HTML from ui.js to vnc.html.
Chris Gordon [Sun, 4 Sep 2011 23:46:13 +0000 (09:46 +1000)]
Modifed UI. Move HTML from ui.js to vnc.html.

12 years agoHelper function for viewport meta changes.
Chris Gordon [Wed, 24 Aug 2011 23:52:54 +0000 (09:52 +1000)]
Helper function for viewport meta changes.

changeViewportMeta() now does viewport changes.

12 years agoAdded support for native iOS and Android keyboards.
Chris Gordon [Tue, 23 Aug 2011 00:26:04 +0000 (10:26 +1000)]
Added support for native iOS and Android keyboards.

Tested with Safari on iPad for iOS and Asus Transformer for Android.

12 years agoFix websockify with python2.4
Joel Martin [Wed, 10 Aug 2011 22:54:15 +0000 (17:54 -0500)]
Fix websockify with python2.4

https://github.com/kanaka/noVNC/issues/72

Pull from websockify 2e00f9643.

12 years agoREADME: Zentyal (Ebox) and SlapOS to projects list.
Joel Martin [Thu, 4 Aug 2011 15:50:16 +0000 (10:50 -0500)]
README: Zentyal (Ebox) and SlapOS to projects list.

12 years agoAdd a viewport example/test.
Joel Martin [Wed, 3 Aug 2011 23:18:41 +0000 (18:18 -0500)]
Add a viewport example/test.

Tested with an iPad 2.

This example shows a 400x200 viewport of an 800x400 display.

It tries to be intelligent about how much it redraws. It copies what
it can, and then when the user releases the mouse, it redraws the
"dirty" areas that were newly revealed.

12 years agoCatch Mozilla prefixing of WebSocket.
Joel Martin [Tue, 2 Aug 2011 13:02:51 +0000 (08:02 -0500)]
Catch Mozilla prefixing of WebSocket.

Pull 475cfae from websockify.

In Firefox 7 Mozilla has added Websockets support but prefixed the
constructor with "Moz".

12 years agoTouch events and mouse button selectors.
Joel Martin [Sun, 24 Jul 2011 02:24:59 +0000 (21:24 -0500)]
Touch events and mouse button selectors.

First crack at supporting touch screen for devices like Android and
iOS tablets. Part of https://github.com/kanaka/noVNC/issues/48.

This change detects touch screen support and uses the touchstart,
touchmove, touchend events in place of the normal mouse events.

In order to support middle and right mouse clicks, if the device is
a touch device, then three toggle buttons are added to the UI
representing the left, middle and right mouse buttons. These select
which mouse button will be sent when the screen is touched. All the
buttons can be toggled off, in which case then the touch events only
move the mouse cursor rather than sending a mouse down and mouse up
for touchstart and touchend events respectively. This allows fairly
full control with the mouse on touch screens.

12 years agoVersion 0.1, debian packaging, license text.
Joel Martin [Thu, 14 Jul 2011 20:57:01 +0000 (15:57 -0500)]
Version 0.1, debian packaging, license text.

noVNC version 0.1

Add debian packaging directory loosely based on
http://trac.zentyal.org/browser/trunk/extra/novnc/debian

Show web root directory on startup (pulled from websockify f1c8223).

Lintian fixups:
    - Some license text clarifications.
    - remove executable permission on utils/launch.sh and
      include/web-socket-js/web_socket.js
    - Add executable permission to utils/launch.sh

12 years agoREADME: Fix CloudSigma link.
Joel Martin [Wed, 13 Jul 2011 20:19:09 +0000 (15:19 -0500)]
README: Fix CloudSigma link.

12 years agoREADME: link to CloudSigma as product using noVNC.
Joel Martin [Wed, 13 Jul 2011 20:17:22 +0000 (15:17 -0500)]
README: link to CloudSigma as product using noVNC.

12 years agoPull websockify socket() static method.
Joel Martin [Sat, 9 Jul 2011 18:39:04 +0000 (13:39 -0500)]
Pull websockify socket() static method.

Pull websockify 46e2fbe.

WebSocketServer.socket() is a static method takes a host and port and
an optional connect parameter. If connect is not set then it returns
a socket listening on host and port. If connect is set then
a connection will be made host and port and the socket returned. This
has IPv6 support like the addrinfo method it replaces.

Also, prefer IPv4 resolutions if they are in the list. This can be
overriden to prefer IPv6 resolutions for the same host using the
optional prefer_ipv6 parameter.

12 years agoPull IPv6 and HyBi fixes from websockify.
Joel Martin [Thu, 7 Jul 2011 20:14:41 +0000 (15:14 -0500)]
Pull IPv6 and HyBi fixes from websockify.

Pull 7ae8711 from websockify.

12 years agoPull IPv6 support from websockify.
Joel Martin [Thu, 7 Jul 2011 16:47:11 +0000 (11:47 -0500)]
Pull IPv6 support from websockify.

Pull from websockify 247b74950d.

12 years agoFix ordering of tightPNG fills.
Joel Martin [Wed, 6 Jul 2011 21:32:42 +0000 (16:32 -0500)]
Fix ordering of tightPNG fills.

This addresses issue #65:
https://github.com/kanaka/noVNC/issues/65

When tightPNG encoded rects were received, any fill types were
immediately drawn to the canvas while images (PNG, JPEGs) were queued
for loading. This can cause screen corruption when things are changing
rapidly due to the misordering of fills vs images.

Also, remove the onload setting in each image on the queue and instead
decrease the tight image queue scanning interval (to 40ms or 25
scans per second).

12 years agoShow full pixelFormat received from server.
Joel Martin [Fri, 1 Jul 2011 18:17:20 +0000 (13:17 -0500)]
Show full pixelFormat received from server.

For debugging issue #70: https://github.com/kanaka/noVNC/issues/70

12 years agoRemove extraneous question mark.
Joel Martin [Tue, 28 Jun 2011 21:29:29 +0000 (16:29 -0500)]
Remove extraneous question mark.

Part of https://github.com/kanaka/noVNC/issues/69

Pull from websockify b590289de5.

12 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Tue, 28 Jun 2011 21:23:57 +0000 (16:23 -0500)]
Merge branch 'master' of git@github.com:kanaka/noVNC

12 years agoOnly append random string to swf path in IE.
Joel Martin [Tue, 28 Jun 2011 21:22:50 +0000 (16:22 -0500)]
Only append random string to swf path in IE.

Issue https://github.com/kanaka/noVNC/issues/69

Thanks https://github.com/EdSchouten for the catch.

Import from websockify 9a2b50d8.

12 years agoMerge pull request #67 from EdSchouten/master
Joel Martin [Mon, 27 Jun 2011 14:26:00 +0000 (07:26 -0700)]
Merge pull request #67 from EdSchouten/master

Add support for setting the WebSocket URI path.

12 years agoAdd support for passing the file name to get.
Ed Schouten [Mon, 27 Jun 2011 08:55:03 +0000 (10:55 +0200)]
Add support for passing the file name to get.

This change allows one to implement a single WebSockets proxy, which
multiplexes connections to different hosts.

12 years agoClarify companies/projects link description.
Joel Martin [Sun, 26 Jun 2011 21:02:42 +0000 (16:02 -0500)]
Clarify companies/projects link description.

12 years agoMove project/companies info to wiki.
Joel Martin [Sun, 26 Jun 2011 20:55:44 +0000 (15:55 -0500)]
Move project/companies info to wiki.

Just have a list here without all the links.

12 years agoPull fix of recording from websockify.
Joel Martin [Sun, 26 Jun 2011 19:21:56 +0000 (14:21 -0500)]
Pull fix of recording from websockify.

Pull websockify 7f487fdbd.

The reocrd parameter will turn on recording of all messages sent
to and from the client. The record parameter is a file prefix. The
full file-name will be the prefix with an extension '.HANDLER_ID'
based on the handler ID.

12 years agoFix playback of recorded VNC.
Joel Martin [Sun, 26 Jun 2011 19:17:42 +0000 (14:17 -0500)]
Fix playback of recorded VNC.

- Update test mode calls to work with separate websock module.

- Pull in include/websock.js update 7f487fdbd from websockify.

12 years agoadd ability to set title from url
Anthony Young [Sun, 26 Jun 2011 07:36:27 +0000 (00:36 -0700)]
add ability to set title from url

12 years agoBroadway link cleanup.
Joel Martin [Mon, 13 Jun 2011 19:29:51 +0000 (14:29 -0500)]
Broadway link cleanup.

12 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Mon, 13 Jun 2011 19:28:38 +0000 (14:28 -0500)]
Merge branch 'master' of git@github.com:kanaka/noVNC

12 years agoBroadway HTML5 GDK backend link.
Joel Martin [Mon, 13 Jun 2011 19:27:47 +0000 (14:27 -0500)]
Broadway HTML5 GDK backend link.

Broadway uses noVNC keyboard/input handling. Link to it.

13 years agoMerge pull request #59 from smussmann/patch-1
Joel Martin [Thu, 19 May 2011 17:08:30 +0000 (10:08 -0700)]
Merge pull request #59 from smussmann/patch-1

Fixed minor typo in util/launch.sh informational output (s/to to/to/)

13 years agoFixed minor typo
Sam Mussmann [Thu, 19 May 2011 16:37:28 +0000 (09:37 -0700)]
Fixed minor typo

s/to to/to/

13 years agoutils/websocket.py: disable debug output.
Joel Martin [Thu, 12 May 2011 17:55:04 +0000 (12:55 -0500)]
utils/websocket.py: disable debug output.

13 years agoPull websockify 284ef3cc1a54
Joel Martin [Thu, 12 May 2011 17:33:57 +0000 (12:33 -0500)]
Pull websockify 284ef3cc1a54

Including HyBi-07 support and refactor of send/recv.

13 years agoRefactor configuration attributes.
Joel Martin [Wed, 11 May 2011 22:31:53 +0000 (17:31 -0500)]
Refactor configuration attributes.

- Add conf_defaults which accepts an array of configuration
  attributes.
- Split out user configuration defaults from the actual configuration
  object.
- Add mode field and enforce read-only, write-once, read-write modes.

13 years agoAPI changes/cleanup.
Joel Martin [Wed, 11 May 2011 20:55:44 +0000 (15:55 -0500)]
API changes/cleanup.

API changes:
    - include/canvas.js renamed to include/display.js
    - Display.rescale() method removed from API. Use Display.set_scale() instead.
    - Make logo configuration attribute of Display and display it when
      clear() is called if it is set.

API deprecations:
    - use RFB onUpdateState instead of updateState.
    - use RFB onClipboard instead of clipboardReceive.

See https://github.com/kanaka/noVNC/wiki/ModuleAPI for detailed noVNC
modules and API description.

Expand and normalize the event/callback interfaces. Standize on
"onEventName" form for callbacks.

    Callback Renames:
        - RFB updateState -> onUpdateState
        - RFB clipboardReceive -> onClipboard
        - Keyboard keyPress -> onKeyPress
        - Mouse mouseButton -> onMouseButton
        - Mouse mouseMove -> onMouseMove

    Callback Additions:
        - RFB onPasswordRequired
        - RFB onBell
        - RFB onFBUReceive
        - RFB onFBUComplete

Other:
- Add array type support to Util.conf_default()
- Removed a bunch of routines from the Display API that were just used
  internally and not actually by noVNC: flush, setFillColor,
  imageDataGet, imageDataCreate, rgbxImageData, rgbxImageFill,
  cmapImageData, cmapImageFill.
- More keyboard/mouse logging when debug turned on.
- Some JSLinting

13 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Mon, 9 May 2011 23:09:59 +0000 (18:09 -0500)]
Merge branch 'master' of git@github.com:kanaka/noVNC

13 years agoStop sending empty frames.
Joel Martin [Mon, 9 May 2011 22:22:02 +0000 (17:22 -0500)]
Stop sending empty frames.

Pull from websockify a339a4856.

13 years agoinclude/canvas.js: missed scale fix.
Joel Martin [Fri, 29 Apr 2011 19:04:40 +0000 (14:04 -0500)]
include/canvas.js: missed scale fix.

13 years agoFix scale/rescale attribute/hooks.
Joel Martin [Fri, 29 Apr 2011 19:01:40 +0000 (14:01 -0500)]
Fix scale/rescale attribute/hooks.

Still buggy so not yet activated in the UI, but the hooks are at least
here.

13 years agoREADME.md: adjust links to clarify.
Joel Martin [Sun, 24 Apr 2011 17:52:19 +0000 (12:52 -0500)]
README.md: adjust links to clarify.

Separate the links from each other so it's obvious where the links
are.

13 years agoREADME.md: Add OpenStack doc and video link.
Joel Martin [Sun, 24 Apr 2011 17:45:58 +0000 (12:45 -0500)]
README.md: Add OpenStack doc and video link.

13 years agoREADME.md: fix wiki links.
Joel Martin [Sun, 24 Apr 2011 17:34:09 +0000 (12:34 -0500)]
README.md: fix wiki links.

github changed something about relative links.

13 years agotests/browser.js: Missing. Needed for arrays.html test.
Joel Martin [Thu, 21 Apr 2011 13:45:04 +0000 (08:45 -0500)]
tests/browser.js: Missing. Needed for arrays.html test.

13 years agoSync with websockify. Save handshake headers.
Joel Martin [Tue, 19 Apr 2011 14:37:43 +0000 (09:37 -0500)]
Sync with websockify. Save handshake headers.

Derived classes will almost certainly want to make use of the raw
info.

13 years agoinput.js: remove redundant switch case statments.
Joel Martin [Fri, 15 Apr 2011 14:48:04 +0000 (08:48 -0600)]
input.js: remove redundant switch case statments.

Issue #21 - non-US key handling.

13 years agoinput.js: uncomment special key handling for non-US keys.
Joel Martin [Fri, 15 Apr 2011 14:40:20 +0000 (08:40 -0600)]
input.js: uncomment special key handling for non-US keys.

Issue #21 - non-US keyboard layouts.

The code section for tab, backspace and enter was commented out for
testing but got checked in that way. Fix that.

13 years agoinclude/input.js: change to LGPL-2 or later.
Joel Martin [Thu, 14 Apr 2011 17:25:11 +0000 (11:25 -0600)]
include/input.js: change to LGPL-2 or later.

Requested by Alexander Larsson at Red Hat to allow incorporation of
solution into HTML5 gtk 3.0 backend.

13 years agoinput.js: adjust special key handling for non-US keys.
Joel Martin [Tue, 12 Apr 2011 14:06:11 +0000 (09:06 -0500)]
input.js: adjust special key handling for non-US keys.

Issue #21 - non-US keyboard layouts.

Only identify some keys as special during the keyDown event so that
when using non-US keyboards the values don't overlap with the values
for normal keys.

Some keys have to still be identified in both keyDown and keyPress
since they generate both: backspace and enter for Firefox and Opera,
tab for Opera.

13 years agoutil/json2graph.py: new location for json2graph.py.
Joel Martin [Wed, 6 Apr 2011 16:19:02 +0000 (11:19 -0500)]
util/json2graph.py: new location for json2graph.py.

Also clarify usage statement with legend height adjustment.

Remove console.log in arrays.js so that it works in firefox without
firebug.

13 years agoutils/rebind, utils/u2x11: use /usr/bin/env
Joel Martin [Wed, 6 Apr 2011 15:05:59 +0000 (10:05 -0500)]
utils/rebind, utils/u2x11: use /usr/bin/env

13 years agoinclude/webutil.js: fix dirObj undefined attribute.
Joel Martin [Tue, 5 Apr 2011 19:46:22 +0000 (14:46 -0500)]
include/webutil.js: fix dirObj undefined attribute.

13 years agoFix copyright year to 2011.
Joel Martin [Tue, 5 Apr 2011 19:44:47 +0000 (14:44 -0500)]
Fix copyright year to 2011.

13 years agoRefactor keyboard event handling.
Joel Martin [Tue, 5 Apr 2011 19:26:54 +0000 (14:26 -0500)]
Refactor keyboard event handling.

This is part of addressing issue #21 - non-US keyboard layouts.

There are several challenges when dealing with keyboard events:
  - The meaning and use of keyCode, charCode and which depends on
    both the browser and the event type (keyDown/Up vs keyPress).
  - We cannot automatically determine the keyboard layout
  - The keyDown and keyUp events have a keyCode value that has not
    been translated by modifier keys.
  - The keyPress event has a translated (for layout and modifiers)
    character code but the attribute containing it differs. keyCode
    contains the translated value in WebKit (Chrome/Safari), Opera
    11 and IE9. charCode contains the value in WebKit and Firefox.
    The which attribute contains the value on WebKit, Firefox and
    Opera 11.
  - The keyDown/Up keyCode value indicates (sort of) the physical
    key was pressed but only for standard US layout. On a US
    keyboard, the '-' and '_' characters are on the same key and
    generate a keyCode value of 189. But on an AZERTY keyboard even
    though they are different physical keys they both still
    generate a keyCode of 189!
  - To prevent a key event from propagating to the browser and
    causing unwanted default actions (such as closing a tab,
    opening a menu, shifting focus, etc) we must suppress this
    event in both keyDown and keyPress because not all key strokes
    generate on a keyPress event. Also, in WebKit and IE9
    suppressing the keyDown prevents a keyPress but other browsers
    still generated a keyPress even if keyDown is suppressed.

For safe key events, we wait until the keyPress event before
reporting a key down event. For unsafe key events, we report a key
down event when the keyDown event fires and we suppress any further
actions (including keyPress).

In order to report a key up event that matches what we reported
for the key down event, we keep a list of keys that are currently
down. When the keyDown event happens, we add the key event to the
list. If it is a safe key event, then we update the which attribute
in the most recent item on the list when we received a keyPress
event (keyPress should immediately follow keyDown). When we
received a keyUp event we search for the event on the list with
a matching keyCode and we report the character code using the value
in the 'which' attribute that was stored with that key.

For character codes above 255 we use a character code to keysym lookup
table. This is generated using the util/u2x11 script contributed by
Colin Dean (xvpsource.org).

13 years agoFix focus/clipboard related to mouse/keyboard refactor.
Joel Martin [Sun, 3 Apr 2011 22:51:47 +0000 (17:51 -0500)]
Fix focus/clipboard related to mouse/keyboard refactor.

13 years agoAPI change: Mouse/kbd handling to include/input.js
Joel Martin [Sun, 3 Apr 2011 22:30:45 +0000 (17:30 -0500)]
API change: Mouse/kbd handling to include/input.js

API change: for intergrators that explicitly include the Javascript
files (that do not use include/vnc.js)js, include/input.js is a new
file that must also be included.

The mouse and keyboard handling could be useful on its own so split it
out into a Keyboard and Mouse class in include/input.js.

This refactoring is preparation to deal with issue #21 - non-US
keyboard layouts.

13 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Tue, 29 Mar 2011 20:47:58 +0000 (15:47 -0500)]
Merge branch 'master' of git@github.com:kanaka/noVNC

13 years agoIE9 fixes: mouse, doctype. Adobe Flash link.
Joel Martin [Tue, 29 Mar 2011 20:44:03 +0000 (15:44 -0500)]
IE9 fixes: mouse, doctype. Adobe Flash link.

Fix mouse button mapping in IE9. All browsers have converged on
a standard left=0, middle=1, right=2 ... all except IE that is.

Add html5 doctype to tests.

In vnc_perf test, use do_test instead of start for function name since
start is a keyword in IE.

In error about Flash give a link to Adobe's download page.

13 years agoMake scripts more compatible across OSes
Phil Phillips [Fri, 25 Mar 2011 18:46:58 +0000 (02:46 +0800)]
Make scripts more compatible across OSes

13 years agoNo exception if noVNC_logo is undefined.
Joel Martin [Fri, 25 Mar 2011 14:01:53 +0000 (09:01 -0500)]
No exception if noVNC_logo is undefined.

13 years agoIgnore utils/rebind.so
Joel Martin [Thu, 24 Mar 2011 02:23:08 +0000 (21:23 -0500)]
Ignore utils/rebind.so

13 years agoHigher connectTimeout default with web-socket-js.
Joel Martin [Tue, 22 Mar 2011 19:24:55 +0000 (14:24 -0500)]
Higher connectTimeout default with web-socket-js.

Current timeout is 2 seconds for connect timeout. Use 5 seconds if
web-socket-js (Flash WebSockets emulator) is being used. On Windows XP
with Flash 10.2.152.26, connecting seems to take quite a bit longer
than it probably should. This should make it work more consistently.

13 years agoUpdate web-socket-js to bb5797cad.
Joel Martin [Wed, 16 Mar 2011 15:33:01 +0000 (10:33 -0500)]
Update web-socket-js to bb5797cad.

Syncs with same change to websockify (7534574a2f).

Primary change is removal of FABridge interface.

Seems to improve overall latency by perhaps 10%. Also, the slowdown
over time in Opera is about half as bad (but still there).

13 years agotest/*.html: use "../include" instead of symlink.
Joel Martin [Tue, 15 Mar 2011 00:05:42 +0000 (19:05 -0500)]
test/*.html: use "../include" instead of symlink.

This allows tests to work on the github pages site.

13 years agotests/keyboard.html: fix getKeysym call.
Joel Martin [Mon, 14 Mar 2011 23:54:16 +0000 (18:54 -0500)]
tests/keyboard.html: fix getKeysym call.

13 years agoClarify license on arrays test files.
Joel Martin [Wed, 23 Feb 2011 20:48:23 +0000 (14:48 -0600)]
Clarify license on arrays test files.

13 years agoAdd Javascript binary byte array test.
Joel Martin [Wed, 23 Feb 2011 17:08:09 +0000 (11:08 -0600)]
Add Javascript binary byte array test.

Compares normal Javascript arrays with Canvas ImageData arrays and
Typed Arrays (ArrayBuffers from WebGL).

13 years agoSome JSLint'ing
Joel Martin [Sat, 19 Feb 2011 22:44:10 +0000 (16:44 -0600)]
Some JSLint'ing

13 years agoAdd OpenNode to README. Update TODOs.
Joel Martin [Sat, 5 Feb 2011 19:03:12 +0000 (13:03 -0600)]
Add OpenNode to README. Update TODOs.

13 years agoAdd logo, favicon.
Joel Martin [Thu, 3 Feb 2011 17:04:32 +0000 (11:04 -0600)]
Add logo, favicon.

Thanks to Michael Sersen for creating images/Logo.svg.

- Add images directory with original SVG logo, favicon, and some
  derivative PNGs of the logo for different purpose.

- Note that license on images/* is CC BY-SA.

- Add utils/img2js.py to take an image and generate a base64 encoded
  data URI string.

- Add base64 encoded data URI screen logo to display in canvas when
  disconnected.

13 years agoFix CSS sizes with HTML5 doctype.
Joel Martin [Wed, 2 Feb 2011 16:48:29 +0000 (10:48 -0600)]
Fix CSS sizes with HTML5 doctype.

Using HTML5 doctype means CSS pixels sizes must have "px" suffix which
many of them did not. Fix that.

13 years agoBetter reaper, catch occasional bad WS header line.
Joel Martin [Tue, 1 Feb 2011 16:47:45 +0000 (10:47 -0600)]
Better reaper, catch occasional bad WS header line.

Call waitpid in loop to catch SIGCHLD signals that happen while
handling the original SIGCHLD signal.

Pulled from websockify.

13 years agoPull websockify: zombie reap, ignore unready clients.
Joel Martin [Mon, 31 Jan 2011 18:13:30 +0000 (12:13 -0600)]
Pull websockify: zombie reap, ignore unready clients.

13 years agoAdd DOCTYPE. Misc cleanup.
Joel Martin [Mon, 31 Jan 2011 05:42:28 +0000 (23:42 -0600)]
Add DOCTYPE. Misc cleanup.

13 years agoIE9 fixes. Works but slow. API change.
Joel Martin [Mon, 31 Jan 2011 04:58:22 +0000 (22:58 -0600)]
IE9 fixes. Works but slow. API change.

API change: changed include path variable from VNC_uri_prefix to
URI_INCLUDE since websock.js uses the variable and websock.js is no
longer just for noVNC (i.e. websockify is really the canonical
location for websock.js).

Changes to get web-socket-js to work. Right now it's a hack to get
around: https://github.com/gimite/web-socket-js/issues#issue/41. The
hack is to disable caching of the flash objects by appending
"?" + Math.random() to the end of the flash object path (but only when
using IE).

13 years agoOpera 11 WebSockets and Opera '-' key mapping fix.
Joel Martin [Mon, 24 Jan 2011 01:36:11 +0000 (19:36 -0600)]
Opera 11 WebSockets and Opera '-' key mapping fix.

Opera 11 native WebSockets (if enabled) seems to have bad behavior for
the bufferedAmount so add change from websockify project to allow max
bufferedAmount (before send queue is delay) to be configured.

Also, Opera 11 and 10.60 behave like Mozilla regarding the '-' key so
translate it correctly.

13 years agowebsock.send returns true/false.
Joel Martin [Mon, 24 Jan 2011 01:21:04 +0000 (19:21 -0600)]
websock.send returns true/false.

If all send data was flushed from the send queue then return true,
otherwise false. This doesn't mean the data won't be sent, just that
it wasn't sent this time and is queued.

13 years agoTolerate some bufferedAmount.
Joel Martin [Mon, 24 Jan 2011 01:17:59 +0000 (19:17 -0600)]
Tolerate some bufferedAmount.

Only delay sending data if bufferedAmount is greater than 1000.

This seems to match the intention of the spec better. bufferedAmount
does not mean that we can't send, it's just an indication that the
network is becoming saturated. But Opera 11 native WebSockets seems to
have a bug that bufferedAmount isn't set back to zero correctly so
we'll be a bit more tolerant.

13 years agocanvas.js: prevent Opera keyboard event bubbling.
Joel Martin [Wed, 19 Jan 2011 19:09:32 +0000 (13:09 -0600)]
canvas.js: prevent Opera keyboard event bubbling.

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

13 years agoweb-socket-js: Add function invocation fix.
Joel Martin [Wed, 19 Jan 2011 19:01:28 +0000 (13:01 -0600)]
web-socket-js: Add function invocation fix.

Related to this issue:
https://github.com/gimite/web-socket-js/issues/#issue/50

This prevents the "Uncaught exception: TypeError:
'this.__handleEvents' is not a function" everytime the timer fires.

Yay, one of Javascript's worst behaviors; the way it sets "this".

13 years agoinclude/canvas.js: fix changeCursor data format.
Joel Martin [Wed, 19 Jan 2011 05:22:25 +0000 (23:22 -0600)]
include/canvas.js: fix changeCursor data format.

Issues #27 (safari cursor rendering messed up) and #29 (firefox 3.6.10
segault).

Finally found some better reference on the icon/cursor format which is
added to the docs/links file.

It seems like I was missing the XOR section. So setting the cursor
would cause corruptin in Safari rendering or the segfault for firefox.

13 years agoMove advanced, integration, troubleshoot to wiki.
Joel Martin [Tue, 18 Jan 2011 20:19:55 +0000 (14:19 -0600)]
Move advanced, integration, troubleshoot to wiki.

Move the Advanced Usage, Integration and Troubleshooting sections to
their own pages in the wiki.

Also, update wsproxy.py referneces to be websockify.

13 years agoinclude/canvas.js: add numpad support to getKeysym.
Joel Martin [Tue, 18 Jan 2011 18:16:50 +0000 (12:16 -0600)]
include/canvas.js: add numpad support to getKeysym.

Check keyLocation and translate numpad keys into numbers. keyLocation
is not widely supported yet, but it should start percolating into
browsers eventually:
http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent

This change is based on:
https://github.com/leeor/noVNC/commit/8e59e3772c91eaffaa0f6d53270b97f1fe8510b4

13 years agoMove browsers.md to Wiki.
Joel Martin [Tue, 18 Jan 2011 17:58:24 +0000 (11:58 -0600)]
Move browsers.md to Wiki.

It is now here: https://github.com/kanaka/noVNC/wiki/Browser-support

13 years agotests/vnc_perf.html: load from data/multi.js
Joel Martin [Mon, 17 Jan 2011 17:46:55 +0000 (11:46 -0600)]
tests/vnc_perf.html: load from data/multi.js

To go along with addition of performance notes to the website.

13 years agoMisc docs/{TODO,links} updates.
Joel Martin [Mon, 17 Jan 2011 01:27:32 +0000 (19:27 -0600)]
Misc docs/{TODO,links} updates.

13 years agoUpdate gimite/web-socket-js build.
Joel Martin [Mon, 17 Jan 2011 01:05:58 +0000 (19:05 -0600)]
Update gimite/web-socket-js build.

Update to a build based on 20f837425d4 from gimite/web-socket-js.

This changes the event handling code and fixes the frequent recursive
call into Flash errors.

13 years agoFix strict mode complaints in firefox 4.
Joel Martin [Mon, 17 Jan 2011 00:57:45 +0000 (18:57 -0600)]
Fix strict mode complaints in firefox 4.

13 years agoConvert to Websock library.
Joel Martin [Thu, 13 Jan 2011 06:30:08 +0000 (00:30 -0600)]
Convert to Websock library.

Copy in include/websock.js from websockify and use that instead. Still
some cleanup of network code but it's a good start.

13 years agoRemove files that are now in websockify.
Joel Martin [Thu, 13 Jan 2011 02:31:04 +0000 (20:31 -0600)]
Remove files that are now in websockify.

https://github.com/kanaka/websockify is now the canonical location of
websockify (formerly wsproxy). A copy of the python version is kept
here for backwards compatibility and ease-of-use. The other versions
and related test scripts are in websockify.

13 years agowsproxy.py: python2.4 fixes.
Joel Martin [Thu, 13 Jan 2011 00:12:17 +0000 (18:12 -0600)]
wsproxy.py: python2.4 fixes.

13 years agowstelnet: forgot VT100.js.
Joel Martin [Wed, 12 Jan 2011 23:09:33 +0000 (17:09 -0600)]
wstelnet: forgot VT100.js.

13 years agoMinor correct to wstelnet.js header comment.
Joel Martin [Wed, 12 Jan 2011 22:55:31 +0000 (16:55 -0600)]
Minor correct to wstelnet.js header comment.

13 years agowsproxy, wstelnet: wrap command, WS telnet client.
Joel Martin [Wed, 12 Jan 2011 19:15:11 +0000 (13:15 -0600)]
wsproxy, wstelnet: wrap command, WS telnet client.

wswrapper:

    Getting the wswrapper.c LD_PRELOAD model working has turned out to
    involve too many dark corners of the glibc/POSIX file descriptor
    space. I realized that 95% of what I want can be accomplished by
    adding a "wrap command" mode to wsproxy.

    The code is still there for now, but consider it experimental at
    best. Minor fix to dup2 and add dup and dup3 logging.

wsproxy Wrap Command:

    In wsproxy wrap command mode, a command line is specified instead
    of a target address and port. wsproxy then uses a much simpler
    LD_PRELOAD library, rebind.so, to move intercept any bind() system
    calls made by the program. If the bind() call is for the wsproxy
    listen port number then the real bind() system call is issued for
    an alternate (free high) port on loopback/localhost.  wsproxy then
    forwards from the listen address/port to the moved port.

    The --wrap-mode argument takes three options that determine the
    behavior of wsproxy when the wrapped command returns an exit code
    (exit or daemonizing): ignore, exit, respawn.

    For example, this runs vncserver on turns port 5901 into
    a WebSockets port (rebind.so must be built first):

        ./utils/wsproxy.py --wrap-mode=ignore 5901 -- vncserver :1

    The vncserver command backgrounds itself so the wrap mode is set
    to "ignore" so that wsproxy keeps running even after it receives
    an exit code from vncserver.

wstelnet:

    To demonstrate the wrap command mode, I added WebSockets telnet
    client.

    For example, this runs telnetd (krb5-telnetd) on turns port 2023
    into a WebSockets port (using "respawn" mode since telnetd exits
    after each connection closes):

        sudo ./utils/wsproxy.py --wrap-mode=respawn 2023 -- telnetd -debug 2023

    Then the utils/wstelnet.html page can be used to connect to the
    telnetd server on port 2023. The telnet client includes VT100.js
    (from http://code.google.com/p/sshconsole) which handles the
    terminal emulation and rendering.

rebind:

    The rebind LD_PRELOAD library is used by wsproxy in wrap command
    mode to intercept bind() system calls and move the port to
    a different port on loopback/localhost. The rebind.so library can
    be built by running make in the utils directory.

    The rebind library can be used separately from wsproxy by setting
    the REBIND_OLD_PORT and REBIND_NEW_PORT environment variables
    prior to executing a command. For example:

        export export REBIND_PORT_OLD="23"
        export export REBIND_PORT_NEW="65023"
        LD_PRELOAD=./rebind.so telnetd -debug 23

    Alternately, the rebind script does the same thing:

        rebind 23 65023 telnetd -debug 23

Other changes/notes:

- wsproxy no longer daemonizes by default. Remove -f/--foreground
  option and add -D/--deamon option.

- When wsproxy is used to wrap a command in "respawn" mode, the
  command will not be respawn more often than 3 times within 10
  seconds.

- Move getKeysym routine out of Canvas object so that it can be called
  directly.

13 years agowswrapper: add dup2, fix select w/ NULL timeout.
Joel Martin [Sun, 9 Jan 2011 03:46:36 +0000 (21:46 -0600)]
wswrapper: add dup2, fix select w/ NULL timeout.

- add dup2 functionality. This requires adding a ref cnt to the
  _WS_connections structure so that we only free the structure once
  all dup'd referenced are closed. Also, refactor malloc and free of
  connection structure into _WS_alloc and _WS_free.
- allow select to accept a NULL timeout value which means sleep
  forever instead of segfaulting.
- fix some compile warnings related to ppoll definition.
- move some WebSockets related html test pages into utils and symlink
  them from tests.

13 years agoRefactor and cleanup websocket.py and deps.
Joel Martin [Sat, 8 Jan 2011 21:29:01 +0000 (15:29 -0600)]
Refactor and cleanup websocket.py and deps.

Moved websocket.py code into a class WebSocketServer. WebSockets
server implementations will sub-class and define a handler() method
which is passed the client socket after. Global variable settings have been
changed to be parameters for WebSocketServer when created.

Subclass implementations still have to handle queueing and sending but
the parent class handles everything else (daemonizing, websocket
handshake, encode/decode, etc). It would be better if the parent class
could handle queueing and sending. This adds some buffering and
polling complexity to the parent class but it would be better to do so
at some point. However, the result is still much cleaner as can be
seen in wsecho.py.

Refactored wsproxy.py and wstest.py (formerly ws.py) to use the new
class. Added wsecho.py as a simple echo server.

- rename tests/ws.py to utils/wstest.py and add a symlink from
  tests/wstest.py

- rename tests/ws.html to tests/wstest.html to match utils/wstest.py.

- add utils/wsecho.py

- add tests/wsecho.html which communicates with wsecho.py and simply
  sends periodic messages and shows what is received.

13 years agoutils/README.md: horizontal looks better.
Joel Martin [Fri, 7 Jan 2011 01:21:17 +0000 (19:21 -0600)]
utils/README.md: horizontal looks better.

Flip table back to be horizontal. More readable.

13 years agoutils/README.md: flip table. Add web server info.
Joel Martin [Fri, 7 Jan 2011 01:17:32 +0000 (19:17 -0600)]
utils/README.md: flip table. Add web server info.

Flip the feature table to be tall instead of wide.

Added row about "web server" functionality in wsproxy.py.

13 years agoMerge branch 'master' of git@github.com:kanaka/noVNC
Joel Martin [Fri, 7 Jan 2011 01:13:39 +0000 (19:13 -0600)]
Merge branch 'master' of git@github.com:kanaka/noVNC

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.py: add web serving capability.
Joel Martin [Fri, 7 Jan 2011 00:26:54 +0000 (18:26 -0600)]
wsproxy.py: add web serving capability.

- Added ability to respond to normal web requests. This is basically
  integrating web.py functionality into wsproxy. This is only in the
  python version and it is off by default when calling wsproxy. Turn
  it on with --web DIR where DIR is the web root directory.

Next task is to clean up wsproxy.py. It's gotten unwieldy and it
really no longer needs to be parallel to the C version.