Commit Graph

154 Commits

Author SHA1 Message Date
Solly Ross a80955ee7a [infra] fix vendor import paths on built files
A previous commit started (quasi-correctly) rewriting vendor import
paths on built files.  The gist of it was correct, but it incorrectly
rewrote paths in vendor itself.

The babel plugin in use operated on canonical absolute paths.  This mean
that it saw no difference between the import
`../vendor/pako/lib/utils/foo` and `../utils/foo`, where the later was
actually in the `vendor/pako/lib/bar` directory.  This rewrote imports
in files in the vendor directory itself.  However, since those files
were *already* in the correct relative location, the new import was
incorrect by a degree of `..`.

Now, we only rewrite vendor paths on things in the `core` directory.
2017-10-03 19:30:20 -04:00
Solly Ross c4e5a50e09 [infra] option to clean on use_require.js
This adds an option to `utils/use_require.js` which cleans the lib
and build directories before regenerating them.  This will enable us
to make sure we always have a fresh copy of the lib dir before
publishing.
2017-10-03 18:21:36 -04:00
Pierre Ossman 1524df89ad Adjust import of vendor/ modules in NPM package
We move the files in core/ up one directory level so we need to adjust
the imports from vendor libraries.
2017-07-04 10:10:36 +02:00
Pierre Ossman d5c5b4aab7 Properly use babel opts
We prepared an options object for babel, but didn't include it properly
in the final call to babel.
2017-07-04 10:09:04 +02:00
Pierre Ossman 545442afc3 Merge branch 'keyboard' of https://github.com/CendioOssman/noVNC 2017-05-04 12:18:55 +02:00
Samuel Mannehed 101ff12736 Update url's 2017-04-19 15:33:42 +02:00
Pierre Ossman 278a5e7fbd Simplify keysymdef.js
Some Unicode to Keysym mappings can be computed and can therefore
be left out of the huge lookup table.
2017-03-24 11:31:38 +01:00
Pierre Ossman 041568bd31 Clean up keysymdef 2017-03-24 11:26:02 +01:00
Pierre Ossman 524d67f283 Remove keysym names from keysymdef.js
They were incomplete and turned off in most cases so they served
little use besides adding complexity.
2017-03-24 11:16:53 +01:00
Pierre Ossman 9076defaca Get parse.js in sync with generated code
The generated keysymdef.js was recently converted to ES modules,
but the generating script was overlooked.
2017-03-24 10:49:00 +01:00
Solly Ross 152c399513 Vendor in an IE11 polyfill for Promises
This commit introduces a polyfill to add support for Promises in IE11.
This means IE11 can be tested without first running
`utils/as_require.js`.
2017-03-21 17:39:07 -04:00
Solly Ross adfc9d3f54 Move error handler into separate file
This commit moves the global error handler into a separate file,
so that it can catch module loading errors.

This also adds support for properly displaying error messages with
newlines in them (since the module loader may throw those)
2017-03-21 17:39:07 -04:00
Solly Ross 399fa2ee2d Optimize ES6 Module Loader Polyfill
This commit makes the ES6 module loader polyfill use Web Workers,
so that Babel doesn't block the browser from animating.  It also
uses localStorage to cache the compiled results, only recompiling
on source changes, so it makes loading faster while developing noVNC.

This includes a vendored copy of the ES6 module loader, modified as
described above.
2017-03-21 17:39:07 -04:00
Solly Ross 6cae7b58b8 Allow transforming to any format
This changes around `utils/use_require.js` to be able to generate any
of AMD (RequireJS), CommonJS, SystemJS, or UMD modules.  The three
former also include support for translating `vnc.html`, producing a full
"app" version of noVNC.
2017-03-07 11:11:28 -05:00
Pierre Ossman 115eedf69c Use Unicode keysym range as fallback
Not all Unicode codepoints have an equivalent named Keysym. But
there is a range in the Keysym namespace that can be used to map
any codepoint to.
2016-10-15 14:58:55 +02:00
Solly Ross 9dfbf44028 Merge pull request #603 from WardF/master
Added option for --ssl-only noVNC session to launch.sh
2016-09-16 17:16:43 -04:00
Solly Ross bd5340c7ee Move input-related files into core/input
This commit moves all the input-related files from `core/`
to `core/input/`, and renames a couple as relevant
(input.js --> input/devices.js, keyboard.js --> input/util.js).
2016-09-16 15:49:52 -04:00
Solly Ross ae510306b5 Enable noVNC to become Browserifiable
This commit restructures noVNC, splitting it into the core directory
and the app directory, with the former containing core noVNC parts,
and the latter containing parts specific to the application.
2016-09-16 15:49:51 -04:00
Trần Tuấn Anh 12f4747ced Removing unused import (#642) 2016-08-26 11:09:22 +02:00
nunojusto 83d3e02fd9 Update launch.sh
Just a correction of port in use test algoritm.
This way we will not have problems when using port X and having some other service using zyX or any *X port
2016-08-16 22:10:14 +01:00
Joel Martin 15e733f533 Clarify that utils/launch.sh is MPL-2.0
Also, note in the top-level license file that the default noVNC
license for files that are not explicitly marked or mentioned in
the LICENSE.txt file are by default MPL-2.0 licensed.
2016-06-13 10:22:43 -05:00
Ward Fisher 27a1f6cb95 Tweaked message printed based on whether or not http is available. 2016-04-11 14:42:42 -06:00
Ward Fisher c77d9fcc4e Added an '--ssl-only' option to noVNC launch script. This will pass through to Websockify, allowing a user to specify that only ssl-secured connections will be allowed. 2016-04-11 14:32:14 -06:00
Solly Ross 4ee55e0126 Fixed vnc_perf.html
This commit updates vnc_perf.html so that it works with the current
version of noVNC.  It also introduces a utility to convert noVNC session
recordings recorded in base64-mode to binary-mode recordings, since noVNC
no longer supports base64-mode.

Fixes #479.
2016-01-06 13:32:05 -05:00
Sarrailh Rémi 54e835eeac Small typo in launch.sh 2015-11-23 13:08:05 +01:00
Solly Ross c802d93189 Make sure Pako always has enough room
Previously, we used a fixed chunkSize of 100KiB for Pako's output
buffer.  Using a hardcoded size caused issues, since Pako would assume
we wanted to use multiple chunks, and we didn't deal with this.  Now,
`Inflator#inflate()` takes a new `expected` argument, which indicates
the expected output size.  If this is bigger than the current chunkSize,
Inflator allocates a new output buffer that's big enough to hold the
output.

Fixes #531
2015-09-23 09:53:00 -04:00
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00
Solly Ross 2ace90e6d5 Follow symbolic links in launch.sh
Previously, in launch.sh, `$HERE` was the directory of `$0`.
However, if `$0` was actually a symlink, `$HERE` would be
wherever the symlink was, which could cause issues (for
example, the script wouldn't be able to local `$WEB` or
`$WEBSOCKIFY` properly).

Now, `$HERE` looks at whatever `$0` points at instead.

Closes #447.
2015-03-26 16:57:17 -04:00
Solly Ross fe8a4dc9d8 Remove last bits of websockify cruft
Issue #449 pointed out that there were some files that were
missed in 6f5148648b.  This
fixes that.

Closes #449
Closes #450
2015-02-17 23:15:51 -05:00
Solly Ross 9db6a90677 Make sure websockify is cloned to the correct dir
When `utils/launch.sh` clones websockify, it can be cloned
into the incorrect directory, depending on how `utils/launch.sh`
is run.  This commit ensures that websockify is always cloned into
`utils/websockify`.
2015-02-17 17:54:21 -05:00
Solly Ross 5cd6de495f Actually remove the "websockify" file
Somehow, `utils/websockify` itself manage to sneak back in to
6f5148648b.  This actually removes
it.
2015-02-17 17:45:57 -05:00
Solly Ross 6f5148648b Remove local copies of websockify
This commit removes local copies of websockify.
Instead `utils/launch.sh` performs the following logic:

If `utils/websockify` exists, use `utils/websockify/run` (if the latter
does not exist, or is not executable, fail, since this is probably a
mistake).

Otherwise, check to see if websockify is installed somewhere (try
`which websockify`).  If it is, use that.  Otherwise, clone
websockify from github, and tell git to ignore that directory.

Packaged versions of noVNC should simply list websockify as a
requirement.  The debian packaging has been updated to reflect
this.

Closes #433
2015-02-16 17:09:58 -05:00
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