• Stars
    star
    127
  • Rank 276,743 (Top 6 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An implementation of VNC protocol, client state machine, a client and a proxy

rust-vnc

vnc is a crate implementing the VNC protocol and the client state machine. There are also two crates using it:

  • A fully functional VNC client based on SDL2, vnc-client;
  • A buffering VNC proxy, vnc-proxy.

The VNC client has special hacks to work around the bugs in the VNC server used in QEMU (and Xen HVM).

How?

Entirely by mistake. It worked out in the end.

I've encountered a very strange failure, wherein a Xen domU with a VNC console attached to it would not send any framebuffer updates. By the time I've finally realized that my VNC clients were fine and something was wrong with Xen, it was too late: rust-vnc was practically complete. Then I spent twice as much time perfecting the handling of keyboard layouts for some reason.

After some careful consideration of QEMU's source code (from afar), I decided to work around its bugs on the client side. That worked!

Where?

To launch the VNC client, run cargo install vnc-client and then rvncclient --help.

To launch the VNC proxy, run cargo install vnc-proxy and then rvncproxy --help.

To use the VNC library in your project, add the following to Cargo.toml:

[dependencies]
vnc = "0.4"

Why?

The vnc crate implements serialization and deserialization for all of the core VNC protocol, and a largely complete client state machine.

The rvncclient tool is a quite usable VNC client, as it implements several extensions that cut down unnecessary data transfers; as a bonus it can be used for education and troubleshooting, as it will output a human-readable dump of the VNC messages if ran with RUST_LOG environment variable set to debug. The option --heinous-qemu-hacks enables the QEMU-related workarounds.

The rvncproxy tool is a proxy that sits in the middle of a VNC connection and buffers all server-to-client packets so that the server would (almost) never block, even the last mile to the client is very slow and/or has high latency. The proxy also supports RUST_LOG=debug setting. Note that the proxy will strip (and warn about) authentication methods and encodings it does not understand, since it is not possible to decode VNC framing otherwise.

Why not?

I didn't really intend to write this library at all, and as such it has some drawbacks:

  • No server state machine.
  • No encryption or authentication.
  • No inline documentation (but the signatures and the client could be helpful already).

That said, the library was written with the full VNC protocol in mind, and it should be straightforward to extend the library to support any of the above, should a need arise.

The rvncproxy tool was written with a specific server implementation misbehavior in mind, but then it turned out that server misbehaved in a completely different way, so it's not really useful for anything.

Whereto?

rust-vnc is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

More Repositories

1

parser

A Ruby parser.
Yacc
1,565
star
2

unfork

unfork(2) is the inverse of fork(2). sort of.
C++
1,435
star
3

ipaddr.js

IP address manipulation library in JavaScript
JavaScript
528
star
4

rack-utf8_sanitizer

Rack::UTF8Sanitizer is a Rack middleware which cleans up invalid UTF8 characters in request URI and headers.
Ruby
298
star
5

irclogger

Simple and good-looking IRC log viewer. Logger is included. No strings are attached.
Ruby
252
star
6

ast

A library for working with Abstract Syntax Trees.
Ruby
193
star
7

kicad-boardview

KiCAD to Boardview exporter reads KiCAD PCB layout files and writes ASCII Boardview files
Python
150
star
8

rust-xdg

A library that makes it easy to follow the X Desktop Group specifications
Rust
145
star
9

Boneless-CPU

Resource-efficient 16-bit CPU architecture for FPGA control plane
Python
92
star
10

zmtp-wireshark

A Wireshark dissector for ZMTP version 3.0 and later (ZeroMQ 4 and later)
Lua
82
star
11

furnace-avm2

Flash ActionScript3 VM static analysis library based on Furnace framework.
Ruby
76
star
12

libfx2

Chip support package for Cypress EZ-USB FX2 series microcontrollers
C
69
star
13

binja_itanium_cxx_abi

Binary Ninja Itanium C++ ABI Plugin
Python
62
star
14

coldruby

ColdRuby is a compiler of Ruby 1.9 MRI bytecode, and a runtime written in JavaScript to aid in execution of Ruby code. It also includes a C++ executable using very fast V8 scripting engine and native extensions for regular expressions, fibers and more.
JavaScript
62
star
15

Yumewatari

妖刀夢渡
Python
54
star
16

ocaml-m17n

Multilingualization for the OCaml source code
OCaml
52
star
17

rust-log_buffer

A zero-allocation ring buffer for storing text logs, implemented in Rust
Rust
51
star
18

prjbureau

Documenting the Microchip (Atmel) ATF15xx CPLD fuse maps and programming algorithms
Python
47
star
19

rust-facedetect

A primer on using OpenCV with Rust
Rust
43
star
20

groupXIV

Microphotography viewer based on Leaflet.js
JavaScript
41
star
21

ocaml-inotify

OCaml bindings for inotify.
OCaml
36
star
22

python-itanium_demangler

Pure Python Itanium C++ ABI demangler
Python
33
star
23

ocaml-llvm-ng

A practical LLVM backend for OCaml (will never be finished)
OCaml
33
star
24

SIPCaller

A simple Android app to call SIP numbers directly
Java
31
star
25

infra-vpn

Automation for WireGuard VPN tunnels
30
star
26

rlua

Ruby to Lua bindings library.
C
27
star
27

js_of_ocaml-example

A tiny sample js_of_ocaml project
OCaml
26
star
28

ocaml-lz4

OCaml bindings for LZ4, a very fast lossless compression algorithm
OCaml
26
star
29

binja-avnera

Binary Ninja plugin for the Avnera AV6xxx/AV7xxx architecture
Python
25
star
30

icefloorplan

iCE40 floorplan viewer
C++
24
star
31

sublime-better-ocaml

Default Sublime Text highlighting for OCaml sucks. I've fixed it.
23
star
32

tf2_healslut

C++
22
star
33

gameboy-grabber

Rust
20
star
34

furnace

A static analysis framework.
Ruby
18
star
35

sublime-ocp-index

Sublime Text plugin which provides OCaml autocompletion with ocp-index
Python
17
star
36

ATF15xx-EVB

Cheap & simple evaluation boards for Microchip ATF15xx CPLDs
16
star
37

zs

ZYTOKINE STORM is a user-mode Linux binary translation layer targeting Darwin
C++
16
star
38

binja-m16c

Binary Ninja plugin for the Renesas M16C architecture
Python
15
star
39

opam-query

A tool to query opam files from shell scripts
OCaml
15
star
40

bfcpu2

A pipelined brainfuck softcore in Verilog
Verilog
14
star
41

binja-i8086

16-bit x86 architecture for Binary Ninja
Python
13
star
42

cylinder

OCaml
13
star
43

sublime-imethod-fix

→ Makes XCompose work in Sublime Text! ←
C
13
star
44

ocaml-protobuf

Google Protocol Buffers runtime implemented in OCaml
OCaml
12
star
45

lab-notebook

Source for my lab notebook
JavaScript
12
star
46

story-os

A microkernel OS for x86 I wrote in C++ back in 2007. Features VMM, TSS multitasking, and oddly shaped C++. Updated in 2023 to fix some memory management bugs and now it works.
C
11
star
47

binja_extended_api

Extended Python API for Binary Ninja
Python
10
star
48

sparkle

Sparkle is a zero-configuration decentralized VPN which can tunnel IP packets, simultaneously handle multiple payload types like VoIP or IM (together with tunneling) and be embedded anywhere as a small library.
C
10
star
49

ocaml-expat

The official repository of the ocaml-expat library
OCaml
9
star
50

unrandom

Make srand() always use the seed 0 using LD_PRELOAD
C
9
star
51

murmurhash3-js

JavaScript implementation of MurmurHash3
JavaScript
9
star
52

lend

Allocator
C
9
star
53

libstm32

A reimplementation of standard library for STM32 family Cortex-M3 processors.
C
9
star
54

catircservices.org

Nix configuration for a Matrix<>IRC and Matrix<>Discord bridge
Nix
7
star
55

libnrf24l

Chip support package for Nordic nRF24L series microcontrollers
C++
7
star
56

Sublime-Yesterday-Theme

whitequark's fork of Tomorrow color scheme
7
star
57

eliom-example

Eliom example application
OCaml
7
star
58

infra-server

Ansible configuration for https://whitequark.org
Shell
7
star
59

pry.ml

OCaml
7
star
60

usbasp

Thomas Fischl's USBasp (orig. http://www.fischl.de/usbasp/) with my patches.
C
6
star
61

binja_function_abi

Binary Ninja plugin for viewing and changing function ABIs in a fine-grained way via the GUI
Python
6
star
62

LineageOS_vendor_whitequark

My LineageOS overlay
Shell
6
star
63

furnace-swf

A rudimentary SWF reader for furnace-avm2.
Ruby
6
star
64

rust-touptek

Rust bindings for Touptek ToupLite image acquisition library
Rust
6
star
65

LLVM-TableGen.tmBundle

LLVM TableGen syntax definition
5
star
66

sdcc

Git mirror of http://svn.code.sf.net/p/sdcc/code/trunk
C
5
star
67

usbasploader

Objective Development's USBaspLoader (orig. http://www.obdev.at/products/vusb/usbasploader.html) with my patches.
C
5
star
68

track-pypi-dependency-version

A script for use with GitHub Actions that updates the upper bound in requirements.txt when a package is released on PyPI
Python
5
star
69

ruby-cross-reference

Sources for the Ruby Cross Reference LXR setup
Perl
5
star
70

ocaml-cavalry

Marshaling experiment
OCaml
5
star
71

vuxboot

VuXboot is a small but powerful AVR UART bootloader.
C++
4
star
72

Sublime-JESD3

JEDEC JESD3 syntax highlighter for Sublime Text 3
4
star
73

sphinxcontrib-platformpicker

Platform picker extension for Sphinx
Python
4
star
74

samplerate-rs

Rust bindings for libsamplerate
Rust
4
star
75

i3gamma

i3gamma integrates with the i3 window manager and changes the gamma correction value depending on the focused window
Rust
4
star
76

disable_eval

The only safe eval is no eval.
Ruby
3
star
77

cyberplat_pki

CyberplatPKI is a library for signing Cyberplat requests.
Ruby
3
star
78

suwabara

Ruby
3
star
79

unbot

Ruby
3
star
80

binja_xapi_bookmarks

Binary Ninja bookmarks plugin that integrates into the GUI
Python
3
star
81

Leaflet.Nanoscale

Sub-millimeter scale indicator for Leaflet.js
JavaScript
2
star
82

blog

http://whitequark.org
Ruby
2
star
83

Sublime-S-Expressions

Sublime Text 3 syntax definition for S-Expressions
2
star
84

bacon-colored_output

Colored output for Bacon testing framework!
Ruby
2
star
85

whimper

OCaml
2
star
86

linux5be

Remains of a failed attempt to port Linux to BE-300. WARNING: Doing so may result in severe frustration
2
star
87

catirclogs.org

(WIP) Nix configuration for IRC logging infrastructure
Nix
1
star
88

pcbhdl

Python toolbox for designing printed circuit boards
Python
1
star
89

50w-modular-psu

A modular high-voltage PSU, rated at 50W continuous power
Processing
1
star
90

ocaml-eval_in

An http://eval.in/ bot in OCaml.
OCaml
1
star
91

vacuum-induction-furnace

CAD files for a vacuum induction furnace with capacity of 50mL
HTML
1
star
92

Shinobu

1
star
93

n250-dsdt

Samsung N250 ACPI DSDT
1
star
94

cmake-ocaml-simple

Simple, inflexible and non-expressive OCaml rules for CMake. Originally developed for LLVM CMake builds.
CMake
1
star