Commit Graph

1006 Commits

Author SHA1 Message Date
Dmitry Sankevich 33e1462999 Fix TIGHT negotiation with zero sub-auth types
According to the RFB protocol, when in TIGHT auth negotation,
if the client receives a sub-auth count of zero, it should proceed
as if the `None` sub-auth type had already been selected (and not
send a message selecting that type).

Closes #564
2016-09-16 23:22:35 -04:00
Solly Ross f9a0404f51 Merge pull request #661 from kanaka/feature/realvnc5-version-number
Detect RealVNC's VNC 5.0 Protocol Version
2016-09-16 17:50:04 -04:00
Lars Ole Hurlen 49aa5b81c7 Detect RealVNC's RFB 5.0 Protocol Version
The RFB protocol specifies a max version of 3.8, but RealVNC likes to
increment their version when they add new features.  RealVNC 5.3 sends
"005.000" as the version string, since they've extended their
implementation upon RFB v3.8.  We can detect that, and just tell them we
only speak 3.8, instead of barfing on "005.000" as an invalid version.
2016-09-16 17:33:46 -04: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 386db8f54f Merge pull request #496 from kanaka/refactor/modularized
Enable noVNC to become Browserifiable
2016-09-16 16:16:09 -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 b4ef49ea36 Remove unecessary event-related code from Util
The event-related wrapper functions in Util existed mainly for
backwards-compat.  However, all currently supported browsers
support the standard functions, so these wrappers are no longer needed.
2016-09-16 15:49:52 -04:00
Solly Ross e4fef7be2d Util shouldn't modify window object
This commits prevents Util from modifying the window object.

- `window.requestAnimFrame` was removed (no polyfill is needed anymore)
- the potential redefinition of `console.log` and friends was removed
  (all supported browsers have `console.xyz` defined anyway)
2016-09-16 15:49:52 -04:00
Solly Ross 9eca6889be Switch to PhantomJS 2.x for testing
This commit switches over to use PhantomJS 2.x, bringing in a whole host
of improvements (including `Function#bind`, so we can remove the
`Function#bind` shim in core/util.js).
2016-09-16 15:49:52 -04:00
Solly Ross 3949a09534 Don't modify Array prototype
This commit removes our modification of the Array prototype.
It wasn't actually used much in the main code, anyway, and it's a
bad practice to modify built-in prototypes.
2016-09-16 15:49:52 -04:00
Solly Ross 72bdd06ea2 Clean up Util
This commit removes unused code from Util, and moves the script-loading
functionality to WebUtil.
2016-09-16 15:49:52 -04:00
Solly Ross a62b1b352a Clean up unused files in tests
There were quite a few old/irrelevant files in `tests/`.
This commit removes them.
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
Samuel Mannehed 7a16304e52 Update copyright 2016-09-03 19:26:29 +02:00
Samuel Mannehed 17f67ca83c Fix indentation in list of encodings 2016-09-01 16:00:22 +02:00
Samuel Mannehed 25e4928fbb Move QEMUExtendedKeyEvent encoding
The encoding list is ordered by number.
2016-09-01 15:59:01 +02:00
Samuel Mannehed 058be7851d Add missing commas and semicolons 2016-09-01 15:56:28 +02:00
Solly Ross f4f4e8993d Merge pull request #596 from danielhb/master
QEMU RFB extension

Fixes #21 🎉 (again)
2016-08-29 13:28:15 -04:00
Daniel Henrique Barboza 49637e432e QEMU RFB extension - keyboard.js changes
Added a 'QEMUKeyEventDecoder' method to deal with the
key events generated when the QEMU extension is active. Another
method, 'TrackQEMUKeyState', was also created with this same
goal.

Although both methods have similaries with the existing methods
'KeyEventDecoder' and 'TrackKeyState', specially when dealing
with 'supress' and 'releaseall', the logic behind the QEMU extension
does not required keysym generation for most cases (some NumPad keys
are an exception) and, as such, there is no need to treat 'keyPressed'
events and to handle char modifiers.

'TrackQEMUKeyState' also handles a Windows scenario where the
'AltGR' key generates CtrlLeft and AltRight keystrokes. The solution
was to avoid this specific combination to be sent to the VNC server,
discarding the extra 'CtrlLeft' key. Considering that the user can
send CtrlLeft+AltLeft, CtrlRight+AltRight and even CtrlRight+AltLeft,
this workaround to allow Windows users to use AltGR in their noVNC
sessions is worthwhile.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:34:39 -03:00
Daniel Henrique Barboza 8f06673a25 QEMU RFB extension - rfb.js and input.js changes
In input.js, a new keyboard handler was added to deal exclusively
with the QEMU key event extension. '_onKeyPress()' signature
was changed to allow the same method to treat both cases.

The extension will only be enabled if the browser has support
for the KeyboardEvent.code property.

Changes in rfb.js:

- added a new extension code, QEMUExtendedKeyEvent, value -258.

- handleKeyPress now receives 'keyevent' instead of 'keysym' and
'down'. Both values are retrieved from keyevent as they were
in the previous signature. This method now can send QEMU RFB
extended key messages if the flag was set to 'true'.

- tests/test.rfb.js were changed folowing the onKeyPress() signature
change.

- added a new function to send the QEMU extended key message.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:34:39 -03:00
Daniel Henrique Barboza 99feba6ba8 QEMU RFB extension - new file xtscancodes.js
This new file contains the XT scancode mapping that
the extension will use in rfb.js file.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
2016-08-26 17:06:42 -03:00
samhed 4e0c36dda7 Add missing return values 2016-08-26 12:20:51 +02:00
samhed 9104d3b567 Remove unnecessary debug logging 2016-08-26 12:19:30 +02:00
samhed c4df8ca92c Remove bad trailing commas 2016-08-26 12:18:28 +02:00
samhed bf568e56f0 Merge branch 'continuousupdates' into noVNCmaster 2016-08-26 12:06:05 +02:00
Trần Tuấn Anh 12f4747ced Removing unused import (#642) 2016-08-26 11:09:22 +02:00
samhed 76a86ff514 Add support for ContinuousUpdates
Instead of requesting frame buffer updates we can, if the server
supports it, continuously recieve frame buffer updates at a rate
determined by the server.

The server can use fencing messages and measure response times to
determine how often it will continue to send updates.
2016-08-26 11:04:19 +02:00
Samuel Mannehed da17d0369d Add missing event argument and curly bracket 2016-08-25 16:49:02 +02:00
Samuel Mannehed b9efece4a8 Fix window close warning
The code didn't follow current API for the beforeunload event.
2016-08-25 15:40:11 +02:00
Samuel Mannehed 9d16e512ba Proper spacing 2016-08-25 15:16:04 +02:00
Samuel Mannehed e961641fa9 Fix the extra keys
Commit 529c64e103 broke this. #shame#
2016-08-25 14:40:21 +02:00
Solly Ross 342d408d64 Merge pull request #583 from kanaka/bug/misc-fixes
Misc Fixes (ImageData Constructor Detection and Firefox Nightly Bug Workaround)
2016-08-23 16:00:48 -04:00
Solly Ross 19c19bed06 Merge pull request #632 from patrakov/master
Fixed BLIT RGB data buffer size

The RGB buffer size was incorrectly marked as `pixels * 4` instead of the correct `pixels * 3`

Fixes #615
2016-08-23 15:11:03 -04:00
Solly Ross c7925074c4 Revert poor workaround for brief Firefox bug
This commit reverts a fix for a bug which briefly occured on certain
nightlies of Firefox.  It was never intended to persist in the code
base, and is causing other actual errors to be swallowed.
2016-08-23 15:02:45 -04:00
Solly Ross 6521c6ac0f Fix ImageData Constructor Support Detection
Our support detection for the `ImageData(data, width, height)` constructor
would fail in certain browsers because the size of a 1x1 ImageData's
Uint8ClampedArray is 4, not 1.
2016-08-23 15:01:31 -04:00
Joel Martin 54fc35248d Merge pull request #640 from nunojusto/patch-1
Update launch.sh
2016-08-16 17:34:38 -05: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
Alexander E. Patrakov 6024677ffa Fixed RGB data buffer size (#615) 2016-07-31 21:55:04 +05:00
Solly Ross da82b3426c Release 0.6.1
Fixes version number mismatch (also adds more detailed instructions
for releasing).

Fixes #628
2016-07-04 15:29:00 -04:00
Solly Ross 5230ab6764 Release 0.6.0
This bumps the release version to 0.6.0
2016-07-01 15:42:14 -04:00
Solly Ross 67685d0700 Fix missing mistyped setTimeout handler in UI
This commit fixes a mistyped setTimeout handler that would result
in the desired function not getting called (due to a missing set
of parentheses).  It also removes some uncessary anonymous functions,
and just passes the function objects directly to setTimeout.
2016-07-01 15:42:14 -04: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
samhed b2cdd55859 Proper error handling for tight filters
Don't throw an exception when we encounter an unsupported tight
subencoding.
2016-06-10 17:15:42 +02:00
samhed 3daa86cbae Update vnc_auto after the screen namechange
Commit 553864e858 changed the name of
noVNC_screen to noVNC_container, vnc_auto.html was not updated
accordingly. Fixes #621
2016-06-08 16:02:37 +02:00
samhed 3df1326239 Add support for fences
We don't actually use these, but servers may require this for other
features.
2016-06-03 16:37:19 +02:00
samhed 37195e4b5e Lower level check for framebuffer update requests
Try to avoid using helper functions with complex logic when verifying
results as those helper functions are also something we want to verify.

Also add a test for a mix of clean and dirty areas specifically to make
sure that helper function behaves properly.
2016-06-03 16:35:59 +02:00
samhed 89d2837fa8 Always flush socket after each message
Make sure our messages go away right away, rather than having to
remember to call flush from the caller, or causing extra delays by
waiting for the send timer. This should result in a more responsive
system.
2016-06-03 16:32:28 +02:00
samhed b1538a0fa4 Fix 'sent' assertion
We were completely mishandling the length of the data. Make sure
we look at the length of the websocket rather than the websock object,
and also compare with the expected length.
2016-06-03 16:31:29 +02:00
samhed cf0236de18 Fix typo in pointer event test 2016-06-03 16:31:12 +02:00
samhed 3af1a3a05b Avoid unnecessary delays
We only use setTimeout() to avoid hanging the browser, not because we
actually want a delay. So let's use the smallest delay there is.
2016-06-03 10:55:42 +02:00