Commit Graph

183 Commits (6d4bb07ea6abf82231ccd3699357b13ae113bb18)

Author SHA1 Message Date
Christian Beier e7dfd0a9d6 IPv6 support for LibVNCServer, part two: Let the http server listen on IPv6, too.
As done with the RFB sockets, this uses a separate-socket approach as well.
13 years ago
Christian Beier 83a7c713a9 IPv6 support for LibVNCServer, part one: accept IPv4 and IPv6 connections.
This uses a separate-socket approach since there are systems that do not
support dual binding sockets under *any* circumstances, for instance
OpenBSD. Using separate sockets for IPv4 and IPv6 is thus more portable
than having a v6 socket handle v4 connections as well.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
13 years ago
Kyle J. McKay 5c57575c35 Support Mac OS X vnc client with no password
Support connections from the Mac OS X built-in VNC client to
LibVNCServers running with no password and advertising a server
version of 3.7 or greater.
13 years ago
Luca Stauble fe2e2e4b59 Add an optional parameter to specify the ip address for reverse connections
For security reasons, it can be important to limit which IP addresses a
LibVNCClient-based client should listen for reverse connections. This
commit adds that option.

To preserve binary backwards-compatibility, the field was added to the end
of the rfbclient struct, and the function ListenAtTcpPort retains its
signature (but calls the new ListenAtTcpPortAndAddress).

[jes: shortened the commit subject, added a longer explanation in the
commit body and adjusted style]

Signed-off-by: Luca Stauble <gnekoz@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
13 years ago
Christian Beier 66b0603b5a Small changes to LibNVCClient doxygen documentation. 13 years ago
Christian Beier abf6fad894 Merge branch 'master' of https://github.com/watkipet/libvncserver 13 years ago
Christian Beier 49e59435e3 Merge branch 'included-novnc' 13 years ago
Christian Beier faadd48448 Rename 'classes' dir to 'webclients'. 13 years ago
Peter Watkins b551e05edb Added comments. 14 years ago
Johannes Schindelin 9d0b80059a Hopefully fix the crash when updating from 0.9.7 or earlier
For backwards-compatibility reasons, we can only add struct members to the
end. That way, existing callers still can use newer libraries, as the
structs are always allocated by the library (and therefore guaranteed to
have the correct size) and still rely on the same position of the parts
the callers know about.

Reported by Luca Falavigna.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier bffd9ee33b Merge branch 'websockets' 14 years ago
Gernot Tenchio 55234a37fd websockets: Move Hixie disconnect hack to websockets.c
Move the hixie disconnect hack to websockets.c. Removed
the remaining websockets vars from rfbClientPtr, so all
websockets stuff is hidden behind an opaque pointer.
14 years ago
Gernot Tenchio 1408866c86 websockets: Initial HyBi support 14 years ago
Gernot Tenchio 297072a691 websockets: Add wspath member to rfbClientRec
Added wspath member to rfbClientRec which holds the
path component of the initial websocket request.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Gernot Tenchio c2fb69f84d websockets: Add Websockets support to CMakeLists.txt
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Gernot Tenchio 4aa3586367 websockets: Add encryption support
[jes: moved out GnuTLS and OpenSSL support, added a dummy support, to
separate changes better, and to keep things compiling]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Joel Martin 6fac22a74b websockets: Initial WebSockets support.
Has a bug: WebSocket client disconnects are not detected.
rfbSendFramebufferUpdate is doing a MSG_PEEK recv to determine if
enough data is available which prevents a disconnect from being
detected.

Otherwise it's working pretty well.

[jes: moved added struct members to the end for binary compatibility with
previous LibVNCServer versions, removed an unused variable]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier b6d24bfa11 Adopt autotools build system to Android.
LibVNCServer/LibVNCClient now build for Android!
14 years ago
letsgoustc 488ad8a609 Make LibVNCServer build for Android.
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Joel Martin 896ca2036c tightPng: Add initial tightPng encoding support.
http://wiki.qemu.org/VNC_Tight_PNG

Signed-off-by: Joel Martin <github@martintribe.org>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
George Kiagiadakis ddd9b5ac7b Fix rfbProcessNewConnection to return some value instead of void.
BUG: 256891

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
George Kiagiadakis 9f8d8d4ef3 Split two event-loop related functions out of the rfbProcessEvents() mechanism.
This is required to be able to do proper event loop integration with Qt.
Idea was taken from vino's libvncserver fork.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
George Kiagiadakis 35246edddd Fix compilation in c89 mode.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
14 years ago
Christian Beier 6b60690a4a CMake: Check for libgcrypt availability. 14 years ago
Christian Beier d94db37d2d Remove autogenerated files. 14 years ago
Christian Beier e832999a58 Set proper file permissions for source files. 14 years ago
Christian Beier 9f49600787 libvncserver: Make RRE, CoRRE and Ultra encodings thread-safe.
This adds generic before/after encoding buffers to the rfbClient
struct, so there is no need for thread local storage.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 558a58e039 Remove unneeded files concerning CVS.
We have a git repo nowadays and I guess we won't go back to CVS.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Vic Lee 030ccf673d Add ARD (Apple Remote Desktop) security type support
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 705a5d46e6 Add doxygen documentation support.
Adds automagically generating libvncserver/libvncclient API
    documentation using doxygen. This gives a nice overview on both APIs,
    include dependencies and function call/caller dependencies.

    TODO: Modify all the explaining comments in the .c files for use with
          doxygen as well.

    This patch only changes comments, no functional changes at all!

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Christian Beier 453645a6ea libvncserver cleanup: remove rfbKeyFrame remnants. 14 years ago
Christian Beier e5523350a8 libvnc[server|client]: implement xvp VNC extension.
This implements the xvp VNC extension, which is described in the
community version of the RFB protocol:
http://tigervnc.sourceforge.net/cgi-bin/rfbproto
It is also mentioned in the official RFB protocol.
15 years ago
Christian Beier 128d06aaaa Only define strncasecmp to _strnicmp when using MS compiler.
Redefining strncasecmp to _strnicmp makes libvncclient hang forever in
SetFormatAndEncodings() on Windows when built with MinGW64.

Reported by Tobias Doerffel <tobias.doerffel@gmail.com>, thanks!
15 years ago
Christian Beier 47fc9fdd59 rfb/rfbproto.h: Prefix WORDS_BIGENDIAN when it is defined.
Some (all?) autotool versions do not properly prefix
WORDS_BIGENDIAN with LIBVNCSERVER_, so do that manually
here.

Thanks to Lorenz Kolb for reporting.
15 years ago
Christian Beier 0797e42a4a IP QoS support in libvncclient.
This enables setting the DSCP/Traffic Class field of IP/IPv6 packets
sent by a client. For example starting a client with -qosdscp 184
marks all outgoing traffic for expedited forwarding.

Implementation for Win32 is still a TODO, though. See
http://betelco.blogspot.com/2009/03/dscp-marking-under-windows-at.html
for an overview of the Win32 QoS API mess...
15 years ago
Christian Beier c0373e9cd4 Non-blocking sockets for Windows.
Expands the SetNonBlocking() function in libvncclient/sockets.c to also
work under Windows and also changes it to honour maybe already present
socket flags.

A similar function was introduced for libvncserver as well and
all the #ifdef'ed fnctl calls replaced with calls to that one.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Vic Lee 68e7696a27 libvncclient: add ipv6 support
[jes: pulled the "host" declarations into the conditionally compiled
blocks where that variable is used. Also fixed non-IPv6 connections.]

Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Christian Beier 09f7c684a2 Implement a DisplayFinishedHook for libvncserver.
If set, this hook gets called just before
rfbSendFrameBufferUpdate() returns.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
15 years ago
Corentin Chary a34d921571 cmake: fix CMakeLists.txt
- It's SDL_LIBRARY, not SDL_LIBRARIES
- Detect GnuTLS and set the macro in rfbconfig.h
- Add tls.c to libvncclient to avoid missing symbols

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Vic Lee a2ad61755f Add UltraVNC Repeater support in libvncclient
[jes: adjusted coding style, made sure port is initialized correctly]

Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Vic Lee b019572e73 Add support for viewers to select security types on demand
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Christian Beier 49cdfb4c1f libvncclient: better return value for non-forking listen.
The return value now better reflects what has happened:
1 on success (incoming connection on listen socket, we
accepted it successfully), -1 on error, 0 on timeout.

Also change the select calls to not check _all_ possible
file descriptors.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
15 years ago
Johannes Schindelin f49a292783 Merge branch 'VeNCrypt' 16 years ago
Vic Lee 29990f0090 Add MSLogon security type
Signed-off-by: Vic Lee <llyzs@163.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Christian Beier 0a4f1bada4 libvncclient: add a non-forking listen function.
Forking the whole process from deep within a library call does
not really work at all with apps that use multiple threads, i.e. every
reasonably modern GUI app. So, provide a non-forking listen function so
that the caller can decide if to fork, start a thread, etc.

This implementation adds a timeout parameter to be able to call the
listen function multiple times so that it's possible to do sth. else
in between, e.g. abort listening.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Alexander Dorokhine 62ae6bb7be libvncclient: Add FinishedFrameBufferUpdate callback
When working on a program which searches the display for some image, one
does not want to search again without getting an FB update.  Add a
callback to make this possible.
16 years ago
Vic Lee 95ae56c831 Add VeNCrypt support in libvncclient
Signed-off-by: Vic Lee <llyzs@163.com>
16 years ago
Christian Beier a92f7f46a6 mingw32 crosscompile fixes.
SOCKET is redefined in winsock2.h so #undef it where winsock2.h
is included. The changes in rfbproto.c circumvent crosscompiler
errors like 'S_IFMT' undeclared ...', the Makefile.am changes
avoid building linux specific stuff for a win32 host target.
Also added configure option to specify sdl-config.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Vic Lee 58a8df6ff2 Add anonymous TLS support in libvncclient
Signed-off-by: Vic Lee <llyzs@163.com>
16 years ago
runge 804335f9d2 Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422.
16 years ago
llyzs 2cd48332e0 Export the functions SupportsClient2Server and SupportsServer2Client
These are useful functions for VNC clients, so let's export them for
everybody to use.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Ben Klopfenstein d7c0b34b62 libvncclient: Unix sockets support by Ben Klopfenstein
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
dscho 8641c8e7bf Fix compilation in the absence of libjpeg
The JPEG library is not necessarily installed everywhere, and sometimes
it is outright undesirable to compile with JPEG support, e.g. when the
server is not very fast.  So fix the compilation for that case.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 3d9a563983 Move tightQualityLevel out of the JPEG specific part
The variable tightQualityLevel is used for ZYWRLE compression, too,
so if libjpeg is not present, but libz is, we still need to have
that struct member.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho ce8d6c2409 Make ZYWRLE thread-safe for multiple clients
ZYWRLE used a static buffer, which does not work too well if you have
more than one client in a threaded server.  Instead, we have the data
in the client structure now.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 059afcdf81 Add ZYWRLE server-side support (thanks Noriaki Yamazaki, Hitachi)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 09d902c5b7 Add CMake support (thanks to Christian Ehrlicher)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
17 years ago
dscho 26b291bf25 rfbclient.h: use 'extern "C"' to make it convenient to include from C++ 18 years ago
dscho 1060f747be rfb.h: Do not misplace guards
This buglet made it impossible to double include rfb.h from C++.
18 years ago
dscho 14b290384a LibVNCClient: some users do not want to get whole-screen updates; introduce client->updateRect for that 18 years ago
runge 1f8da9bde3 libvncclient: add GotCursorShape() and GotCopyRect(); x11vnc dep on libvncclient 18 years ago
runge afc931f15d Move our rfbEncodings numbers out of the TightVNC range. 18 years ago
dscho 6dd263946e do not always include rfb/keysym.h 19 years ago
dscho 6cfd9afee9 make cut text handling using a hook 19 years ago
steven_carr 3dff7658dc KeyboardLedState Encoding Masks are now defined for portability 19 years ago
steven_carr 2fa31ba4ea Permit auth.c to test major version 19 years ago
steven_carr 7218843ac0 Support sending TextChat messages back to the client 19 years ago
steven_carr 1c3af68549 Default to RFB 3.8, add command line option to specify the RFB version. 19 years ago
steven_carr ccdbe8f325 The great UltraVNC Compatibility Commit 19 years ago
steven_carr 0d734ad896 Server Capability Encodings
rfbEncodingSupportedEncodings - What encodings are supported?
rfbEncodingSupportedMessages  - What message types are supported?
rfbEncodingServerIdentity     - What is the servers version string?
ie: "x11vnc: 0.8.1 lastmod: 2006-04-25 (LibVNCServer 0.9pre)"
19 years ago
steven_carr 5865f0c4b7 Client side support for PalmVNC/UltraVNC 'Server Side Scaling' 19 years ago
steven_carr 97fe75fdce KeyboardLedState should be placed in 'various protocol extensions' 19 years ago
steven_carr 2670641432 Client Independent Server Side Scaling is now supported
Both PalmVNC and UltraVNC SetScale messages are supported
19 years ago
steven_carr afa9fae024 Ultra Encoding added. Tested against UltraVNC V1.01 19 years ago
dscho 7602f0e750 libvncclient: support changing of framebuffer size; make SDLvncviewer use it 19 years ago
dscho 1602b345f3 add KeyboardLedState extension 19 years ago
dscho b7a901d78f do not assume that KEYSYM_H guards X11's keysym.h 19 years ago
dscho f52cfa651b add handleEventsEagerly flag (Thanks, Donald) 19 years ago
rohit_99129 b7773ea6e6 Added method to get extension specific client data 19 years ago
rohit_99129 eb08d83d62 Added method to get extension specific client data 19 years ago
dscho d3599be1b8 add functions to unregister extensions/security types 19 years ago
dscho 1c26789eff introduce -deferptrupdate (thanks Dave) 19 years ago
dscho 61204490ce plug memory leaks 19 years ago
runge 8eb18f6cd8 fix deadlock from rfbReleaseExtensionIterator(), fix no libz/libjpeg builds, disable tightvnc-filetransfer if no libpthread, add --without-pthread option, rm // comments, set NAME_MAX if not defined, x11vnc: throttle load if fb update requests not taking place. 20 years ago
dscho 951ec26b7c The PseudoEncoding extension code was getting silly:
If the client asked for an encoding, and no enabled extension handled it,
LibVNCServer would walk through all extensions, and if they promised to handle
the encoding, execute the extension's newClient() if it was not NULL.

However, if newClient is not NULL, it will be called when a client connects,
and if it returns TRUE, the extension will be enabled. Since all the state of
the extension should be in the client data, there is no good reason why
newClient should return FALSE the first time (thus not enabling the extension),
but TRUE when called just before calling enablePseudoEncoding().

So in effect, the extension got enabled all the time, even if that was not
necessary.

The resolution is to pass a void** to enablePseudoEncoding. This has the
further advantage that enablePseudoEncoding can remalloc() or free() the
data without problems. Though keep in mind that if enablePseudoEncoding()
is called on a not-yet-enabled extension, the passed data points to NULL.
20 years ago
dscho 194a76df11 add an extension mechanism for LibVNCClient, modify the client data handling
so that more than one data structure can be attached, and add an example
to speak the client part of the back channel.
20 years ago
dscho d15e35586b kill BackChannel and CustomClientMessage: the new extension technique makes these hooks obsolete 20 years ago
dscho 60f1770e10 provide a list of the pseudo encodings understood by the extension 20 years ago
dscho 8490de3ff0 add enablePseudoEncoding() to rfbProtocolExtension 20 years ago
dscho 0a909fde7a This monster commit contains support for TightVNC's file transfer protocol.
Thank you very much, Rohit!
20 years ago
dscho 93be927b1c Introduce generic protocol extension method. Deprecate
the processCustomClientMessage() method.
20 years ago
dscho 94fcd86cc2 Security is global. This was a misguided attempt to evade a global list.
I eventually saw the light and went with Rohit´s original approach.
20 years ago
dscho da7b3e714f support VNC protocol version 3.7 20 years ago
dscho 7a12087ba0 add definitions from other VNC implementations 20 years ago
dscho 669b4c8685 make zlib and tight handling thread safe (static -> rfbClient) 20 years ago
dscho a40b790ee4 fix compilation for systems without socklen_t 20 years ago
dscho ee52441372 hide strict ansi stuff if not explicitely turned on; actually use the socklen_t test from configure.ac 20 years ago
dscho 8bee4eb990 ANSIfy, fix some warnings from Linus' sparse 20 years ago
dscho 34f714bcdc socketInitDone -> socketState 20 years ago
dscho cef6224e1c do the in_addr_t stuff correctly... 20 years ago