Skip to content

plos-clan/vnc-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vnc-rs

Build API Docs LICENSE LICENSE

New Features

  • Support VeNCrypt x509 TLS encrypt
  • Support RSA-AES/RSA-AES-256 encrypt

Description

An async implementation of VNC client side protocol

Worked as a protocol engine which consumes input event from the frontend and the vnc server and generate event to let the frontend render.

Can be used on both the OS and WASI.

A simple client usage can be found at vncviewer.

A simple web assembly client can be found at webvnc.

Why this

I initially intended to write a wasm version of vnc, and yes, a wasm version has been implemented as per the VNC Core RFC

During the implementation I found an existing respository whitequark's rust vnc. Which is too coupled to the OS (requring multi-thread and std::io::TcpStream) to migrate to a wasm application. But thanks to whitequark's work, I finally worked out how to do VncAuth on the client side.

Looking back whitequark's rust vnc and my old webvnc, I didn't think it would be appropriate to put the parsing of the vnc protocol directly into the application. So I separated the engine part and the result is this crate.

It is intended to be a more compatible vnc engine that can be built for both OS applications and Wasm applications. So I did my best to minimise dependencies. However, asynchrony is necessary for websocket processes and in the end I chose tokio over async_std, which makes it a bit incompatible.

Encodings

I've only tried video streaming from tight vnc server on win10/ubuntu 20.04 and the built-in vnc server on macos 12.6 (with password login turned on)

Tight encoding, Zrle encoding & Raw encoding all work fine.

But without any idea, when I send setClientEncoding(TRLE) to the vnc server it response with raw rectangles without any encoding. So Trle encoding is not tested. But the trle decoding routine shall be right since it was split from zrle routine

According to the RFC, the Hextile Encoding and RRE Encoding are both obsolescent, so I didn't try to implement them.

Acknowledgements

whitequark's rust vnc.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

An asynchronous implementation of VNC client side protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%