neatvnc

A liberally licensed VNC server library with a clean interface

ISC License

Stars
119
Committers
15

Bot releases are hidden (Show)

neatvnc - v0.8.1 Latest Release

Published by any1 3 months ago

This release fixes a security vulnerability.

Package maintainers are advised to upgrade ASAP.

The vulnerability was reported by Dane Bouchie and Travis Wise.

neatvnc - v0.8.0

Published by any1 8 months ago

Highlights

  • The colour map pixel format as described in RFC 6143 has been implemented. Before, the client would just get disconnected if they requested it. Now they get a map that emulates RGB332.
  • Momentary interception of log messages. The user can now set a thread-local log hander and then set it back to the default.
  • Philip Zabel made the code more consistent with the style guide.

Breaking Changes

  • nvnc_client_get_hostname has been replaced with nvnc_client_get_address

Bugfixes

These have already been released as part of the v0.7 branch, but they will also be enumerated here.

  • Apple's Diffie-Hellman authentication (security type 30) has been fixed.
  • A new client connection no longer causes a DNS lookup.
  • Clients are now allowed to request more than 32 encodings (#108)
  • Zlib streams are now preserved when a client switches between encodings (#109)

Shortlog

Andri Yngvason (24):
      Set version for next release
      README: Enumerate dependencies for crypto
      Don't use tag for git version
      server: Fix double-free on failed Apple DH
      crypto: Initialise AES-ECB decode context correctly
      server: Remove DNS lookup
      server: Don't complete fb update more than once
      logging: Export default log function
      logging: Add method to set thread local log function
      logging: Set log function to default when unset
      Replace nvnc_client_get_hostname with nvnc_client_get_address
      h264-encoder: Use AV_FRAME_FLAG_KEY instead of key_frame
      server: Allow server to request more than 32 encodings
      Warn when client chooses non-true-color pixel format
      Keep zlib streams when switching encodings
      pixels: Add strings for RGB222 and BGR222
      server: Log pixel format choice
      server: Log encodings reported by client
      server: Drop current frame if formats change
      server: Extract encoder initialisation function
      Consolidate security handshake result handling
      Implement colour map
      Add option to enable experimental features
      Release v0.8.0

Philipp Zabel (3):
      Indent wrapped argument lists with two tabs (function definitions)
      Indent wrapped argument lists with two tabs (function calls)
      Remove superfluous whitespace
neatvnc - v0.7.2

Published by any1 9 months ago

This release fixes a couple of bugs:

  • Clients are now allowed to request more than 32 encodings (#108)
  • Zlib streams are now preserved when a client switches between encodings (#109)

Changes

Andri Yngvason (2):
      server: Allow server to request more than 32 encodings
      Keep zlib streams when switching encodings
neatvnc - v0.7.1

Published by any1 12 months ago

This release fixes a couple of bugs.

  • Apple's Diffie-Hellman authentication (security type 30) has been fixed.
  • A new client connection no longer causes a DNS lookup.

Changes

Andri Yngvason (4):
      server: Fix double-free on failed Apple DH
      crypto: Initialise AES-ECB decode context correctly
      server: Remove DNS lookup
      Release v0.7.1
neatvnc - v0.7.0

Published by any1 about 1 year ago

Highlights

  • Desktop resizing
  • Software pixel buffers with less than 32 bits per pixel are now supported
  • The server may now choose to open a websocket instead of a regular TCP socket
  • The RSA-AES and RSA-AES-256 security types have now been implemented
  • A Diffie-Hellman based security type frame Apple is also implemented, although not recommended
  • Murmurhash in the damage refinery has been replaced with xxHash, which performs much better in my tests so far

Bugfixes

  • Users should now get proper feedback when authentication fails

Changes

Andri Yngvason (69):
      Remove _clang-format
      Add a CONTRIBUTING.md
      .github: Add a pull request template
      test: pixels: Use unsigned numeric literals
      test: pixels: Revert accidental change
      Turn stream into abstract interface class
      stream: Add a cork to pause sending
      Implement websocket
      Add NTP inspired latency tracking and time sync
      stream: Add exec_and_send function
      server: Use stream_exec_and_send for ntp
      server: Reduce SO_SNDBUF to 4096
      stream-tcp: EAGAIN is not an error
      stream: Add a TODO about cleaning up struct
      stream-gnutls: Fix use after free
      stream-gnutls: Handle EAGAIN correctly
      server: Set SO_SNDBUF to 65536
      meson: Ignore format-truncation warnings
      ws-handshake: Handle protocol & version fields
      stream-ws: Sanitise handshake input
      http: Remove unused code
      http: Re-order includes
      http: Stop memory leak in failure path
      http: Only support GET method
      stream: Move tls specific member into tls impl
      stream: Allocate enough for tls upgrade
      server: Actually send a reason when handshake fails
      server: Defer client_unref in close_after_write
      Add abstract interface for low level crypto
      stream: Integrate cipher
      Implement Apple's Diffie-Hellman based security type 30
      crypto: Add RSA and AES-EAX
      crypto: Integrate message handling into cipher
      Implement RSA-AES
      Add temporary api function to enable auth without tls
      stream-ws: Inherit stream-tcp
      stream-ws: Clean up exec-and-send resources
      Create dedicated RSA-AES stream
      crypto: Add helper functions for hashing
      server: Use hash_{one,many}
      crypto: Add AES256-EAX cipher
      crypto: Remove unused code
      crypto: Add sha256
      server: Define rsa-aes server key length constant
      crypto: Make deleting NULL pointers noop
      server: Clean up crypto resources on disconnect
      Implement RSA-AES-256 security type
      Add base64 encoder & decoder
      ws-handshake: Use own base64 and SHA1 implementations
      Export base64 encoder and decoder
      crypto: Add method to import RSA private keys
      API: Add method to set RSA credentials
      server: Allow arbitrary RSA key length
      Remove logging of sensitive information
      API: Consolidate setup of security constraints
      websocket: Add some missing copyright notices
      Replace strlcpy with strncpy
      Notify client about NTP support
      server: Use memcpy instead of strncpy for username/password
      stream: rsa-aes: Unref payload after encoding
      Revert "Export base64 encoder and decoder"
      server: Use uint32_t for security result failure path
      damage-refinery: Replace murmurhash with XXH3
      crypto-nettle: Fix use after free
      server: Free RSA creds on close
      server: Defer cleaning up client resources on close
      damage-refinery: Use scalar xxh3 implementation

MazTheMan (2):
      Implement 24 bit pixel formats for raw and tight
      zrle: fix for source format of 24 bits

Philipp Zabel (3):
      Implement desktop resizing
      examples: draw: Demonstrate desktop resizing
      meson: Fix Meson warning about missing check kwarg in run_command() calls
neatvnc - v0.6.0

Published by any1 over 1 year ago

Highlights

  • The client now has control over h264 quality settings
  • Left & right scrolling is now supported
  • A custom framebuffer allocator function can now be assigned
  • The following functions have been added
    • A function for querying client side cursor support
    • A function to get the hostname of a connected client
    • A function to get the credentials of an authenticated client
    • A function for listing connected clients
    • A function for disconnecting a client

Bug fixes

  • A race condition when a client tries to resize the display before it has an encoder
  • Cursor buffers are now freed on close
  • Various race conditions in encoders
  • Spurious exits due to SIGPIPE
  • Occasional leaked buffers when clients disconnect
  • Clients no longer linger on exit with TLS

Changes

Andri Yngvason (36):
      Fix jpeg quality setting
      h264: Set quality according to client's wishes
      stream: Remove stray ampersand in tls handshake failure code path
      Add constants for left and right scroll
      README: Remove client compatibility table
      README: Reorder dependencies
      README: Upgrade dependency list
      examples: draw: Fix cursor setter argument order
      resampler: Use transformed width as destination stride
      Revert "h264-encoder: Add 30 bit color depth formats"
      server: Fix encoding selection for sw frames
      h264-encoder: Set async_depth=1
      tight: Disable chroma subsampling at q=9
      server: Replace abort() with NVNC_LOG_PANIC
      Add debug logging for tcp address binding
      meson: Ack aml API changes
      fb-pool: Add setter for fb allocator
      server: Free cursor buffers on close
      Reference count encoders
      server: Make encoder inert when closing client
      tight: Keep reference to encoder while encoding
      raw: Keep reference to encoder while encoding
      zrle: Keep reference to encoder while encoding
      stream: Use MSG_NOSIGNAL
      raw: Unref result in destroy
      zrle: Unref result in destroy
      Remove push/pull encoder interface
      raw: Fix worker data dependencies
      server: Properly handle stream write errors
      enc-util: Add function to calculate region area
      raw: Allocate conservatively sized buffers
      Add functions for listing clients
      Pass nvnc_client to cut-text callback
      meson: Set default warning level to 2
      meson: Require specific version of aml
      Release v0.6.0

Jeroen Hofstee (1):
      don't resize an encoder if it is not set

Jim Ramsay (3):
      Record hostname for each connected client
      Record authenticated username for each connected client
      Add nvnc_client_close API

Philipp Zabel (4):
      Allow to query client-side cursor support
      Only set HAVE_LIBAVUTIL if libav is actually used
      Fix fallthrough warnings in murmurhash
      stream: Fix remote closing TLS connection
neatvnc -

Published by any1 about 2 years ago

This fixes stalling during h264 encoding. The FFmpeg devs seem to think that it's normal to change the default behaviour of their code, so this needs to be fixed here instead.

neatvnc -

Published by any1 about 2 years ago

Andri Yngvason (3):
      Revert "h264-encoder: Add 30 bit color depth formats"
      server: Fix encoding selection for sw frames
neatvnc -

Published by any1 about 2 years ago

Andri Yngvason (3):
      stream: Remove stray ampersand in tls handshake failure code path
      resampler: Use transformed width as destination stride
neatvnc -

Published by any1 over 2 years ago

Andri Yngvason (3):
      meson: Use partial_dependency() for libdrm cflags
      test: meson: Add missing libdrm_inc dependency

Jan Beich (1):
      server: add missing header after f20ffb5e1efe
neatvnc -

Published by any1 over 2 years ago

Highlights

  • H.264 Encoding
  • UNIX Sockets
  • New framebuffer submission API
  • Automatic buffer transforms
  • Client side cursor rendering
  • Now accepts DMA-BUFs
  • Presentation time stamps
  • New internal encoder abstraction layer

Shortlog

Andri Yngvason (92):
      Add libdrm include path to cflags
      Display Patreon account on GitHub page
      fb: Add hold/release logic
      Notify the user when an fb is released
      Add a buffer pool
      Remove nvnc_set_render_fn
      fb: Use special context pointer for release callback
      fb_pool: Fix reference counting error
      server: process fb update requests in fb update request message handler
      Add a cleanup callback to nvnc_set_userdata
      fb_pool: Return true from resize when dimensions change
      display & fb_pool: Clean up memory leaks
      examples: draw: Use new buffer submission API
      Remove damage checker
      .gitignore: add .vimrc and sandbox
      Add a stride parameter to nvnc_fb
      Add a API function to get the pixel size of nvnc_fb
      Add API function for creating nvnc_fb from an pre-allocated buffer
      Remove nvnc_fb_flags
      fb: Fix buffer allocation
      Add gbm_bo nvnc_fb type
      pixels: Add fourcc_to_pixman_fmt
      Add transform utility functions from wayvnc
      fb: Add transform attribute
      Re-sample transformed framebuffers
      transform-util: Add dimensions transform function
      resampler: Transform output buffer dimensions based on input transform
      resampler: Make resampler object opaque
      resampler: Track buffer damage
      Add damage refinery from wayvnc
      fb: Fix mapped gbm buffer stride
      fb: Unmap released fbs
      display: Clean up transformed damage region
      Create encoder abstraction
      Remove unused headers
      Add offset coordinates to encoders
      Move update header out of encoders
      Create h264-encoder
      rfb-proto: Add identifier for Open H.264
      Create an Open h.264 encoder
      API: Add nvnc_fb_get_type
      encoder: Add push/pull encoder interface
      Plug open h264
      encoder: Add impl flags
      open-h264: Set "ignores-damage" flag
      server: Keep a count of clients that use damage
      display: Only run damage refinery when it's needed
      h264-encoder: Automatically find a render node
      enc-util: Round up division in calc_bytes_per_cpixel
      pixels: Add 10-bits-per-colour formats
      h264-encoder: Add 30 bit color depth formats
      pixels: Add function to extract alpha mask
      Add a cursor encoder
      Implement client side cursor rendering
      examples: draw: Add a client-side cursor
      pixels: Handle different endianness for alpha mask
      cursor: Fix alpha mask stride
      Add some unit tests for pixel conversions
      test: pixels: Add a unit test for pixel32_to_cpixel
      pixels: Add function to convert drm format to string
      pixels: Add function to get rfb pixel format name
      examples: draw: Handle different endianness for cursor colour
      cursor: Map cursor buffers before access
      cursor: Use the right scan-line length when width != stride
      Add width and height arguments to nvnc_set_cursor
      Implement hiding cursors
      Add back damage argument to nvnc_set_cursor
      h264-encoder: Fix copy-pasta
      server: Decrement n_pending_requests after dispathing encoding job
      h264-encoder: Fully flush output packets
      Add presentation timestamps
      resampler: Extract function: resample_now()
      cursor: Handle rotated cursors
      Call encoder.on_done in a function
      Add simple logging system
      Use new logging system
      server: Promote some log levels
      open-h264: Convert to normal encoder
      display: Add dtrace probes
      resampler: Add dtrace probes
      open-h264: Add dtrace probes
      server: Add dtrace probes with pts
      open-h264: unref result when finished with it
      h264-encoder: Call on_packet_ready last in on_work_done
      server: Reset encoder callback on frame done
      h264-encoder: Clean up current_packet in destroy
      server: Log encoder choices
      server: Turn off Nagle's algorithm
      h264-encoder: Add dtrace probes
      meson_options: Enable h264 by default
      Integrate libav into logging framework
      h264-encoder: Set quality

Harm te Hennepe (1):
      Don't call gbm symbols when they are not available

Jan Beich (1):
      server: consistently use builtin byteswap after 53f88894d52a

Marco Felsch (1):
      meson: Fix host leakage

Ryan Farley (1):
      Support UNIX sockets
neatvnc -

Published by any1 almost 4 years ago

This release adds support for the qemu extended key event. When this is also supported by the client, key codes will be used instead of symbols which eliminates the need for reverse key code lookup on the server-side.

Aisha Tammy (1):
      add systemtap option for sys/std.h

Andri Yngvason (6):
      rfb-proto: Add qemu key event extension
      Add qemu extended key events
      Notify client about qemu key capability
      Decrement pending requests when sending pseudo frames
      Translate XT keycodes to linux keycodes
      Release v0.4.0
neatvnc -

Published by any1 about 4 years ago

This release fixes a bug with tight encoding reported by Jeroen Hofstee (@jhofstee) who also tracked down the cause of the bug. The issue was that if multiple clients connected to the server and requested tight encoding, frame updates to the clients stalled because each client would hold onto one worker thread while encoding took place.

Andri Yngvason (10):
      Add common utilities for encoders
      tight: Use encoder utils
      zrle: Use encoder utils
      raw-encoder: Use encder utils
      server: Refactor schedule_client_update_fb
      server: Move pixel format conversion out of do_client_update_fb
      server: Extract finish_fb_update() from on_client_update_fb_done()
      tight: Don't block 1 worker while encoding tiles
      tight: Hold fb and client refs while encoding
      Release v0.3.2
neatvnc -

Published by any1 about 4 years ago

This release fixes a crash due to incorrect handling of fragmented packets and adds copy & paste support.

Scott Moreau (2):
      server: Add remaining support for simple copy/paste
      server: Fix possible crash on fragmented packet messages
neatvnc - v0.2.0

Published by any1 about 4 years ago

New features since v0.1.0:

  • Tight encoding is no longer experimental and also more complete.
    • The encoder employs multiple CPU cores, both for lossy and lossless
      compression, which makes it considerably faster than ZRLE, even with
      lossless compression.
    • Supports both lossy (JPEG) and lossless (DEFLATE) compression.
    • Allows the client to choose the JPEG "quality" level.
    • Allows the client to choose whether to enable lossy compression or not.
  • Service-side resizing: the server can notify the client and resize buffers
    when a different display mode is set.
  • The API has been prepared for adding multi-display suppport. It has not been
    implemented, but the (hopefully) won't have to change when it is.
  • The library can now be linked statically.
  • Version info is baked into the library, so applications linking to neatvnc
    can report the version to the user.
  • The server can now looks up the address to which to bind using getaddrinfo

I will try to keep the API & ABI stable from now on, but it depends on adoption
rate. If nothing else than wayvnc uses this library, then there is no point in
keeping it stable. Let me know if you want the API to be kept stable.

Andri Yngvason (59):
      .gitignore: Add subprojects
      Replace libuv with aml
      examples: Add signal handler and clean up resources
      README: Replace libuv with aml
      Spawn as many workers as there are CPU cores
      Merge pull request #24 from johnae/master
      stream: Close if read() == 0
      Make sure framebuffers are properly aligned
      Add dtrace probe infrastructure
      Add dtrace probes for framebuffer updates
      tight: Add some error handling
      tight: Limit rectangle max width according to spec
      tight: Prepare for "basic" encoding method
      tight: Implement bare minimum "basic" encoding
      tight: Implement quality control
      Replace miniz with system provided zlib
      tight: Check quality level at start of each frame
      Enable tight encoding by default
      server: Add dtrace probe for stream_send inside update_fb_done
      README: Add zlib to list of runtime dependencies
      nvnc_fb: Add a mechanism for signaling that a frame is in use
      Don't show partial frames to new clients
      Fix turbojpeg dependency
      Resolve host names in nvnc_open()
      Revert "tight: Limit rectangle max width according to spec"
      Enable SO_REUSEADDR again
      Redesign framebuffer update loop
      examples: draw: Draw a larget dot
      tight: Don't drop MSB when encoding rect size
      Don't render when a client is still encoding
      meson: Let user choose x86_64 SIMD extension for release build
      zrle: Replace an assert with return -1
      tight: Replace an assert with return -1
      fb: Add copyright notice
      damage: Add copyright notice
      raw-encoding: Add copyright notice
      meson: Set -DNDEBUG for all other build types than debug or debugoptimized
      Remove nvnc_set_dimensions()
      Prepare API for multi-display support
      tight: Allow lossy encoding with 16 bpp
      meson_options: Set the default SIMD extension to sse2
      Build benchmarks again
      Fix version error handling
      Use raw encoding by default if no encoding has been selected
      Align with neatvnc API changes
      Clean up dispatch hander on exit
      tight: Re-implement with threads
      Always enable tight, encoding but allow disabling lossy tight encoding
      server: Assert that a client has a stream open when processing a message
      Return failure if display buffer is not set in on_connect
      Implement server-side resizing
      stream: Ignore events after close instead of aborting
      tight: Add method to resize encoder grid
      Resize tight encoder on frame resize
      stream: Add byte counters
      Remove optimisation flags
      Bake version info into library
      README: Remove text about beta release
      examples: Make all functions static

Jan Beich (1):
      meson: allow static linking

John Axel Eriksson (1):
      Remove libuv header include

Stefan Agner (5):
      use static for functions not used outside this compile unit
      add warning if a function is not declared
      remove fb_lock/unlock
      fix below zero message count check
      fix build warnings when building without tls