Commit Graph

1035 Commits

Author SHA1 Message Date
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
Joel Martin 361cde7c96 Merge pull request #214 from otherwiseguy/master
Update utils/nova-novncproxy to work with nova master branch
2012-11-08 15:12:24 -08: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 51562999c7 util.js: script load sequential execution changes.
Related to issue: https://github.com/kanaka/noVNC/issues/205

Split out the function to load a single script to Util.load_script.

In order to get sequential load, when on IE set the script defer flag.
It is currently working on webkit and firefox but just in case also
set the script.async flag to make sure that scripts execute in the
order they are added. Scripts should still load in parallel.
2012-11-01 10:47:37 -05:00
Joel Martin e7e6660272 include/playback.js: support binary (non-base64) data files.
Data files should now set the variable VNC_frame_encoding to either
"binary" or "base64". The python websockify recording mode adds this
automatically based on what is negotiated with the client being
recorded.
2012-10-26 18:08:00 -05:00
Joel Martin 49578da448 sync with websockify
Pull in websockify 1669139
2012-10-26 18:07:25 -05:00
Joel Martin c95456c0e1 rfb.js: skip tight when true color is disabled.
Generally this means falling back to 8-bit colour mapped hextile which
is uses more bandwidth and is likely slower that tight with 24-bit
true color.

This is related to this query:
http://superuser.com/questions/484790/how-to-use-8-bit-mode-with-novnc
2012-10-23 16:21:22 -05:00
Joel Martin 73ee4fa7cc util.js: fix dynamic script load on IE 9 (again).
Use a mechanism described here to serialize the execution of scripts
under IE: http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order
Basically, we set the src attribute but do not append the script to
the body/head until after readyState is "loaded". Unfortunately, Opera
uses readyState but in a different way (always "loaded" for both load
and execution).

This is related to (and hopefully fixes) these issues:
https://github.com/kanaka/noVNC/issues/194,
https://github.com/kanaka/noVNC/issues/205,
https://github.com/kanaka/noVNC/issues/208.
2012-10-23 15:54:08 -05:00
Joel Martin 5514d29950 vnc.html: use standard HTML5 doctype.
The mobile doctype doesn't not seem to make any difference on iOS so
I'm dropping it and just going with the standard HTML5 version since
the wapforum mobile version may cause issues with IE 10.
2012-10-19 12:18:48 -05:00
Joel Martin 57430b8c12 ui.js: fix drag button so it can be toggled off. 2012-10-19 12:18:21 -05:00
Joel Martin e881ce5a1b Merge remote branch 'Medical-Insight/non-square-cursor-fix' 2012-10-18 17:44:13 -05:00
Joel Martin 8e2d749605 util.js: script load sequential execution changes.
Related to issue: https://github.com/kanaka/noVNC/issues/205

Split out the function to load a single script to Util.load_script.

In order to get sequential load, when on IE set the script defer flag.
It is currently working on webkit and firefox but just in case also
set the script.async flag to make sure that scripts execute in the
order they are added. Scripts should still load in parallel.
2012-10-18 16:13:00 -05:00
Joel Martin 60106f240a Revert "supprt ALTGR key event"
This reverts commit 079504a6d2.
2012-10-17 15:37:24 -05:00
Joel Martin c527482ebf Merge pull request #195 from moobyfr/keyboard-altgr
Keyboard altgr
2012-10-17 13:30:50 -07:00
Joel Martin 35785a9081 Add binary/base64 data mode to perf/playback tests. 2012-10-17 11:58:13 -05:00
Joel Martin 6f4b1e4071 Refactor dynamic script loading. Add util.js:load_scripts()
Related to issue/pulls:
https://github.com/kanaka/noVNC/issues/194
https://github.com/kanaka/noVNC/pull/201
https://github.com/kanaka/noVNC/pull/202

In IE9, the window.onload event can fire before dynamically loaded
scripts have finished loading. This can result in either WebSocket (in
the case of vnc_auto.html) or RFB (in the case of vnc.html) not being
defined at the point when window.onload is called.

- Move the load_scripts routine from vnc.js to util.js (so that
  websockify can use it too). Also, refactor to work when load_scripts
  is called by a script that itself uses load_scripts. When the whole
  chain of dynamically loaded scripts is finished then call
  window.onscriptsload. Use this mechanism in all the places that
  depend on dynamic loading of scripts: vnc.html, vnc_auto.html,
  websock.js, tests/vnc_playback.html, and tests/vnc_perf.html.

- Use the new window.onscriptsload handler instead of window.onload.

- Remove include/start.js and do the script loading and startup event
  handling in include/ui.js instead.
2012-10-17 11:58:12 -05:00
vj 6f4cbb3f3c Always generate square cursor images in changeCursor (fix portrait mode issue).
This is a workaround for corrupted non-square cursors seen on some
Windows 7 machines with NVIDIA cards. The corruption only happens when
the screen is in portrait mode.
2012-10-17 09:56:20 +02:00
Joel Martin 7a6c94b6b9 Merge pull request #191 from takaha/altgr
support ALTGR key event
2012-10-16 08:09:35 -07:00
Joel Martin e16ad2fd02 Refactoring hot blocks to help Chrome optimizing compiler. 2012-10-15 13:48:07 -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 ab7674ff73 include/base64.js: update to MPL 2.0 base64 code from Mozilla
This updated version is imported from:
http://hg.mozilla.org/mozilla-central/raw-file/ec10630b1a54/js/src/devtools/jint/sunspider/string-base64.js
2012-10-10 14:36:44 -05:00
Blindauer Emmanuel c76b2a8101 Handle Super and Menu keys (Windows keys) 2012-10-06 10:31:47 +02:00
Hirokazu Takahashi 079504a6d2 supprt ALTGR key event 2012-09-25 15:55:06 +09: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 8534fea664 debian/novnc.install: pick up include/start.js 2012-09-20 14:04:35 -05:00
Joel Martin d5fe15096b include/webutil.js: fix when 'chrome' global not present. 2012-09-17 17:18:44 -05:00
Joel Martin 6f955236e6 include/ui.js: call setBarPosition on initial load.
Call setBarPosition on initial load and not just when the window size
changes or scrolling happens.
2012-09-17 17:15:50 -05:00
Joel Martin 5f03c3d093 tcp-client.js: after read, try read again.
After a read completes it's possible more data is pending so issue an
immediate read again to pick this up quickly.
2012-09-17 17:15:50 -05:00
Joel Martin 2cde6e4380 include/vnc.js: dynamic load without document.write.
Instead of using document.write to load scripts, use createElement to
create and append script tags. document.write is problematic in a lot
of situation and in particular is not allowed in a Chrome
extension/packaged app.

Also, in webutil.js, instead of calling init_logging during parsing of
include/webutil.js, rely on the caller to do this. The problem is that
calling init_logging on parse tries to call Util logging functions and
the new model of dynamic load may not having Util loaded by the time
webutil is parsed.
2012-09-17 17:15:49 -05:00
Joel Martin 26945049be vnc.html, ui.js: move all Javascript to ui.js.
Move all the inline Javascript event handlers from vnc.html to
include/ui.js except the load handler which is moved to
include/start.js). This is on the path towards a Chrome
extension/packaged app since inline Javascript is prohibited in that
situation.
2012-09-17 17:15:49 -05:00
Joel Martin ee1af44161 ui.js: use localStorage/chrome.storage for settings.
Switch from using cookies to store setting to using localStorage (or
chrome.storage.sync if available in extension/app mode) for the
settings. Also refactor to make the initializing of the setting and
and loading of the UI to be more asynchronous.
2012-09-17 17:15:49 -05:00
Joel Martin 3af1c2751b webutil.js: add localStorage/chrome.storage settings.
Add routines to store/read settings in either localStorage or in
chrome.storage.sync (which is synchronized between browsers for
extensions/apps).

Before using chrome.storage.sync the initSettings routine must to
called setup the intermediate cache which speeds up access and allows
multiple setting changes to be coallesced to avoid hitting storage
change frequency limits/quotas.
2012-09-17 17:15:49 -05:00
Joel Martin 51fc3b5f03 rfb.js: add onFBResize event callback. 2012-09-17 17:15:48 -05:00
Joel Martin dbec398406 Note that tcp-stream.js is Apache 2.0 LICENSE.
Also, include Apache-2.0 license text.
2012-09-17 17:15:48 -05:00
Joel Martin 8ec3cfaacd tcp-client.js: read/write arraybuffer. Read/disconnect handling.
- enable sending and receiving of raw array buffers in addition to
  strings.

- add a read poll interval and set it to 15ms by default to detect
  and handle quickly when a message is pending.

- also, detect a disconnected state and add call registration for
  disconnect events.
2012-09-17 17:15:48 -05:00
Joel Martin 07392d4fb8 include/chrome-app/tcp-client.js: import upstream.
Import upstream code from Chrome extension telnet demo:
https://raw.github.com/GoogleChrome/chrome-app-samples/0ce28768087863c08aa04a2b9b27bd50796a77ec/telnet/tcp-client.js
2012-09-17 17:15:47 -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
Joel Martin 3435491edb Merge branch 'binary', fix encode_message
Conflicts:
	include/websock.js

For some reason encode_message was missed. But I'm just punting and
doing the fixup in the merge. Yeah, tsk, tsk.
2012-09-14 17:46:48 -05:00
Joel Martin 39188f4ea8 doc/release.txt: fix small error in process.
Push master and version tag separately.
2012-09-14 17:07:13 -05:00
Joel Martin ceec05260e noVNC version 0.4 2012-09-14 17:00:56 -05:00
Joel Martin cbb55df039 README: simplify projects/companies. News/help/contact section.
Instead of continuing to maintain the full list of project/companies
that use noVNC in multiple places (README, wiki, web page) just link
to the wiki page.

Link to noVNC discussion group page. Link to issues page. Link to
Amazon wishlist and non-profits for appreciation.
2012-08-28 17:45:48 -05:00
Joel Martin 625040fc90 README: simplify projects/companies. News/help/contact section.
Instead of continuing to maintain the full list of project/companies
that use noVNC in multiple places (README, wiki, web page) just link
to the wiki page.

Link to noVNC discussion group page. Link to issues page. Link to
Amazon wishlist and non-profits for appreciation.
2012-08-28 17:39:02 -05:00
Joel Martin af6e9e2408 Merge pull request #185 from dark/master
Fix grep pattern when matching netstat output
2012-08-28 06:59:52 -07: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 fa5b334dcb webutil.js: use decodeURIComponent on getQueryVar values. 2012-08-21 09:46:11 -05:00
Joel Martin fcff386b92 websock.js: simpler binary support, protocols param.
Use a simpler method of enabling binary transfer over WebSockets. This
still presents the user of websock.js with a plain javascript array
for the receive queue data. However, if binary support is supported
and requested then the transfer will be raw frames instead of base64
encoded.

Lots of room for optimization here but for now correct is better than
fast.

Pull from websockify 17175afd7311c55abd8d
2012-08-16 13:31:31 -05:00
Joel Martin fc003a13e7 Revert "Pull in latest websockify."
This reverts commit 4dd1bb1ecb.
2012-08-15 13:48:03 -05:00
Joel Martin ca6b3f4cb1 Revert "Fix tight decoding when using binary/non-base64 connection."
This reverts commit 14717eb468.
2012-08-15 13:47:37 -05:00
Joel Martin 14717eb468 Fix tight decoding when using binary/non-base64 connection. 2012-08-15 12:45:53 -05:00