{"id":13420357,"url":"https://github.com/LibVNC/libvncserver","last_synced_at":"2025-03-15T06:32:55.818Z","repository":{"id":15542997,"uuid":"18277887","full_name":"LibVNC/libvncserver","owner":"LibVNC","description":"LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.","archived":false,"fork":false,"pushed_at":"2024-10-20T19:41:21.000Z","size":15421,"stargazers_count":1115,"open_issues_count":81,"forks_count":484,"subscribers_count":75,"default_branch":"master","last_synced_at":"2024-10-21T21:46:18.700Z","etag":null,"topics":["c","embedded","embedded-systems","library","remote-desktop","rfb","vnc","vnc-client","vnc-server"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LibVNC.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"liberapay":"LibVNC","issuehunt":"LibVNC/libvncserver"}},"created_at":"2014-03-31T00:55:53.000Z","updated_at":"2024-10-21T00:50:16.000Z","dependencies_parsed_at":"2023-11-24T13:29:23.497Z","dependency_job_id":"acfc84e6-1fcf-45da-a68f-8ee373b49641","html_url":"https://github.com/LibVNC/libvncserver","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibVNC%2Flibvncserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibVNC%2Flibvncserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibVNC%2Flibvncserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LibVNC%2Flibvncserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LibVNC","download_url":"https://codeload.github.com/LibVNC/libvncserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221553270,"owners_count":16841996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","embedded","embedded-systems","library","remote-desktop","rfb","vnc","vnc-client","vnc-server"],"created_at":"2024-07-30T22:01:31.965Z","updated_at":"2024-10-26T16:30:13.544Z","avatar_url":"https://github.com/LibVNC.png","language":"C","funding_links":["https://liberapay.com/LibVNC","https://issuehunt.io/r/LibVNC/libvncserver","https://liberapay.com/LibVNC/donate"],"categories":["TODO scan for Android support in followings","C","Networking and Internet","网络和互联网","网络服务"],"sub_categories":["Advanced books","高级书籍","网络服务_其他"],"readme":"[![CI](https://github.com/LibVNC/libvncserver/actions/workflows/ci.yml/badge.svg)](https://github.com/LibVNC/libvncserver/actions/workflows/ci.yml)\n[![Build status](https://ci.appveyor.com/api/projects/status/fao6m1md3q4g2bwn/branch/master?svg=true)](https://ci.appveyor.com/project/bk138/libvncserver/branch/master)\n[![Help making this possible](https://img.shields.io/badge/liberapay-donate-yellow.png)](https://liberapay.com/LibVNC/donate) [![Join the chat at https://gitter.im/LibVNC/libvncserver](https://badges.gitter.im/LibVNC/libvncserver.svg)](https://gitter.im/LibVNC/libvncserver?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nLibVNCServer: A library for easy implementation of a VNC server.\nCopyright (C) 2001-2003 Johannes E. Schindelin\n\nIf you have a general question, it's best to [ask in the community chat](https://gitter.im/LibVNC/libvncserver). If your concern is about a bug or feature request instead, please use [the issue tracker](https://github.com/LibVNC/libvncserver/issues).\n\nIf you already used LibVNCServer, you probably want to read [NEWS](NEWS.md).\n\nWhat is it?\n===========\n\n[VNC](https://en.wikipedia.org/wiki/Virtual_Network_Computing) is a set of programs\nusing the [RFB (Remote Frame Buffer)](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst)\nprotocol. They are designed to \"export\" a frame buffer via net: you set up a server and can\nconnect to it via VNC viewers. If the server supports WebSockets (which LibVNCServer does), \nyou can also connect using an in-browser VNC viewer like [noVNC](https://novnc.com). \n\nIt is already in wide use for administration, but it is not that easy to program a server yourself.\n\nThis has been changed by LibVNCServer.\n\nProjects using it\n=================\n\nThe [homepage has a tentative list](https://libvnc.github.io/#projects-using) of\nall the projects using either LibVNCServer or LibVNCClient or both.\n\nRFB Protocol Support Status\n===========================\n\n## [Security Types](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#712security)\n\n|Name               |Number      | LibVNCServer | LibVNCClient |\n|-------------------|------------|--------------|--------------|\n|None               |          1 |            ✔ |            ✔ |\n|VNC Authentication |          2 |            ✔ |            ✔ |\n|SASL               |         20 |              |            ✔ |\n|MSLogon            | 0xfffffffa |              |            ✔ |\n|Apple ARD          |         30 |              |            ✔ |\n|TLS                |         18 |              |            ✔ |\n|VeNCrypt           |         19 |              |            ✔ |\n|UltraVNC MSLogonII |        113 |              |            ✔ |\n\n## [Encodings](https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#76encodings)\n\n| Name     | Number | LibVNCServer | LibVNCClient |\n|----------|--------|--------------|--------------|\n| Raw      | 1      | ✔            | ✔            |\n| CopyRect | 2      | ✔            | ✔            |\n| RRE      | 3      | ✔            | ✔            |\n| CoRRE    | 4      | ✔            | ✔            |\n| Hextile  | 5      | ✔            | ✔            |\n| Zlib     | 6      | ✔            | ✔            |\n| Tight    | 7      | ✔            | ✔            |\n| Ultra    | 9      | ✔            | ✔            |\n| TRLE     | 15     |              | ✔            |\n| ZRLE     | 16     | ✔            | ✔            |\n| ZYWRLE   | 17     | ✔            | ✔            |\n| TightPNG | -260   | ✔            |              |\n\n## Transports\n\n| Name                       | LibVNCServer | LibVNCClient |\n|----------------------------|--------------|--------------|\n| RFB                        | ✔            | ✔            |\n| Encrypted RFB via VeNCrypt |              | ✔            |\n| Encrypted RFB via AnonTLS  |              | ✔            |\n| Websockets                 | ✔            |              |\n| Encrypted Websockets       | ✔            |              |\n\n\nHow to build\n============\n\nLibVNCServer uses CMake, which you can download [here](https://cmake.org/download/)\nor, better yet, install using your platform's package manager (apt, yum, brew, macports,\nchocolatey, etc.).\n\nYou can then build via:\n\n    mkdir build\n    cd build\n    cmake ..\n    cmake --build .\n\nCrypto support in LibVNCClient and LibVNCServer can use different backends:\n\n * OpenSSL   (`-DWITH_OPENSSL=ON -DWITH_GCRYPT=OFF`)\n   * Supports all authentication methods in LibVNCClient and LibVNCServer.\n   * Supports WebSockets in LibVNCServer.\n * Libgcrypt (`-DWITH_OPENSSL=OFF -DWITH_GCRYPT=ON`)\n   * Supports all authentication methods in LibVNCClient and LibVNCServer.\n   * Supports WebSockets in LibVNCServer.\n * Included  (`-DWITH_OPENSSL=OFF -DWITH_GCRYPT=OFF`)\n   * Supports _only VNC authentication_ in LibVNCClient and LibVNCServer.\n   * Supports WebSockets in LibVNCServer.\n\nTransport Layer Security support in LibVNCClient and LibVNCServer can use:\n\n * OpenSSL (`-DWITH_OPENSSL=ON -DWITH_GNUTLS=OFF`)\n * GnuTLS  (`-DWITH_OPENSSL=OFF -DWITH_GNUTLS=ON`)\n\nFor some more comprehensive examples that include installation of dependencies, see\nthe [Unix CI](.travis.yml) and [Windows CI](.appveyor.yml) build setups.\n\nCrosscompiling from Unix to Android\n-----------------------------------\n\nSee https://developer.android.com/ndk/guides/cmake.html as a reference,\nbut basically it boils down to:\n\n    mkdir build\n    cd build\n    cmake .. -DANDROID_NDK=\u003cpath\u003e -DCMAKE_TOOLCHAIN_FILE=\u003cpath\u003e -DANDROID_NATIVE_API_LEVEL=\u003cAPI level you want\u003e\n    cmake --build .\n\nCrosscompiling from Linux to Windows\n------------------------------------\n\nTested with MinGW-w64 on Debian, which you should install via `sudo apt install mingw-w64`.\nYou can make use of the [provided toolchainfile](cmake/Toolchain-cross-mingw32-linux.cmake).\nIt sets CMake to expect (optional) win32 dependencies like libjpeg and friends\nin the `deps` directory. Note that you need (probably self-built) development packages for\nwin32, the `-dev` packages coming with your distribution won't work. Also note that you'll\nneed to put `libwinpthread-1.dll` in the build dir to run the examples. You can find this DLL\non your Linux build machine via `locate libwinpthread-1.dll`.\n\n\n\tmkdir build\n\tcd build\n\tcmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-mingw32-linux.cmake ..\n\tcmake --build .\n\nCutting a Release\n-----------------\n\n* [ ] Update AUTHORS.\n* [ ] Update NEWS.\n* [ ] Update git submodules.\n* [ ] Increment version in CMakeLists.txt\n* [ ] Update Doxygen API docs at https://libvnc.github.io/doc/html/\n* [ ] Update ChangeLog (using [git2cl](utils/git2cl.pl))\n\n\nHow to use\n==========\n\nSee the [LibVNCServer API intro documentation](https://libvnc.github.io/doc/html/libvncserver_doc.html)\nfor how to create a server instance, wire up input handlers and handle cursors.\n\nIn case you prefer to learn LibVNCServer by example, have a look at the servers in the\n[examples/server](examples/server) directory. \n\nFor LibVNCClient, examples can be found in [examples/client](examples/client).\n\nIncorporating LibVNCServer/LibVNCClient into your build system\n--------------------------------------------------------------\n\nThe install process installs [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)\n.pc files for LibVNCServer as well as LibVNCClient which you can use in your build\nsystem via the usual `pkg-config --cflags libvncserver` et al.\n\nIf using CMake, LibVNCServer versions \u003e 0.9.13 provide CMake configure files so\nin your project's CMakeLists.txt, you can say:\n\n```cmake\nfind_package(LibVNCServer)\nif(LibVNCServer_FOUND)\n\t# libs and headers location are now accessible via properties, but you only\n\t# need to add the respective export target to your project's target_link_libraries,\n\t# cmake will automatically add libs and headers\n\t# eg: add client (YOUR_PROJECT_TARGET being a placeholder for your real target -\n\t# it must be defined by add_executable or add_library):\n\ttarget_link_libraries(YOUR_PROJECT_TARGET LibVNCServer::vncclient)\n\t# add server:\n\ttarget_link_libraries(YOUR_PROJECT_TARGET LibVNCServer::vncserver)\nendif()\n```\n\nUsing Websockets\n----------------\n\nYou can try out the built-in websockets support by starting the example server\nfrom the [webclients](webclients) directory via `../examples/example`. It's\nimportant to _not_ start from within the `examples` directory as otherwise the\nserver program won't find its HTTP index file. The server program will tell you\na URL to point your web browser to. There, you can click on the noVNC-Button to\nconnect using the noVNC viewer git submodule (installable via\n`git submodule update --init`).\n\n### Using Secure Websockets\n\nIf you don't already have an SSL cert that's trusted by your browser, the most\ncomfortable way to create one is using [minica](https://github.com/jsha/minica).\nOn Debian-based distros, you can install it via `sudo apt install minica`, on\nMacOS via `brew install minica`.\n\nGo to the webclients directory and create host and CA certs via:\n\n\tcd webclients\n\tminica -org \"LibVNC\" $(hostname)\n\nTrust the cert in your browser by importing the created `cacert.crt`, e.g. for\nFirefox go to Options-\u003ePrivacy \u0026 Security-\u003eView Certificates-\u003eAuthorities and\nimport the created `cacert.crt`, tick the checkbox to use it for trusting\nwebsites. For other browsers, the process is similar.\n\nThen, you can finally start the example server, giving it the created host\nkey and cert:\n\n\t../examples/example -sslkeyfile $(hostname).key -sslcertfile $(hostname).crt\n\nThe server program will tell you a URL to point your web browser to. There,\nyou can click on the noVNC-encrypted-connection-button to connect using the\nbundled noVNC viewer using an encrypted Websockets connection.\n\n\nAchieving good performance on 'slow' links\n------------------------------------------\n\nIf your client-server connection is sluggish because the link is 'slow', there\nare a few things to consider.\n\nFirst off, you have to investigate whether your link has low throughput or\nhigh latency or both.\n\n### Tackling High Latency\n\nOn a high-latency link, try asking for framebuffer updates continously, as\nRFB is client-pull per default, not server-push. One example implementation\ncan be found [here](https://github.com/bk138/multivnc/blob/6251169ed11835ed709c0c191599937759856dda/src/VNCConn.cpp#L1112)\nand it definitely improves responsiveness.\n\nThere also is the [ContinuousUpdates RFB extension](https://github.com/rfbproto/rfbproto/blob/513c651fff1b213188daa5069444145a63e71617/rfbproto.rst#L4052),\nbut that one is not supported by LibVNC (yet).\n\n### Tackling Low Throughput\n\nIf your link is low-throughput, you basically have to reduce the number of\nbytes that get sent per framebuffer update:\n\n* First off, you should have your client request a lossy encoding such as Tight.\n  This already yields some huge savings.\n* Use a pixel format that represents a pixel with a smaller amount of bytes.\n  For instance, you can switch from 24-bit true colour to 16-bit high colour or\n  even a palleted colour mode. You can request a pixel format via the client or\n  set a default (native) one in the server. With the latter approach, however,\n  you very probably also have to change the way your framebuffer data gets written,\n  so the first client-side one should be preferred.\n* Send a scaled-down version of your framebuffer. You can do the scaling in your\n  application feeding data into LibVNCServer's framebuffer (would affect all clients)\n  or let LibVNCServer do the work for you if your client requests a scaled screen\n  via a [SetScale or SetScaleFactor message](https://github.com/rfbproto/rfbproto/blob/513c651fff1b213188daa5069444145a63e71617/rfbproto.rst#L1344)\n  (this is per-client scaling - UltraVNC viewers can request this).\n  \n\nCommercial Use\n==============\n\nAt the beginning of this project Dscho, the original author, would have\nliked to make it a BSD license. However, it is based on plenty of GPL'ed\ncode, so it has to be a GPL.\n\nThe people at AT\u0026T worked really well to produce something as clean and lean\nas VNC. The managers decided that for their fame, they would release the\nprogram for free. But not only that! They realized that by releasing also\nthe code for free, VNC would become an evolving little child, conquering\nnew worlds, making its parents very proud. As well they can be! To protect\nthis innovation, they decided to make it GPL, not BSD. The principal\ndifference is: You can make closed source programs deriving from BSD, not\nfrom GPL. You have to give proper credit with both.\n\nFrequently Asked Questions\n--------------------------\n\u003e Our commercial product wants to make use of LibVNCServer to create our own VNC server and distribute. Will this be considered derivative work in the GPLv2 context?\n\nYes. Please note that while you would have to stick to the GPL for your program if you link to LibVNCServer/LibVNCClient, you do not have to make your code public in case you use the derivative work internally in your organisation, see https://www.gnu.org/licenses/gpl-faq.html#GPLRequireSourcePostedPublic\n\n\u003e Does modifying LibVNCServer code or not make any difference in determining whether our VNC server will be considered derivative work?\n\nNo. By simply linking to LibVNCServer/LibVNCClient, your program becomes derivative work. \n\n\nLicense\n-------\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n\nContact\n=======\n\n* To file an issue, go to https://github.com/LibVNC/libvncserver/issues\n* For non-public contact please see [SECURITY.md](SECURITY.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLibVNC%2Flibvncserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLibVNC%2Flibvncserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLibVNC%2Flibvncserver/lists"}