Commit Graph

122 Commits

Author SHA1 Message Date
samhed 082027dc87 Sync with websockify
Pull 90b519edf0c1857d
2014-04-14 14:45:15 +02:00
jalf ae52883b93 Keyboard Handling [1/8]: Parse keysymdef.h to produce Unicode -> keysym mappings table
Add a node.js-based tool (utils/parse.js) to read keysymdef.h and produce a JavaScript file
mapping Unicode code points to keysyms.

Also add the generated table (include/keysymdef.js).
2013-12-05 12:24:20 -05:00
Joel Martin c3c51ed32b Sync with websockify.
Pull in websockify 4725aa7.

- Update to c0855c6cae of web-socket-js

- Update both the submodule and the swf build. The submodule now
  contains the unobfuscated source for swfobject.js which should make
  websockify more DFSG compliant.

- Remove Hixie support. iOS 6 now includes HyBi support which means
  there is no remaining platform that needs Hixie.
2013-04-25 09:52:10 -05:00
Joel Martin 7c1cd93744 Remove references to wsproxy.
Also, update nova-novncproxy to import websockify instead of wsproxy.
2013-04-15 12:22:34 -05:00
Nikola Dipanov de0f8773b1 Import cfg from oslo in nova-novncproxy
Upstram OpenStack Nova package has moved the config engine into a
separate package. Mirror that change in the novnc script.
2013-04-08 15:42:56 +02:00
Nikhil Komawar 902c6fb37f Changed the config module which includes CONF
currently CONF was attempted of being imported from nova config.py
rather than openstack/common/cfg.py. this commit fixes that.
2012-11-30 11:50:57 -05:00
Joel Martin 705c54edb6 Sync with websockify.
Pull c33f0b52e7 from websockify.

- Fix for python2.4 with URL parsing.
- Set binaryType earlier in Opera 12.10 to avoid receiving a blob.
- Re-order client and target processing so that pending client data
  has an opportunity to be sent when the target closes.
2012-11-14 12:28:22 -05:00
Terry Wilson f167ea0ecc Mirror FLAGS->CONF change in Nova
Nova recently removed parse_args from flags.py. This updates the
nova proxy to properly use CONF instead of FLAGS.
2012-11-08 17:49:12 -05:00
Joel Martin 3516bdf3fa util/launch.sh: add --web option and try /usr/share/novnc 2012-11-01 11:35:35 -05:00
Joel Martin 49578da448 sync with websockify
Pull in websockify 1669139
2012-10-26 18:07:25 -05:00
Joel Martin 1d728ace69 Change noVNC license to from LGPLv3 to MPL 2.0
The MPL 2.0 license is a "file-level" copyleft license vs the
"project-level" nature of the L/GPL. The intention of noVNC has
always been that it should be easy to incorporate into existing
projects and sites whether free/open or proprietary/commercial. The MPL
2.0 is designed for this sort of combination project but still
requires that any distributed modifications to noVNC source files must
also be published under the same license.

In addition, the MPL 2.0 allows the code to be used in L/GPL projects
(the secondary license clause). This means that any projects that are
already incorporating noVNC should not be impacted by this change and
in fact it should clarify the licensing situation (the exact
application of the L/GPL to web applications and interpreted code is
somewhat ambiguous).

The HTML, CSS, image and font files continue to be under more
permissive licenses (see LICENSE.txt). The included websockify python
code remains under a LGPLv3 license although the include/websock.js
file from the websockify component is now under MPL 2.0 as well.

Permission was received from other noVNC authors to make this change to their
code license on the following dates:

    - Chris Gordon (UI): Jun 24, 2012
    - Antoine Mercadal (DOM,*util.js): Oct 10, 2012
    - William Lightning (UltraVNC repeater): Oct 10, 2012
    - Mike Tinglof (tight encoding): Oct 15, 2012
2012-10-15 13:35:00 -05:00
Joel Martin 8dfd916946 Update websockify
Update to websockify febaeee85c

Gracefully handle errors when popping kwargs:
https://github.com/kanaka/websockify/pull/53
2012-09-21 07:09:45 -05:00
Joel Martin 204675c85d Update websockify/websock.js.
This change pulls websockify 6d9deda9c5.

Most note worthy changes:
- Pulls in web-socket-js 7677e7a954 which updates to IETF 6455 (from
  Hixie)
- Binary support detection and use in include/websock.js
- Add ssl and unix target support
- Add multiple target support via config file/dir.
- Idle timeout exit
2012-09-17 17:00:01 -05:00
Marco Leogrande cf068be2d8 Fix grep pattern when searching for listening sockets
The current grep pattern matches also port numbers that match only
partially the given $PORT number; e.g., if $PORT is 6080, 60800 will
match as well.

While TCP listening sockets in the 60000-65535 range are rare, they
need to be handled as well. The problem is also present if the user
selects a shorter PORT value with the --listen command line argument.

By adding a space, the pattern is fixed.
2012-08-27 22:19:51 -07:00
Joel Martin fc003a13e7 Revert "Pull in latest websockify."
This reverts commit 4dd1bb1ecb.
2012-08-15 13:48:03 -05:00
Joel Martin 4dd1bb1ecb Pull in latest websockify.
Pull in version 376872d99.

Several changes including:
- binary/typed array support in websock.js
- unix socket support
- multiple target support via config file(s)
- prefer IPv6 option
2012-08-14 15:35:48 -05:00
Soheil Hassas Yeganeh 90f18a8a96 Fixes nova rpc package. 2012-06-21 21:38:52 -04:00
Soheil Hassas Yeganeh 9e2351f5eb Switch to nova's new flag API. 2012-06-06 21:26:25 -03:00
Joel Martin 53dfab7fb7 Pull from websockify. Fix close code. 2012-05-10 22:10:01 -05:00
Joel Martin 02d1f19b5f Pull from websockify.
Fix python 2.4 CClose exception handling.
2012-05-10 08:06:43 -05:00
Anthony Young ca78183171 Use explicit check for rpc.register_opts 2012-04-30 14:07:31 -07:00
Anthony Young 901e565503 Update to fix trunk nova issue with rpc library
* rpc flags now must be manually initialized.
2012-04-30 13:34:57 -07:00
Joel Martin c390011099 Update websockify to pull in close code/reason fixes. 2012-04-25 13:46:30 -05:00
Anthony Young 4c75210a4d Add nova-novncproxy
* Adds the nova-novncproxy binary, to provide support for vnc + OpensStack nova
 * Adds the ability to pass an auth token in via url, which is subsequently
   passed back to the proxy as a cookie.
2012-04-03 10:17:47 -07:00
Joel Martin 0c4f4b598c Don't swallow SSL EOF errors. 2012-02-20 16:33:08 -06:00
Joel Martin f66bcda31b Add websockify.py symlink for Windows. 2012-01-05 11:55:56 -06:00
Joel Martin 86ebeef709 Merge branch 'master' of github.com:kanaka/noVNC 2011-12-15 15:34:30 -06:00
Joel Martin f2d856767d websockify: better multi-python version support.
Pull from websockify: 008a5118e728.

Should address issue https://github.com/kanaka/noVNC/issues/107

- Also add ability to force use of web-socket-js using
  window.WEB_SOCKET_FORCE_FLASH

- in websock.js, for rQshift*, assume length is the full length if not
  specified.
2011-12-15 15:26:16 -06:00
Joel Martin 2fa565b375 Fix python3 wss (TLS/SSL) connection detection.
Compare the first byte of the handshake against numbers (character
code) as well as string characters.
2011-12-15 14:45:55 -06:00
Joel Martin 1e50871599 websockify --run-once, --timeout, numpy fallback
Pull websockify 724aa3a.

- Use array module for unmasking HyBi when no numpy module is
    available.

- Detect client close properly when using python 3.

- Print request URL path is specified.

- New option --run-once will exit after handling a single WebSocket
  connection (but not ater flash policy or normal web requests).

- New option --timeout TIME will stop listening for new connections
  after exit after TIME seconds (the master process shuts down).
  Existing WebSocket connections will continue but once all
  connections are closed all processes will terminate.
2011-09-29 16:12:19 -05:00
Joel Martin afecb83988 Pull websockify: python3 numpy buffer/string fix.
Pull from websockify 1c39c7f1f001.
2011-09-10 16:03:39 -05:00
Joel Martin 7b10dc8a48 utils/websocket.py: add HyBi 13 support.
Pull from websockify 6e26306.
2011-08-31 18:06:58 -05:00
Joel Martin 94568bc08d utils/websocket.py: silence partial unmask debug.
Pull from websockify ada02f2.
2011-08-31 15:33:30 -05:00
Joel Martin fa74a6e60c websocket.py: fix payload length calculation.
Pull from websockify 0da91c7.
2011-08-31 15:08:03 -05:00
Joel Martin 48f26d799f websockify: pull HyBi fixes.
Pull 86af0b614d and 7b496ce5b from websockify.

    Fix HyBi support on 64-bit systems.

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

    - cleanup/update TODO.
    - remove explicit check for ctypes module for HyBi.

    Clarify that we support HyBi 07-10.

    HyBi 07 reports version 7 in the handshake.
    HyBi 08-10 report version 8 in the handshake.

    Remove version 9 since that is not yet actually defined.
2011-08-24 13:26:28 -05:00
Joel Martin 46c621175c Fix websockify with python2.4
https://github.com/kanaka/noVNC/issues/72

Pull from websockify 2e00f9643.
2011-08-10 17:54:15 -05:00
Joel Martin c0c143a153 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
2011-07-14 15:57:01 -05:00
Joel Martin 4f8c746518 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.
2011-07-09 13:39:04 -05:00
Joel Martin 3a39bf60f3 Pull IPv6 and HyBi fixes from websockify.
Pull 7ae8711 from websockify.
2011-07-07 15:14:41 -05:00
Joel Martin 123e5e7445 Pull IPv6 support from websockify.
Pull from websockify 247b74950d.
2011-07-07 11:47:11 -05:00
Joel Martin 8c305c60ad 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.
2011-06-26 14:21:56 -05:00
Sam Mussmann 19ed81fdff Fixed minor typo
s/to to/to/
2011-05-19 09:37:28 -07:00
Joel Martin 557efaf856 utils/websocket.py: disable debug output. 2011-05-12 12:55:04 -05:00
Joel Martin 7d14602759 Pull websockify 284ef3cc1a54
Including HyBi-07 support and refactor of send/recv.
2011-05-12 12:33:57 -05:00
Joel Martin 41b9ae6ec9 Sync with websockify. Save handshake headers.
Derived classes will almost certainly want to make use of the raw
info.
2011-04-19 09:37:43 -05:00
Joel Martin 303819eaa9 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.
2011-04-06 11:19:02 -05:00
Joel Martin 40e5c25ad8 utils/rebind, utils/u2x11: use /usr/bin/env 2011-04-06 10:05:59 -05:00
Joel Martin c96f900336 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).
2011-04-05 14:26:54 -05:00
Phil Phillips e9155818c8 Make scripts more compatible across OSes 2011-03-27 04:18:08 +08:00
Joel Martin 159ad55d03 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.
2011-02-03 11:04:32 -06:00