-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Support for non-standard server version 003.005 #2038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support for non-standard server version 003.005 #2038
Conversation
1) Added support for non-standard server version `003.005` by mapping it to RFB 3.3 in the protocol negotiation switch. File: `core/rfb.js`. 2) Added a warning log when `003.005` is seen so it is clear we are forcing a 3.3 handshake. File: `core/rfb.js`. 3) Stored the server pixel format from ServerInit, and passed it through to decoders so we can decode non-24bpp pixel data safely. File: `core/rfb.js`. 4) Added a compatibility path to force 16bpp and restrict encodings to raw when the server reports non-standard 3.4/3.5. File: `core/rfb.js`. 5) Added 16bpp RAW decoding with proper bit-mask conversion to RGBA (handles 5-5-5 and 5-6-5 formats). File: `core/decoders/raw.js`.
Support_for_non-standard_server_version
Modified decodeRect to handle 16bpp raw pixel format decoding with customizable parameters.
|
We're going to need some background here. Where is this version used? |
@sambhed Thanks for the quick review and for asking for context — happy to provide it! Why this PR is needednoVNC currently rejects connections from servers advertising non-standard RFB protocol versions outside the official range (mainly 003.003 to 003.008, plus a few others like 004.* / 005.*). The problem this solvesUsers trying to access these legacy devices via a modern web browser (using noVNC) get immediately disconnected with an error like: This forces them to:
By allowing negotiation to continue (while falling back to safe/compatible behavior similar to 003.003), this PR enables browser-based access to these devices without any negative impact on standard VNC servers. The change is very targeted/minimal — it just adds one more accepted version string during handshake, with no protocol behavior changes. Happy to answer any questions, or refine the implementation (e.g., add a log warning for non-standard versions, make it configurable, etc.). Thanks again for considering this — it would help a niche but real user base with aging hardware! |
|
The specification is clear that version 3.5 should be treated as version 3.3. So that's an obvious fix. The controversial part is the rest of the changes. I.e. the workarounds for a buggy server that doesn't correctly respect the client pixel format. Assuming it is such a buggy server, just based on the version number seems very fragile. This use case is something that keeps popping up, and we rarely have the ability to automatically detect these broken servers. Although I loathe adding settings needlessly, perhaps this is a case where there simply isn't any other way (besides simply stating we refuse to support buggy servers). |
|
Thanks for the detailed feedback — really appreciate the insight into the spec and the hesitation around fragility. You're absolutely right: per RFC 6143 and the original RFB docs, any non-3.7/3.8 version (including buggy/misreported 3.5) must be treated as 3.3 during negotiation. So adding explicit support for The more controversial part is indeed the workaround for the buggy pixel format handling on these specific legacy servers (LS Industrial eXP60 series and similar embedded HMIs). From user reports and packet captures shared in various support threads, these devices:
This leads to garbled/corrupted display in noVNC unless we force a compatible client-side format (16bpp) and restrict encodings to raw (since other encodings assume the negotiated format is respected). Addressing fragilityI agree — keying off the version string alone is brittle if other servers ever start using 003.005 legitimately (unlikely, but possible).
Since this issue has come up repeatedly for industrial/retail users with long-lifecycle hardware, I think option 1 (explicit opt-in flag) strikes the best balance: it supports the real use case without polluting the default path or assuming too much based on version alone. Would you prefer:
Happy to adjust the code accordingly (e.g., add the URL param, log clearly when activated, etc.). Thanks again for the thoughtful review — this kind of discussion is what makes noVNC reliable! |
No description provided.