summaryrefslogtreecommitdiffstats
path: root/common/rfb
Commit message (Collapse)AuthorAgeFilesLines
* Remove max area parameter from Region::get_rects()Pierre Ossman2019-06-242-12/+5
| | | | | It was unused and added complexity and bugs to the code. So let's remove it rather than trying to clean up a function no one needed.
* Merge branch 'master' of https://github.com/lprylli/tigervncPierre Ossman2019-05-091-1/+1
|\
| * Fix wrap-aware isAfter function in Congestion.cxxLoic Prylli2019-04-271-1/+1
| | | | | | | | | | | | | | | | Result of overflow on signed integer arithmetic is undefined in C/C++ standard. So in previous version clang was compiling the statement as (int)a > (int)b (i.e. assuming no overflow), which leads to incorrect result. Correct deterministic behavior means doing overflow arithmetic as unsigned, i.e. a != b && a - b <= UINT_MAX / 2
* | Remove unneeded logging from ZRLE decoderPierre Ossman2019-04-291-2/+0
| | | | | | | | | | We will log the exception, so avoid direct writes to stderr by simply removing these log lines.
* | Do proper logging rather than fprintf(stderr, ...)Pierre Ossman2019-04-295-12/+21
| |
* | Remove commented out loggingPierre Ossman2019-04-291-2/+0
|/
* Increase version string buffer size for gccPierre Ossman2019-04-011-1/+1
| | | | | | There is some bug in gcc's new -Werror=format-overflow that makes it think majorVersion could end up being very large. Increase the target buffer for now to keep gcc happy.
* Remove unused force protocol 3.3 codePierre Ossman2019-04-012-8/+2
|
* Add delay on authentication failuresPierre Ossman2019-04-014-6/+45
| | | | | | | This provides some basic rate limiting that will make it difficult for an attacker to brute force passwords. Only relevant when the blacklist is disabled as otherwise the attacker only gets a very limited number of attempts.
* Add missing throws for exceptionPierre Ossman2019-03-261-5/+5
| | | | | It is not enough to create an exception object, you need to throw it as well.
* Allow blacklist to be disabledPierre Ossman2019-03-251-0/+7
| | | | | | There might be multiple clients using a single IP (e.g. NAT), which can make the blacklist do more harm than good. So add a setting to disable it if needed.
* Move Blacklist parameters out of the classPierre Ossman2019-03-252-11/+10
| | | | | No need to expose these, so keep them internal to the implementation, like most settings are.
* Merge branch 'vmware' of https://github.com/CendioOssman/tigervncPierre Ossman2018-12-107-6/+163
|\
| * Add support for VMware LED statusPierre Ossman2018-12-106-5/+34
| |
| * Add support for VMware cursorsPierre Ossman2018-12-107-1/+129
| |
* | Merge branch 'connparams' of https://github.com/CendioOssman/tigervncPierre Ossman2018-12-1048-820/+1129
|\|
| * Make sure we always have a valid screen layoutPierre Ossman2018-12-101-6/+9
| | | | | | | | | | Add more checks and fix some callers to make sure that the server core always has a valid screen layout configured.
| * Handle line breaks in log messagesPierre Ossman2018-12-101-1/+10
| |
| * Require all SMsgWriter caller to check capabilitiesPierre Ossman2018-12-103-21/+18
| | | | | | | | | | | | Make the API consisitent by requiring the caller to check what the client supports before calling any of the write* functions. This avoids the confusion that the functions might not always do anything.
| * Abstract sending cursor and resizing the desktopPierre Ossman2018-12-105-158/+93
| | | | | | | | | | | | Avoid having the callers need to know about the different variants of these functions and instead have the writer pick the most appropriate extension.
| * Always send current screen layout to clientPierre Ossman2018-12-103-19/+7
| | | | | | | | | | | | This is what the protocol requires, rather than sending what the client specified in the request. This should be the same in practice except for failures and possibly some races.
| * Move client attributes out of ServerParamsPierre Ossman2018-11-014-23/+26
| | | | | | | | | | | | ServerParams should contain the server state and not information about client settings or capabilities. Move those things up a level to the CConnection object.
| * Merge client resize capabilitiesPierre Ossman2018-11-014-4/+28
| | | | | | | | | | | | No need to have one setting for each extension. All the client code needs to indicate is if it supports resize. The common code can then map this to relevant extensions.
| * Don't update screen layout directly on incoming client requestPierre Ossman2018-11-012-9/+2
| | | | | | | | It needs to be validated and take effect in the server first.
| * Remove unused flags from ServerParamsPierre Ossman2018-11-013-12/+2
| | | | | | | | These were either completely unused, or always true.
| * Simplify encoding list generatorPierre Ossman2018-11-011-30/+2
| | | | | | | | | | Tight is the default preferred encoding, so we don't really need special handling for it to be first in the list.
| * Use STL list for encoding listPierre Ossman2018-11-013-27/+29
| | | | | | | | | | This is a lot safer and cleaner. The old code had a fixed size that we didn't properly keep track of.
| * Make arguments explicit in all message writer methodsPierre Ossman2018-11-017-87/+88
| | | | | | | | | | | | Make sure all methods only write what is given as arguments, and avoid side effects by getting data from parameter objects. This keeps things readable in the calling code.
| * Move update request handling in to CConnectionPierre Ossman2018-11-012-0/+203
| | | | | | | | | | It's a generic client thing, so abstract it in to the common library. Makes it easier to integrate with other common code.
| * Let CMsgHandler::serverInit() handle initial set upPierre Ossman2018-11-015-12/+32
| | | | | | | | | | | | | | Avoid using the callbacks used for runtime changes for the initial setup. They weren't really useful anyway as you could not allocate a framebuffer without also knowing the pixel format. So make things more clear by letting serverInit() get the initial settings.
| * Stop requiring CConnection::serverInit() to be overriddenPierre Ossman2018-11-012-6/+16
| | | | | | | | | | Add an explicit callback for subclasses to do their startup in. This makes it easier to do proper ordering, and avoids mistakes.
| * Remove unused CConnection::getIdentityVerifier()Pierre Ossman2018-11-011-4/+0
| |
| * Remove indirect capability attributesPierre Ossman2018-11-016-108/+78
| | | | | | | | | | Better to check the actual list of supported encodings directly. Makes parts more readable, and no risk of getting out of sync.
| * Move copy rect handling to EncodeManagerPierre Ossman2018-11-014-24/+8
| | | | | | | | | | No need to spread things out. Keep all of the handling in a single place to make things clearer.
| * Rename ConnParams to ClientParamsPierre Ossman2018-11-0116-165/+161
| | | | | | | | | | | | Now that we've split out server state to ServerParams, ConnParams only contains state for a client. Rename the class and variables to reflect this.
| * Split out ServerParams from ConnParamsPierre Ossman2018-11-0125-121/+317
| | | | | | | | | | | | We need to track different things in the server and client, so separate things to two independent structures to keep things more clear.
| * Encapsulate screen layout storage in ConnParamsPierre Ossman2018-11-018-43/+61
| | | | | | | | | | | | | | Avoid direct access to the screen dimensions and layout so that we can make sure it stays sane. This also makes sure the layout is properly updated when we only get the screen dimensions from the server.
| * Move version reading/writing out of ConnParamsPierre Ossman2018-10-264-42/+41
| | | | | | | | | | That object is just a container for the current state. Move the I/O to the classes already doing such stuff.
| * Remove unused includePierre Ossman2018-10-262-2/+0
| | | | | | | | | | We should not be including server headers from client code. It was not even needed, so simply remove it.
* | Increase range of ComparingUpdateTracker statisticsPierre Ossman2018-11-301-1/+1
| | | | | | | | | | | | 32 bits are not enough to keep track of all the pixels that might flow through the system. Expand things to 64 bits, which should cover all reasonable uses.
* | Abort unsafe lossless refresh earlyPierre Ossman2018-11-231-13/+15
| | | | | | | | | | | | | | We need to check earlier if we are going to send this refresh or not. Otherwise we send out pings pointlessly, and we also stall the request loop with a client as we clear the requested region without actually sending an update message.
* | Move lossless refresh handling to separate methodPierre Ossman2018-11-232-45/+79
| | | | | | | | | | It makes the logic a bit easier to follow, and also fixes the case where just a fake update is needed.
* | Fix bad size check in Tight decoderPierre Ossman2018-11-231-1/+1
| | | | | | | | Fallout from beb59a43.
* | Use larger integers for the cursor ditheringPierre Ossman2018-11-231-6/+6
| | | | | | | | | | We need a larger range to handle the temporary overflow caused by the Floyd-Steinberg dithering.
* | Merge branch 'vla' of https://github.com/CendioOssman/tigervncPierre Ossman2018-11-213-29/+31
|\ \
| * | Remove variable length arraysPierre Ossman2018-11-073-29/+31
| |/ | | | | | | | | These are not allowed in C++, and have been made optional in C11. So let's just get rid of them and any issues they may cause.
* | Merge branch 'covscan' of https://github.com/grulja/tigervncPierre Ossman2018-11-212-3/+3
|\ \
| * | Fix memory leaksJan Grulich2018-11-201-1/+1
| | |
| * | Do not duplicate default string twiceJan Grulich2018-09-261-2/+2
| | |
* | | Merge branch 'exittimer' of https://github.com/CendioOssman/tigervncPierre Ossman2018-11-095-145/+63
|\ \ \