]>
git.proxmox.com Git - mirror_novnc.git/log
Pierre Ossman [Thu, 29 Aug 2024 14:51:16 +0000 (16:51 +0200)]
Let fake WebSocket handle large sends
Dynamically grow the recorded send buffer if the test needs to send a
lot of data.
Tomasz Kalisiak [Fri, 23 Aug 2024 11:14:36 +0000 (13:14 +0200)]
Fix sQpushBytes sending the beginning of the array multiple times
Pierre Ossman [Mon, 19 Aug 2024 12:01:00 +0000 (14:01 +0200)]
Fix host and port via query string
We need to call initSetting() even if we don't have any interesting
default to set, as that is what checks if values have been provided as a
query string.
Fixes
96c76f7 .
Mark Peek [Thu, 15 Aug 2024 16:39:05 +0000 (09:39 -0700)]
Add Zlib encoding
Pierre Ossman [Thu, 8 Aug 2024 12:53:42 +0000 (14:53 +0200)]
Allow relative WebSocket URLs
This can be very useful if you have multiple instances of noVNC, and you
want to redirect them to different VNC servers.
The new default settings will have the same behaviour as before for
systems where noVNC is deployed in the root web folder.
Pierre Ossman [Thu, 8 Aug 2024 12:40:04 +0000 (14:40 +0200)]
Let browser construct URL string for us
Likely a lot safer for corner cases than us trying to figure this out
ourselves.
Pierre Ossman [Mon, 5 Aug 2024 14:31:59 +0000 (16:31 +0200)]
Add test for AltGr abort on blur
Pierre Ossman [Mon, 5 Aug 2024 14:30:47 +0000 (16:30 +0200)]
Merge branch 'altgr-seq-interrupt' of https://github.com/leedagee/noVNC
Pierre Ossman [Mon, 5 Aug 2024 12:23:54 +0000 (14:23 +0200)]
Manually load sinon and chai
karma-sinon-chai is not compatible with Chai 5+, and Karma is no longer
being updated.
Load sinon and chai manually instead, until we can have a long term plan
in place.
Pierre Ossman [Mon, 5 Aug 2024 13:44:07 +0000 (15:44 +0200)]
Stop creating sinon sandbox early
sinon might not be loaded at this point, which can cause tests to fail.
We could create the sandbox in one of the hooks instead, but let's
remove the sandbox completely to stay consistent with our other tests.
leedagee [Wed, 31 Jul 2024 17:31:47 +0000 (01:31 +0800)]
Interrupt AltGr sequence detection on focus lost, fixes #1880
Samuel Mannehed [Mon, 22 Jul 2024 22:19:26 +0000 (00:19 +0200)]
Use theme-color to color address bar in browsers
This makes the address bar on mobile browsers match the background. Note
that it requires a valid certificate and a non-dark mode set on the
device. Not supported on desktop browsers.
Pierre Ossman [Tue, 18 Jun 2024 12:05:35 +0000 (14:05 +0200)]
noVNC 1.5.0
Pierre Ossman [Tue, 18 Jun 2024 12:03:30 +0000 (14:03 +0200)]
Update json files for new translations
Pierre Ossman [Tue, 18 Jun 2024 12:02:34 +0000 (14:02 +0200)]
Update Swedish translation
Pierre Ossman [Tue, 18 Jun 2024 12:01:40 +0000 (14:01 +0200)]
Don't include missing translation in .js
It just adds size and confusion. Instead, omit any lines where no
translation is available.
Pierre Ossman [Thu, 13 Jun 2024 06:38:00 +0000 (08:38 +0200)]
Remove Chrome timeout workaround
This is a revert of
fca48df85d394b2c1e9d26ed6e9d10d33db9f4f4 . The issue
seems to be fixed in the current version of Chrome, so let's keep things
simple again.
Pierre Ossman [Mon, 3 Jun 2024 12:14:24 +0000 (14:14 +0200)]
noVNC 1.5.0 beta
Pierre Ossman [Mon, 3 Jun 2024 12:45:11 +0000 (14:45 +0200)]
Upgrade to websockify 0.12.0 in snap package
Pierre Ossman [Mon, 3 Jun 2024 12:10:47 +0000 (14:10 +0200)]
Update translation template file
Pierre Ossman [Mon, 3 Jun 2024 12:09:00 +0000 (14:09 +0200)]
Remove Twitter links
These are not updated anymore as they are not under the control of the
current team.
Pierre Ossman [Thu, 16 May 2024 14:53:49 +0000 (16:53 +0200)]
Add unit tests for Tight gradient filter
Jiang XueQian [Thu, 2 May 2024 12:41:38 +0000 (20:41 +0800)]
Implement gradient filter of tight decoder, fixing issue #1767
This commit is a basic implementation of the gradient filter required by
qemu `lossy` option.
Samuel Mannehed [Tue, 30 Apr 2024 13:25:03 +0000 (15:25 +0200)]
Cleanup "no-console" eslint rules
Removes unexpected exceptions and clarifies where we want to avoid
console calls.
Samuel Mannehed [Mon, 22 Apr 2024 06:49:30 +0000 (08:49 +0200)]
Migrate deprecated eslint config to to new format
The .eslintrc and .eslintignore formats are deprecated. The new format
uses a single eslint.config.js (or .mjs) file at the top.
Samuel Mannehed (ThinLinc team) [Fri, 26 Apr 2024 07:41:25 +0000 (09:41 +0200)]
Merge pull request #1853 from kosmasgiannis/gr20240424
Updated greek translations
Giannis Kosmas [Wed, 24 Apr 2024 16:53:49 +0000 (19:53 +0300)]
Updated el.po
Bubble [Wed, 24 Apr 2024 14:54:24 +0000 (22:54 +0800)]
Update zh_CN.po (#1851)
Update Chinese translation
Kostiantyn Syrykh [Mon, 25 Mar 2024 15:35:28 +0000 (17:35 +0200)]
Clipboard: handle multiple CR+LF
Samuel Mannehed (ThinLinc team) [Thu, 22 Feb 2024 15:26:51 +0000 (16:26 +0100)]
Merge pull request #1834 from sbungartz/avoid-exception-when-disconnecting-after-dom-morph
Avoid exception when cursor was removed from DOM already
Pierre Ossman [Mon, 5 Feb 2024 15:58:00 +0000 (16:58 +0100)]
Merge branch 'actions' of github.com:CendioOssman/noVNC
Pierre Ossman [Mon, 5 Feb 2024 15:43:29 +0000 (16:43 +0100)]
Fix import of "commander"
The default import was deprecated ages ago, and in v12 it has now
finally been changed in a breaking way.
Change the code to import things the proper way.
Pierre Ossman [Mon, 5 Feb 2024 15:34:47 +0000 (16:34 +0100)]
Update github actions to latest versions
Primarily to avoid the versions that are now deprecated, but also update
actions/upload-artifact to keep us up to date.
Samuel Mannehed [Fri, 2 Feb 2024 15:51:21 +0000 (16:51 +0100)]
Make non-HTTPS message more harsh
As browsers are placing more and more new functionality as
secure-context only, we need to prepare users for more problems. I find
it likely that we will disable non-HTTPS connections in the future.
Simon Bungartz [Wed, 31 Jan 2024 16:16:01 +0000 (16:16 +0000)]
Avoid exception when cursor was removed from DOM already
Pierre Ossman [Tue, 23 Jan 2024 11:54:18 +0000 (12:54 +0100)]
Pierre Ossman [Tue, 23 Jan 2024 11:51:35 +0000 (12:51 +0100)]
Handle broken Oculus browser keyboard events
It sets KeyboardEvent.key to "Unidentified" for all non-character keys,
which means we must ignore it and use the legacy handling to figure out
the key pressed.
Pierre Ossman [Fri, 19 Jan 2024 14:58:48 +0000 (15:58 +0100)]
Increase test timeout for Chrome on Windows
There is some bug in Chrome 119+ on some systems, where it takes
forever for the first readback from a canvas, timing out the first
test that does this.
Work around the issue by increasing the timeout on that platform until
Chrome manages to resolve the issue.
Pierre Ossman [Wed, 17 Jan 2024 15:19:16 +0000 (16:19 +0100)]
Don't include ES6 module versions in npm package
The npm package is supposed to be for CommonJS usage, so only package
that to avoid confusion. This has become an issue now that nodejs
supports ES6 modules, where users are accidentally trying to import the
wrong files and get errors.
Pierre Ossman [Wed, 10 Jan 2024 13:44:44 +0000 (14:44 +0100)]
Upgrade base snap to Ubuntu 22.04
Ubuntu 18.04 base snap is no longer supported, so switch to the
currently newest one.
Pierre Ossman [Wed, 10 Jan 2024 06:56:13 +0000 (07:56 +0100)]
Remove unused npm dependencies
These should have been removed as part of
890cff9 .
Pierre Ossman [Tue, 5 Dec 2023 10:33:15 +0000 (11:33 +0100)]
Handle relative paths in novnc_proxy
websockify changes the working directory before it starts looking for
files, so we must give it relative paths for things to work reliably.
Pierre Ossman [Tue, 5 Dec 2023 10:30:30 +0000 (11:30 +0100)]
Handle immediate connection errors
The browser might throw an exception right away if there is something it
doesn't like with our connect attempt. E.g. using a non-TLS WebSocket
from a TLS web page.
Pierre Ossman [Fri, 27 Oct 2023 10:57:09 +0000 (12:57 +0200)]
Merge branch 'listen-host' of https://github.com/afbjorklund/noVNC
Anders F Björklund [Sat, 14 Oct 2023 07:52:13 +0000 (09:52 +0200)]
Remove comment about websockify command arguments
Anders F Björklund [Sat, 14 Oct 2023 07:51:29 +0000 (09:51 +0200)]
Document default port applies to all interfaces
Anders F Björklund [Wed, 11 Oct 2023 10:28:39 +0000 (12:28 +0200)]
Add the possibility to listen on a specific host
For instance, for listening only on "localhost"
That is, bind on 127.0.0.1 instead of 0.0.0.0
Pierre Ossman [Fri, 29 Sep 2023 12:18:02 +0000 (14:18 +0200)]
Merge branch 'qemu_ledstate_pseudo_encoding' of https://github.com/otthou/noVNC
Otto van Houten [Wed, 26 Jul 2023 12:38:31 +0000 (14:38 +0200)]
Add QEMU Led Pseudo encoding support
Previously, num-lock and caps-lock syncing was performed on a best effort basis by qemu.
Now, the syncing is performed by no-vnc instead. This allows the led state syncing to work
in cases where it previously couldn't, since no-vnc has with this extension knowledge of both
the remote and local capslock and numlock status, which QEMU doesn't have.
Pierre Ossman [Thu, 7 Sep 2023 13:35:20 +0000 (15:35 +0200)]
Fix bad indentation
Pierre Ossman [Thu, 7 Sep 2023 12:59:36 +0000 (14:59 +0200)]
Correctly handle legacy security rejections
The code comment of this code was entirely incorrect, but the commit
message for
5671072 when it was added was correct. I.e. there is a
result, but not a reason.
Adjust the unit tests to make sure this doesn't regress again.
Pierre Ossman [Thu, 7 Sep 2023 12:38:04 +0000 (14:38 +0200)]
Correctly handle "none" auth on old servers
There is no security result for the "none" authentication until RFB 3.8.
This got broken by mistake in
5671072 .
Pierre Ossman [Tue, 29 Aug 2023 15:38:44 +0000 (17:38 +0200)]
Fix zlib level change in clipboard tests
The compression level got changed in
01bb36d4 , but the tests weren't
updated to follow this change.
Pierre Ossman [Tue, 29 Aug 2023 15:30:00 +0000 (17:30 +0200)]
Remove unused argument to inflateInit()
There is just one argument to inflateInit(). It is inflateInit2() that
takes two arguments.
Since this argument was never used, let's just remove it and keep the
existing behaviour.
Pierre Ossman [Tue, 29 Aug 2023 15:28:54 +0000 (17:28 +0200)]
Use proper argument to deflateInit()
This was an accidental copy error from inflator.js. The second argument
to deflateInit() is the compression level, not the window bits.
We have not strong opinions on an appropriate level, so stick to the
default.
Samuel Mannehed [Tue, 18 Jul 2023 07:42:01 +0000 (09:42 +0200)]
Merge pull request #1710 from novnc/localStorage
Don't crash if we can't use localStorage
Samuel Mannehed [Wed, 2 Nov 2022 09:23:36 +0000 (10:23 +0100)]
Don't crash if we can't use localStorage
Our settings are not a fatal requirement, we can fall back on the
default values if they can't be accessed. A scenario where we've seen
this happen is when cookies are disabled in the browser. It seems
localStorage is disabled along with cookies in these settings.
So, lets log a message about the failure and otherwise silently
continue in this case.
Fixes issue #1577.
Pierre Ossman [Fri, 30 Jun 2023 16:20:44 +0000 (18:20 +0200)]
Merge branch 'websock' of https://github.com/CendioOssman/noVNC
Pierre Ossman [Tue, 30 May 2023 18:32:31 +0000 (20:32 +0200)]
Implicitly flush Websock if needed
Callers shouldn't have to deal with the internal buffering limits of
Websock, so implicitly flush the buffer if more room is needed.
Pierre Ossman [Sun, 28 May 2023 14:40:09 +0000 (16:40 +0200)]
Add Websock send queue helpers
Callers shouldn't be poking around directly in to the send queue, but
should use accessor functions like for the read queue.
Pierre Ossman [Sun, 21 May 2023 18:16:59 +0000 (20:16 +0200)]
Move WebSocket queue index reset to receive
It's more robust to do this just before we need the space, rather than
assume when the queue will be read and adjust things right after.
Pierre Ossman [Mon, 15 May 2023 11:33:11 +0000 (13:33 +0200)]
Remove Base64 WebSocket remnants
There is no encoding/decoding in modern WebSockets, so let's clean up
some of the old crud that no longer serves a purpose.
Pierre Ossman [Sun, 4 Jun 2023 12:52:36 +0000 (14:52 +0200)]
Avoid internal variables in recv queue tests
Makes for more robust and realistic tests.
Pierre Ossman [Sun, 4 Jun 2023 20:31:27 +0000 (22:31 +0200)]
Don't split large WebSocket data in tests
It takes too much time and can make the tests fail.
Pierre Ossman [Sun, 4 Jun 2023 12:56:48 +0000 (14:56 +0200)]
Make ExtendedDesktopSize tests more realistic
Send real messages and avoid poking around in internals, as we weren't
testing things correctly that way.
Pierre Ossman [Sun, 4 Jun 2023 12:55:35 +0000 (14:55 +0200)]
Don't send SetDesktopSize too early
We don't know the server layout yet, so we can't preserve the screen id
or flags yet at this point. Move it until after we've parsed everything.
Pierre Ossman [Sun, 4 Jun 2023 12:54:40 +0000 (14:54 +0200)]
Properly decode ExtendedDesktopSize fields
We are expected to preserve these and use them in our requests back to
the server. We can't do that if we don't actually decode them correctly.
Pierre Ossman [Sun, 4 Jun 2023 12:50:35 +0000 (14:50 +0200)]
Return unsigned values from rQshift32()
This is what we almost always want, and this makes it consistent with
rQshift8() and rQshift16().
Pierre Ossman [Tue, 16 May 2023 17:06:10 +0000 (19:06 +0200)]
Always return copy of data from socket
We don't know how long the caller will hang on to this data, so we need
to be safe by default and assume it will kept indefinitely. That means
we can't return a reference to the internal buffer, as that will get
overwritten with future messages.
We want to avoid unnecessary copying in performance critical code,
though. So allow code to explicitly ask for a shared buffer, assuming
they know the data needs to be consumed immediately.
Pierre Ossman [Sun, 4 Jun 2023 16:19:02 +0000 (18:19 +0200)]
Use proper socket helpers for FBU header
Let's not duplicate this stuff when we have convenience functions.
Pierre Ossman [Sun, 14 May 2023 18:15:12 +0000 (20:15 +0200)]
Remove Websock implicit read length
Callers should be properly aware of how much data they need, as they
need to call rQwait() first to ensure the data is present.
Pierre Ossman [Sun, 14 May 2023 16:56:19 +0000 (18:56 +0200)]
Stop exposing Websock queue length
Callers should be using rQwait() to ensure sufficient data is present,
and not poke around in the internal buffering.
Pierre Ossman [Thu, 11 May 2023 21:06:34 +0000 (23:06 +0200)]
Stop direct access to socket buffer
Use proper accessor functions instead of poking around in internal
buffers.
Pierre Ossman [Thu, 11 May 2023 20:32:13 +0000 (22:32 +0200)]
Switch Display.flush() to use a promise
That is the modern way to handle operations that cannot complete
immediately.
Pierre Ossman [Thu, 11 May 2023 10:33:22 +0000 (12:33 +0200)]
Change rQslice() to rQpeekBytes()
We don't need any full slice functionality, so let's change this to
better march rQpeek8() and rQshiftBytes().
Pierre Ossman [Mon, 15 May 2023 10:57:59 +0000 (12:57 +0200)]
Reduce kept state in JPEG decoder
We don't have to keep track of this much data between rects, so
restructure things to make it more simple. This allows the JPEG parsing
code to be a pure function which only depends on the input.
Pierre Ossman [Sun, 4 Jun 2023 16:59:38 +0000 (18:59 +0200)]
Merge branch 'testsfix' of github.com:CendioOssman/noVNC
Pierre Ossman [Sat, 3 Jun 2023 13:36:29 +0000 (15:36 +0200)]
Check that decoders consume all data
This is extra important in the tests where we expect no changes to the
display, as otherwise we can't tell the difference between success and a
decoder that is simply waiting for more data.
Pierre Ossman [Tue, 30 May 2023 16:51:19 +0000 (18:51 +0200)]
Make extended clipboard tests independent
Let's test the full final result instead of assuming specific internal
calls.
Pierre Ossman [Tue, 30 May 2023 05:05:43 +0000 (07:05 +0200)]
Add missing tests for message encodings
All of these functions should have units tests, even if they are fairly
minimal.
Pierre Ossman [Mon, 29 May 2023 07:33:30 +0000 (09:33 +0200)]
Return a copy of the data from FakeWebSocket
The caller might hang on to the data for multiple calls, so we make sure
the returned buffer might not get overwritten.
Pierre Ossman [Mon, 29 May 2023 07:30:26 +0000 (09:30 +0200)]
Remove bad Websock mock in tests
This small object will not properly fake a Websock in more complex
cases, so let's avoid it and create a real Websock instead.
Pierre Ossman [Sun, 28 May 2023 14:30:41 +0000 (16:30 +0200)]
Fix Websock send tests
Avoid poking around in the internals and instead test what is actually
sent out on the WebSocket.
Pierre Ossman [Tue, 23 May 2023 05:22:10 +0000 (07:22 +0200)]
Remove internal monitoring from Plain tests
Tests should avoid poking in to the internals and should only look at
external behaviour.
Pierre Ossman [Mon, 22 May 2023 19:21:43 +0000 (21:21 +0200)]
Avoid hooking in to RFB._fail for tests
This is an internal function so we should not be examining it in the
tests. Instead use the well defined public APIs to check for correct
behaviour.
Pierre Ossman [Mon, 22 May 2023 11:05:10 +0000 (13:05 +0200)]
Fix last rect test
Avoid poking in to internals and instead test that the RFB object
responds correctly to new messages.
Pierre Ossman [Wed, 17 May 2023 11:15:11 +0000 (13:15 +0200)]
Split RSA-AES test data
Make the tests more clear what data is expected in the different stages
of the handshake.
Pierre Ossman [Fri, 19 May 2023 14:00:23 +0000 (16:00 +0200)]
Make RSA-AES tests more asynchronous
The code tested here makes heavy use of promises, so it is easier to
test things also using promise centric code.
Pierre Ossman [Tue, 16 May 2023 17:38:33 +0000 (19:38 +0200)]
Remove custom RSA-AES event
We shouldn't add extra, undocumented, API just for the tests. They need
to figure out less invasive way to probe things.
Pierre Ossman [Sun, 14 May 2023 15:59:01 +0000 (17:59 +0200)]
Merge RSA-AES tests in to RFB tests
These test the RFB class, so they should be with all other tests for
that class.
Pierre Ossman [Tue, 16 May 2023 17:23:25 +0000 (19:23 +0200)]
Fix ARD authentication test to send real data
Stop bypassing the data handling steps in the test as that means those
parts don't get tested.
Pierre Ossman [Tue, 16 May 2023 13:04:13 +0000 (15:04 +0200)]
Fix Plain authentication test checks
We should have constants local for the test function when doing
comparisons or we might have false positives because we compare with
buggy values in the code under test.
Pierre Ossman [Tue, 16 May 2023 10:34:26 +0000 (12:34 +0200)]
Split Plain authentication tests to own section
VeNCrypt is a multiplexer for many authentication methods, not just
Plain. So let's split it to its own section, just like other types.
Pierre Ossman [Tue, 16 May 2023 14:45:36 +0000 (16:45 +0200)]
Test credentials using normal API
Avoid poking around in the internals and instead test things using the
official methods and events. This should give us more realistic and
robust tests.
Pierre Ossman [Tue, 16 May 2023 10:30:36 +0000 (12:30 +0200)]
Avoid touching internals in Tight auth tests
We should test using only external manipulation so we don't assume a
specific implementation.
Pierre Ossman [Tue, 16 May 2023 10:29:48 +0000 (12:29 +0200)]
Remove commented out Tight test case
This is not something we intend to implement, so remove this never used
test case.
Pierre Ossman [Tue, 16 May 2023 13:03:18 +0000 (15:03 +0200)]
Don't overwrite methods with spies
Spies should just attach without modifying the real method, or we might
get unwanted side effects.
Pierre Ossman [Tue, 16 May 2023 08:37:41 +0000 (10:37 +0200)]
Fix security to authentication state test
The "None" authentication will directly progress past authentication, so
it's not a good type for this test.
Pierre Ossman [Mon, 15 May 2023 18:50:40 +0000 (20:50 +0200)]
Fix data for empty RRE rect test
The given data was not a correct RRE rect.
Pierre Ossman [Mon, 15 May 2023 18:01:10 +0000 (20:01 +0200)]
Send ArrayBuffer, not Uint8Array in tests
This matches the true contents of a WebSocket 'message' event, so should
be a more realistic test.