Skip to content

Merge noVNC master - #1

Open
AndrewSverdrup wants to merge 809 commits into
Codevolve:2022-updatefrom
novnc:master
Open

Merge noVNC master#1
AndrewSverdrup wants to merge 809 commits into
Codevolve:2022-updatefrom
novnc:master

Conversation

@AndrewSverdrup

Copy link
Copy Markdown

No description provided.

CendioOssman and others added 30 commits June 3, 2023 15:36
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.
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.
We don't need any full slice functionality, so let's change this to
better march rQpeek8() and rQshiftBytes().
That is the modern way to handle operations that cannot complete
immediately.
Use proper accessor functions instead of poking around in internal
buffers.
Callers should be using rQwait() to ensure sufficient data is present,
and not poke around in the internal buffering.
Callers should be properly aware of how much data they need, as they
need to call rQwait() first to ensure the data is present.
Let's not duplicate this stuff when we have convenience functions.
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.
This is what we almost always want, and this makes it consistent with
rQshift8() and rQshift16().
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.
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.
Send real messages and avoid poking around in internals, as we weren't
testing things correctly that way.
It takes too much time and can make the tests fail.
Makes for more robust and realistic tests.
There is no encoding/decoding in modern WebSockets, so let's clean up
some of the old crud that no longer serves a purpose.
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.
Callers shouldn't be poking around directly in to the send queue, but
should use accessor functions like for the read queue.
Callers shouldn't have to deal with the internal buffering limits of
Websock, so implicitly flush the buffer if more room is needed.
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.
Don't crash if we can't use localStorage
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.
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.
The compression level got changed in 01bb36d, but the tests weren't
updated to follow this change.
There is no security result for the "none" authentication until RFB 3.8.
This got broken by mistake in 5671072.
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.
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.
tsukasa-au and others added 30 commits December 6, 2025 19:00
Dispatch an event on each state transition inside the WakeLockManager.
This gives the unit tests something to synchronise on, allowing us to
write fast, flake-free tests.
Add tests to for both the `rfb` side (calling into the new wakelock
code), and the new wakelock class (which tracks the desired state and
how to get there).
I noticed a simple typo - "inoder rendering"
We shouldn't be advertising these if we'd like people to stop using
them.
Mainly to keep eslint happy with its new recommended rules. But it also
makes the code more clear to not have unused stuff in it.

The des code got a bit more refactoring since eslint was upset about the
final "i++" as it was technically an unused assignment.
In preparation for horizontal control bar modes
Simplifies alignment. In preparation for horizontal control bar modes.
There's only one button in the group, and the wrapping div messed with
the flex box layout
We can't compare with a new CustomEvent, lets check the call arguments
instead. The field is also called "text".
Replace top-level await with then() in browser.js, due to a bug in
chromium browsers.

#2053
Update github actions to latest versions
This was missed when doing the 1.7.0 release.
This fixes failing tests on Safari.
Use macOS 26 runner instead of macOS 10.15
Enable attaching the control bar to top and bottom
Chrome 86-93 shipped VideoDecoder as part of an origin trial but did not
include the isConfigSupported method (added in Chrome 94). Calling it
without checking its existence caused a silent module load failure.

Fixes #2060

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
As of 2026-07-15 macos-latest was migrated to use the macOS 26 runner
image. This change has no practical effect right now, it just means we
will automatically follow future updates to the "macos-latest" label.
…ed-guard

Fix silent module load failure in Chrome 86-93 due to missing VideoDecoder.isConfigSupported
Use same logic for generating websocket URL in `vnc_lite.html` with
`vnc.html`, to ensure custom subpath works for `vnc_lite.html` entry
as well.

.e.g novnc serve behind nginx reverse proxy like:

```
location ^~ /novnc/ {
    proxy_pass http://127.0.0.1:8888/;
    ...
```

To keep lite, hash fragment, encrypt, .etc not included.

Signed-off-by: Lufei <lufei@uniontech.com>
feat: enable subpath for vnc_lite.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.