Commit Graph

1272 Commits

Author SHA1 Message Date
Martin Fleisz 67369dad55
Merge pull request #6237 from akallabeth/shadow_surface_lock
Fixed surface locking for shadow server.
2020-06-16 11:28:12 +02:00
akallabeth a38d6c53a6 Fixed surface locking for shadow server. 2020-06-16 11:18:17 +02:00
Martin Fleisz 5a09e12ec5
Merge pull request #6239 from akallabeth/shadow_auth_log
Improve X11 shadow authentication reason failure log
2020-06-16 11:17:57 +02:00
Kubistika 0cf764f170 server: proxy: cap plugin: fix var and func declaration 2020-06-05 09:22:26 +02:00
Kobi Mizrachi 19809bf338 server: proxy: implement session capture plugin 2020-06-05 09:22:26 +02:00
Kobi Mizrachi 44c50ff1d5 server: proxy: remove old session capture code 2020-06-05 09:22:26 +02:00
akallabeth e66ee477c0 Improve X11 shadow authentication reason failure log 2020-05-27 11:53:28 +02:00
Kobi Mizrachi 6269243091 server: proxy: print server host ip on new conn (for clustering info) 2020-05-20 10:36:42 +03:00
Kobi Mizrachi 7d48a587d2 server: proxy: prepare for exporting gfx capture to a module 2020-05-20 10:31:51 +03:00
Kobi Mizrachi 715c3f293a server: proxy: vc hook: check if proxy client is not null 2020-05-19 14:43:30 +03:00
Kobi Mizrachi 215e41b4ee server: proxy: config: fix comma separated list parsing 2020-05-19 14:42:59 +03:00
Kobi Mizrachi 9de59051f6 server: proxy: refactor 2020-05-19 14:42:26 +03:00
Kobi Mizrachi d28ad95fbe server: proxy: use peer load balance info when host is fetched from config 2020-05-12 12:43:08 +02:00
Kobi Mizrachi de0802a352 server: proxy: Register signal handler after modules finished loading.
This prevents a race where the signal handler free's structs that
modules use while initializing.
2020-05-11 09:11:29 +02:00
Kobi Mizrachi 00c25eada0 server: proxy: print version and buildconfig on startup 2020-05-11 09:11:29 +02:00
Kentaro Hayashi 148f3c675d Fixed typos (Otherweise)
Otherweise ->
Otherw ise
      ^
2020-05-10 16:35:20 +09:00
akallabeth cbee45aace Fixed clipboard 'called with invalid type' warning 2020-05-06 13:31:57 +02:00
Linus Heckemann 5ce0ab909f
shadow_server: allow specifying IP addresses to listen on (#6050)
* shadow_server: allow specifying IP addresses to listen on

This allows using IPv6 as well as listening only on specific
interfaces. Additionally, it enables listening on local and TCP
sockets simultaneously.

* listener: log address with square brackets

This disambiguates IPv6 addresses.

* shadow_server: check error on each socket binding

* Refactored shadow /bind-address for 2.0 compiatibility.

* Made /ipc-socket and /bind-address incompatible arguments.

* Fixed shadow /bind-address handling and description

* Allow multiple bind addresses for shadow server.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2020-05-05 08:35:19 +02:00
Armin Novak 24bd601f8d Fixed data type warnings 2020-04-11 09:43:14 +02:00
Norbert Federa e3b3b52f6a server: fix surface command types
- Legacy RemoteFX is encapsulated in a "Stream Surface Bits Command" (CMDTYPE_STREAM_SURFACE_BITS)
- NSCodec is encapsulated in a "Set Surface Bits Command" (CMDTYPE_SET_SURFACE_BITS)

References:
- MS-RDPRFX 3.1.8.3.1 RemoteFX Stream / Encode Message Sequencing
- MS-RDPNSC 2.2.2 NSCodec Compressed Bitmap Stream
2020-04-03 14:35:58 +02:00
akallabeth 88ad9ca56b Fix sending/receiving surface bits command.
* Pass on proper command type to application
* On send let the server implementation decide to send
   2.2.9.2.1 Set Surface Bits Command (TS_SURFCMD_SET_SURF_BITS) or
   2.2.9.2.2 Stream Surface Bits Command (TS_SURFCMD_STREAM_SURF_BITS)
Thanks to @viniciusjarina for tracing the issue down.
2020-04-03 12:00:53 +02:00
Kobi Mizrachi 3b673be378 server: proxy: fix wrong log level used in pf_modules_run_filter 2020-03-12 08:36:05 +01:00
Kobi Mizrachi 1484d0ac48 server: proxy: removed unnecessary cast after #5955 2020-03-12 08:36:05 +01:00
Kobi Mizrachi 73445e1462 server: proxy: use config path from argv if provided 2020-03-12 08:36:05 +01:00
Armin Novak eca32456bb Removed unused function 2020-03-10 14:04:53 +01:00
Armin Novak 3ba66db99d Unify pReceiveChannelData and psPeerReceiveChannelData
Fix definitions of the two function pointers.
Use and definition did not match, fix that.
Will create warnings in external projects
2020-03-10 12:21:14 +01:00
Armin Novak d5b5088eac Fixed misinterpretation of SendChannelData
SendChannelData was defined with a return value of type int, but
used as BOOL everywhere. Fix the definition to match use.
2020-03-10 12:21:14 +01:00
Armin Novak cffbbacccd Default proxy modules to OFF
The proxy module sample is c++ 11 which some older build targets
do not like. Deactivate this by default.
2020-03-09 09:16:41 +01:00
Armin Novak a6d0b67ca6 Set C++ standard for proxy demo target 2020-03-09 09:03:19 +01:00
Armin Novak 83348ef98f CMake options to compile without proxy or shadow
* Added WITH_SHADOW (default ON) to compile without shadow server
* Added WITH_PROXY (default ON) to compile without proxy server
2020-03-09 08:50:40 +01:00
Armin Novak d7ba252cd7 Fixed arguments for peer->ReceiveChannelData 2020-03-04 14:52:19 +01:00
Armin Novak 0f729d2b2c Fixed conversion and return checks.
* Fix some missing argument checks for function pointer implementations
* Fix broken return value check for client->SendChannelData
* Updated const correctness for function pointer implementations
2020-03-04 14:44:03 +01:00
Armin Novak d7da4b7e00 Removed function pointer casts for shadow. 2020-03-03 13:02:22 +01:00
Armin Novak 829497b313 Made CHANNEL_TSMF optional and deprecated. 2020-02-26 13:56:43 +01:00
Kobi Mizrachi b574876986 server: proxy: client: change ClientFree->ContextFree 2020-02-26 11:47:01 +01:00
Kobi Mizrachi 079871ac65 server: proxy: support static vc passthrough 2020-02-26 11:47:01 +01:00
Armin Novak 436b68e416 Fixed #5895: cast warnings. 2020-02-19 10:21:43 +01:00
Martin Fleisz e304428a5f
Merge pull request #5857 from akallabeth/scanbuild_fixes
Scanbuild fixes
2020-02-12 10:16:54 +01:00
Kobi Mizrachi 4823f41274 server: proxy: improve logs 2020-02-10 09:37:54 +01:00
Kobi Mizrachi 8c8e5e4239 server: proxy: show indicative log on bind failure. 2020-01-27 07:57:45 +01:00
Armin Novak 5ba7061a18 Fixed type of index variables. 2020-01-23 10:12:12 +01:00
Armin Novak d67cea9b1a Fixed NULL dereference. 2020-01-23 10:09:23 +01:00
Kobi Mizrachi 18be45eca1 server: proxy: specify which modules to load in config 2020-01-22 14:18:21 +01:00
Kobi Mizrachi 6d3f658983 server: proxy: add an indicative log listener->Open fails. fixes #5850 2020-01-21 12:08:39 +01:00
Kobi Mizrachi c0cc676a4e server: proxy: pf_client.c: remove unused includes 2020-01-21 12:08:39 +01:00
Kobi Mizrachi 92c3f76809 server: proxy: disconnect all active sessions on shutdown 2020-01-21 12:08:39 +01:00
Kobi Mizrachi 424e73a895 server: proxy: modules_init: create modules dir if not exists 2020-01-21 11:43:13 +01:00
Kobi Mizrachi 9d82f5305a server: proxy: update config.ini 2020-01-21 11:43:13 +01:00
Kobi Mizrachi ab3a096353 server: proxy: fix race condition when between client thread and server update thread 2020-01-15 11:23:14 +02:00
Kobi Mizrachi 15909af766 server: proxy: fix pf_modules_init 2020-01-14 10:40:49 +01:00
David Fort 0cc3af2282
Merge pull request #5796 from akallabeth/rdp_10_7_large_pointers
Added RDP 10.7 large pointer support
2020-01-14 10:17:13 +01:00
Kobi Mizrachi e3728c1822 server: proxy: do not compile modules by default 2020-01-14 07:58:47 +01:00
Kobi Mizrachi 706e13c312 server: proxy: shutdown gracefully 2020-01-14 07:58:47 +01:00
Kobi Mizrachi b2fad50cd3 server: proxy: rewrite modules API
* Add support for C++ plugins.
* Seperate between a "module" and a "plugin": a module is a shared
library that exposes a function called "proxy_module_entry_point". This
function gets a parameter to `proxyPluginsManager*`, which can be used to
register plugins.
* Refine the API of the modules infrastructure:
 * use proxyData* instead of rdpContext* when firing a hook or calling a filter.
 * use clearer names.
* Instead of having to specify a path for each module to be loaded in
the configuration, the proxy now loads modules from specificed
directory, using the CMAKE variable PROXY_PLUGINDIR.
* Add an option to specify required plugins: plugins that the proxy
wouldn't start without having them fully loaded.
2020-01-14 07:58:47 +01:00
Kobi Mizrachi 29dee84a2b rail/server: rename rdpContext to rdpcontext
Fixes a compilation error when mixing c++ and c code.
2020-01-14 07:58:47 +01:00
Kobi Mizrachi 47ca28b5c3 server: proxy: fix leak in pf_context_copy_settings 2020-01-13 13:41:44 +01:00
Kobi Mizrachi ca2e578acc server: proxy: add a unique id to each session and improve logs 2020-01-08 11:59:34 +01:00
Kobi Mizrachi ab3a72f825 server: proxy: move peer initialization to seperate function 2020-01-08 11:59:34 +01:00
Kobi Mizrachi 77ca7ac2ad server: proxy: make fallback to tls configurable 2020-01-08 07:58:03 +01:00
David Fort 31a4e2ad8b
Merge pull request #5745 from akallabeth/urbdrc_rewrite
Urbdrc rewrite
2020-01-06 09:23:45 +01:00
Armin Novak 182d0ce548 Added RDP 10.7 large pointer support
* Implements [MS-RDPBCGR] version 51 large pointer support.
* Logs unknown large pointer capability flags as warning.

Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-19 09:53:40 +01:00
Kobi Mizrachi 2e1d719ab1 server: proxy: proxy keyboard leds and imei 2019-12-17 15:33:11 +01:00
Bernhard Miklautz 814771eed5
Merge pull request #5778 from akallabeth/shadow_warnings
Added warning to win shadow server
2019-12-16 09:57:16 +01:00
Mati Shabtay 97606edeee proxy: Implement RAIL support in proxy 2019-12-12 11:10:44 +01:00
Armin Novak e6ff9e3efa Added warning to win shadow server
Currently the windows shadow server does not support authentication.
Log that fact so everyone using it is notified on each login.
2019-12-12 09:20:30 +01:00
Armin Novak 7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
Armin Novak 15ad496bba Cleaned up server sample audin channel use. 2019-11-22 10:56:21 +01:00
kubistika 09648834a0 server: proxy: fix sync issue in gfx opening 2019-11-12 12:45:01 +01:00
Armin Novak 72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Martin Fleisz bc39b32d20
Merge pull request #5685 from akallabeth/multi_instance_arg_parse
COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
2019-11-06 09:09:22 +01:00
Martin Fleisz 5b6663fe3a
Merge pull request #5689 from akallabeth/cleanups
Cleanups
2019-11-05 15:28:02 +01:00
akallabeth acad36465d Fix #5693: Add missing link to gfx client channel library 2019-11-02 09:57:03 +01:00
kubistika 59ba044ccd server: proxy: client: always do NLA fallback 2019-10-31 11:26:13 +02:00
Armin Novak f01e042211 Code cleanups (strlen, casts, size_t, ...) 2019-10-29 11:58:43 +01:00
kubistika d5245e1263 server: proxy: export config utils functions to be used by modules 2019-10-28 13:31:10 +01:00
kubistika 160446e093 server: proxy: stop loading session captures config if it is disabled 2019-10-28 13:31:10 +01:00
Armin Novak 10ce60ade1 Use COMMAND_LINE_ARGUMENT_A copy also in shadow server code. 2019-10-28 13:30:05 +01:00
Armin Novak 0c87eaee4d COMMAND_LINE_ARGUMENT structs contain parser results, use one per instance
Remove the old global structs as the parser modifies them. When using
multiple instances in the same process space this could break parsing.
2019-10-28 13:30:05 +01:00
kubistika ab2b288f87 server: proxy: refactor config loader 2019-10-24 12:57:48 +02:00
kubistika d92485899d server: proxy: capture: refactor path creation 2019-10-24 12:19:31 +02:00
kubistika c723980a2f server: proxy: add python script to create a video from session frames 2019-10-24 12:19:31 +02:00
kubistika 16d4d46da6 server: proxy: implement session capture feature 2019-10-24 12:19:31 +02:00
kubistika 5e09ac9a7a server: proxy: client use PIXEL_FORMAT_BGRA32 (easier to write frames to bitmap) 2019-10-24 12:19:31 +02:00
kubistika 40463bb2f2 server: proxy: client: terminate the connection if pre connect hook fails 2019-10-22 10:16:17 +02:00
Martin Fleisz 5ead938271
Merge pull request #5657 from akallabeth/warning_fixes2
Warning fixes2
2019-10-17 17:00:57 +02:00
Martin Fleisz 105527ed37
Merge pull request #5648 from akallabeth/h264_dyn
H264 runtime detection
2019-10-17 12:54:43 +02:00
Armin Novak 59b4988f56 Fixed compilation warnings. 2019-10-16 14:54:05 +02:00
Martin Fleisz 799685cb92
Merge pull request #5646 from akallabeth/realloc_fixes
Fixed #5645: realloc return handling
2019-10-07 10:43:11 +02:00
Armin Novak 27c6ad6ebf Let shadow server detect H264 support at runtime 2019-10-07 09:47:03 +02:00
Armin Novak ea492ed6b0 Fixed windows shadow server startup issue. 2019-10-04 17:13:00 +02:00
Armin Novak 19e4eb5d09 Added /buildconfig command line for shadow. 2019-10-04 16:19:23 +02:00
Armin Novak e09f739b90 Cleaned up NSC API 2019-10-04 10:33:41 +02:00
kubistika f4d169fb75 server: proxy: register input and update callbacks in post connect
To avoid a race in which the server received an input event before
proxy's client is initialized, we now only register input and update
callbacks after client is initialized and safe to use.
2019-09-30 10:08:28 +02:00
kubistika 4d175f6008 server: proxy: refactor pf_context_create_client_context 2019-09-30 10:08:28 +02:00
kubistika b6730ea31e server: proxy: support auto reconnect 2019-09-30 10:08:28 +02:00
kubistika 32913850d5 server: proxy: separate client and server security settings 2019-09-30 10:07:43 +02:00
Bernhard Miklautz 02a65840e8
Merge pull request #5578 from kubistika/proxy/refactor
sever: proxy: code refactor
2019-09-19 10:55:08 +02:00
kubistika 53a92421b1 server: proxy: config: fix mem leak 2019-09-11 14:29:04 +03:00
Armin Novak 8c17d2fa41 Add MOUSEEVENTF_HWHEEL define if not found in windows.h 2019-09-10 09:35:32 +02:00
Armin Novak b1d42b17f6 Fix windows shadow server issues reported in #5577 2019-09-10 09:18:55 +02:00
kubistika 867843eef7 server: proxy: client: only try NLA if credentials available 2019-09-10 10:11:00 +03:00
kubistika a87065ed67 server: proxy: get rid of unnecessary casts 2019-09-09 17:42:18 +03:00
kubistika 0b340b784c server: proxy: drop local unix socket listen option 2019-09-09 17:42:18 +03:00
kubistika 8a75e8f54e server: proxy: refactor 2019-09-09 17:42:18 +03:00
kubistika f5d32f4617 server: proxy: refactor usage of pf_context_copy_settings 2019-09-09 17:35:07 +03:00
kubistika 7ed39ce724 server: proxy: make sure module's pre connect only called once 2019-09-08 15:08:15 +03:00
kubistika 8cf8da3e41 server: proxy: config: remove duplicate declaration of config macros 2019-09-08 15:06:22 +03:00
Martin Fleisz c90b7a9714
Merge pull request #5563 from akallabeth/scanbuild_fixes
Scanbuild fixes
2019-09-03 10:57:24 +02:00
kubistika 62b32fbab9 server: proxy: only wait for server dynvc when needed 2019-09-03 09:09:27 +02:00
Armin Novak 4ff24d074b Fixed memory leak in error branch 2019-09-03 08:56:36 +02:00
kubistika e135106731 server: proxy: rdpsnd support 2019-08-29 14:39:17 +02:00
kubistika dc11bcc9f0 server: proxy: fix nla fallback (introuduced in #5522) 2019-08-28 17:03:40 +02:00
kubistika 067b7dfd1c server: proxy: disp: fix copyright 2019-08-23 11:58:08 +02:00
kubistika 04e1708df1 server: proxy: use new hooks api 2019-08-23 11:58:08 +02:00
kubistika 32fff644da server: proxy: improve modules api 2019-08-23 11:58:08 +02:00
kubistika d1c5862f54 server: proxy: sync cliprdr opening 2019-08-19 17:03:13 +02:00
kubistika 0ad87d98ca server: proxy: load proxy clipboard config 2019-08-19 09:30:40 +02:00
kubistika 7dc70b86d6 server: proxy: cliprdr support 2019-08-19 09:30:40 +02:00
kubistika ef306fbff6 server: proxy: pf_context.c: Fix nla crash
Because the proxy uses freerdp_settings_copy to do re-negotiation after
first connection to remote server, all redirection information
(RedirectionPassword, RedirectionDomain, etc.) pointers were duplicated
(to both client and server settings structs). Then, at disconnection, a
double-free occured.
2019-08-14 19:39:34 +02:00
Martin Fleisz e16d559f70
Merge pull request #5517 from akallabeth/winmm_latency
Added proper latency estimation for winmm sound backend.
2019-08-14 12:48:21 +02:00
kubistika ddb811cbc8 server: proxy: client: before loading client addins, wait for serve's dynvc to be in ready state 2019-08-13 16:28:05 +02:00
kubistika 1da91444c0 server: proxy: client: set glyph support level to NONE 2019-08-13 16:28:05 +02:00
Armin Novak ddb209445a Fix server compile against _WIN32_WINNT=0x601 2019-08-13 10:55:12 +02:00
kubistika cb833ed45c server: proxy: print configuration on startup 2019-08-05 11:01:31 +03:00
kubistika 595f23b8fe server: proxy: channels: only open allowed channels 2019-08-05 11:01:31 +03:00
kubistika 0b6864a273 server: proxy: filters: demo: log instead of dropping the connection 2019-08-05 11:01:31 +03:00
kubistika c5e6e0ba31 server: proxy: filters: make sure filter_init is exported in filters compilation 2019-08-05 11:01:31 +03:00
kubistika 31cd7b844f server: proxy: refactor configuration loader 2019-08-05 10:54:07 +03:00
kubistika 3051a4b4b4 server: proxy: ensure client termination 2019-08-02 10:17:45 +02:00
kubistika 038c933f98 server: proxy: sync server and client channels
when disconnections/redirections occured, sometimes server/client
channels were not synced, meaning that for example the gfx server
received a message, then tried to use gfx client that was already freed.
2019-08-02 10:17:45 +02:00
kubistika a9758a8c0c server: proxy: fix rdpgfx close race 2019-07-30 09:56:06 +02:00
kubistika 908d6ebe1e server: proxy: Add logs, call client->Close to send disconnection ultimatum 2019-07-16 16:20:06 +03:00
kubistika d0065ee9a1 server: proxy: remove unnecessary function handle_client_disconnection 2019-07-16 16:20:06 +03:00
kubistika b12ee3288c server: proxy: adjust log levels 2019-07-16 16:20:06 +03:00
kubistika 95851b25e7 server: proxy: set nla fallback flag flag only if NLASecurity is enabled 2019-07-16 16:20:06 +03:00
kubistika e9e1c5d748 server: proxy: naming refactor 2019-07-16 16:20:06 +03:00
kubistika 70ca028453 server: proxy: remove unnecessary files 2019-07-16 16:12:12 +03:00
kubistika 1b4371ed22 server: proxy: use freerdp_settings_copy 2019-07-16 13:47:35 +02:00
kubistika ab00d90f03 server: proxy: implement NLA fallback 2019-07-15 11:52:30 +02:00
kubistika 02a65b8867 Declare support for multimon in proxy server.
It was broken in the DISP PR.
2019-07-08 11:09:29 +03:00
kubistika 8954e1646b server/proxy: Add check after calling p_client_context_create 2019-06-26 14:25:07 +02:00
kubistika 8fbee28dd7 server/proxy: Logging and comments improvements 2019-06-26 14:25:07 +02:00
kubistika fb3f7f3908 server/proxy: pf_update: Update ps->settings in DesktopResize 2019-06-26 14:25:07 +02:00
kubistika 74a66f6651 server/proxy: set ps->thread to NULL on disconnect
freerdp_abort_connect calls the proxy's client stop function,
that closes the thread handle. if it already closed by the server,
a segfault will occur because CloseHandle will try to access free()'ed
memory.
2019-06-26 14:25:07 +02:00
kubistika 8a115f2020 server/proxy: Refactor pdata_set_connection_info
Connection info must be set after the proxy's client connection
established, because if the client didn't provide credentials in .rdp
file, we don't know its username yet.
2019-06-26 14:25:07 +02:00
kubistika 98973dd0da server/proxy: pf_filters: Update filter_free to accept NULL 2019-06-26 14:25:07 +02:00
kubistika f795fc2670 server/proxy: Fix race-condition
The client's `ClientStop` callback wasn't set, therefore calling
freerdp_client_stop wasn't really blocking until it has stopped, and a
race condition occured. Fixed by registring to `ClientStop` callback and
waiting for the client thread to finish.
2019-06-26 14:25:07 +02:00
kubistika 255fab201a server/proxy: Fix rdpgfx and events leak 2019-06-26 14:25:07 +02:00
kubistika c0cece1064 server/proxy: Fix double-call to disconnect 2019-06-26 14:25:07 +02:00
David Fort 2da425aa03
Merge pull request #5424 from kubistika/rdpgfx
rdpgfx: CacheImportOffer implementation
2019-06-13 11:35:15 +02:00
David Fort 1f128b6142
Merge pull request #5423 from kubistika/feat/bitmap-auto-flag-calculate
rdpUpdate: add autoBitmapDataCalculate
2019-06-12 21:15:59 +02:00
Kobi d9366df448 RDPEDISP server side implementation (#5414)
* libfreerdp: Add RDPEDISP server implementation

* server/proxy: Add RDPEDISP support
2019-06-11 16:13:42 +02:00
kubistika 896ba119d1 server/proxy: Proxy CacheImportOffer & QoeFrameAck 2019-06-06 07:53:34 +03:00
kubistika c8b38fb66e server/proxy: Fix bitmap update crash when target is win7 2019-06-04 17:33:48 +03:00
David Fort 5d1fc68629
Merge pull request #5405 from m4ntis/proxy/filters-api
Proxy: Filters API
2019-06-03 15:45:24 +02:00
kubistika 6224109a1d server/proxy: Add multimon support 2019-06-03 14:33:15 +03:00
kubistika cd135ceacb libfreerdp/core: Export monitor layout PDU
* Move update notification related functions to new display.c: Not
related to `rdp.c`.
    * Rename `rdp_write_monitor_layout_pdu` to `display_write_monitor_layout_pdu`.
* Add internal `display_convert_rdp_monitor_to_monitor_def` instead of
doing the conversion inside `display_write_monitor_layout_pdu`.
2019-06-03 14:30:17 +03:00
kubistika 340d877cce server/proxy: Proxy pointer updates
* Moved update callbacks of client to pf_update.h
2019-05-29 10:06:18 +03:00
kubistika 72952c679f fix vs2010 errors 2019-05-28 09:30:39 +03:00
kubistika 52e4baa949 server/proxy: Code refactor 2019-05-28 09:30:38 +03:00
kubistika aa262d341d server/proxy: Use winpr library in proxy/filters 2019-05-26 15:32:49 +03:00
kubistika 7477ac19a7 server/proxy: Fix free invalid memory when pf_server_parse_target_from_routing_token fails 2019-05-26 10:48:10 +03:00
kubistika 76012fb5d6 server/proxy: Fix mem leak in pf_server_parse_target_from_routing_token 2019-05-26 10:48:10 +03:00
kubistika 20e503421e server/proxy: Remove unnecessary wrap for connection info 2019-05-26 10:48:10 +03:00
kubistika 2126024321 server/proxy: Add docs in filters_api.h 2019-05-26 10:48:10 +03:00
kubistika 8e642c9d00 server/proxy: Add return statement in demo_filter.c 2019-05-26 10:48:10 +03:00
kubistika 98f698cf2b Add README for filters API 2019-05-26 10:48:10 +03:00
kubistika 7237624b37 bugfix: segfault when calling an event which is not implemented by filter 2019-05-26 10:48:10 +03:00
kubistika 96616bb18c server/proxy: Use new parse_string_array_from_str implementation (using ArrayList) 2019-05-26 10:48:10 +03:00
kubistika 3a750810f7 server/proxy: Refactor pf_server.c 2019-05-26 10:48:10 +03:00
kubistika c4d72c6ad2 server/proxy: Refactor pf_server_parse_target_from_routing_token 2019-05-26 10:48:10 +03:00
kubistika a39658fc2a server/proxy: Add external filters support 2019-05-26 10:48:10 +03:00
kubistika 6bb5a1d579 server/proxy: Proxy errors back to client 2019-05-19 14:42:27 +03:00
Mati Shabtay b907324009 First version of an RDP proxy (#5372)
* server: Add proxy dir with barebones server

* sever/proxy: Remove licensing

* server/proxy: Add client files

* server/proxy: rm binary

* server/proxy: Formatting

* server/proxy: Fixed includes and added basic client creation functionality

* server/proxy: Remove licensing and fix ifndef

* proxy/server: Fix cmake indentation

* server/proxy: Fix licensing

* server/proxy: Forward connection on peer_post_connect

* server/proxy: Fix function signature

* server/proxy: Changed function signature of proxy_client_start

* server/proxy: Now peer_post_connect calls proxy_client_start in a new thread

* pfreerdp.c: Clean up useless comments and logs

* server/proxy: Fix license

* server/proxy: Remove all non-connection related data from proxy_context

* server/proxy: Move Log Tag definition to pf_log.h

* server/proxy: Move context definition to pf_context

* server/proxy: Delete pfreerdp.h

* pfreerdp.c: Move context callbacks to pf_context.c

* server/proxy: Update CMakeLists.txt

* pf_channels: Use new proxy context API

* pf_client: Move context to pf_context

* pf_client.c: Remove unnessecary event handling

* server/proxy: Formatting

* proxy/server: Move server logic to pf_server.c

* server/proxy: Handle client disconnection

* Merge stash

* pf_server.c: Open GFX Connection to client

* server: CMakeLists: build proxy along with other servers

* server: proxy: get target server from rdpNego->RoutingToken

Iv'e omitted a check from  which im not sure is right. Should check in docs

* server/proxy: Handle remote server -> client disconnection

* server/proxy: Move common function  to pf_common.c

* server/proxy: Move common function  to pf_common.c

* rdpgfx.h: Add reference to freerdp.h for rdpContext

* pf_channels: Pipe GFX on channel connection

* server/proxy: Add pf_rdpgfx for proxy gfx callbacks

* pf_client: Declare dynvc and gfx capabilities on connection

* server/proxy: Add graphics callbacks

* server/proxy: Add graphics callbacks

* pf_server: Listen to channel events

* Pass user settings to server

* pf_server: Proxy mouse events

* fixup! server/proxy: Add graphics callbacks

* pf_client: Fix setting initialization

* Merge feat/proxy-gfx to feat/proxy

* pf_server: Fix double freed credentials

* server/proxy: Remove unnecessary call to freerdp_client_settings_parse_command_line

* server/proxy: Refactor re-activation code

* server/proxy: Run format scripts

* server/proxy: Fix segfault when post_disconnect return FALSE

* server/proxy: Refactor proxy_settings_mirror

* server/proxy: Redirect credentials

* server/proxy: move proxy_settings_mirror to pf_common.c

* server/proxy: Redirect desktop_resize event

* pf_client: Remove interactive CLI auth methods

* fixup! server/proxy: Redirect credentials

* server/proxy: Rename proxy_mirror_settings to pf_common_copy_settings

* pf_server.c: Fixed non-freed context

When the disconnection is forced by the target server, the function
`pf_server_handle_client_disconnection` isn't called. Therefore, the
context of the connection between the proxy to tagrget isn't freed.

* fixup! pf_server.c: Fixed non-freed context

* pf_client: Prefix all client methods with pf_client

* pf_context: Add init client to proxy context method

* pf_server: Confirm all GFX caps regardless of settings

* pf_server: Prefix all methods with pf_server

* pf_server: Move variable decleration to start of method

* pf_server: Fix client setting

* pf_server: Fix GFX init method

* pf_server: Move variable decleration to start of methods

* server/proxy: Formatting

* Merge feat/proxy

* pf_server: Proxy synchronize event

* pf_server: Proxy refresh rect update events

* pf_server: Proxy suppress output messages

* server/proxy: Fix licensing

* server/proxy: Move client input callbacks to pf_input

* server/proxy: Move client update callbacks to pf_update

* server/proxy: Fix non-terminated target host string

* Feat/proxy config (#2)

* server/proxy: Add config loading support

* server/proxy: Add config file

* server/proxy: Format code

* server/proxy: Code refactor, rename update_register_callbacks and input_register_callbacks

* server/proxy: Update config file

* server/proxy: Remove config.ini from root directory

* Remove comment from config file

* server/proxy: Fix leak in pf_server_load_config

* server/proxy: Add rdpServerProxy struct and embed it in proxyContext

* server/proxy: Load configuration and pass it inside every proxyContext instance

* server/proxy: Move rdpProxyServer to proxy.h

* server/proxy: Use configuration while proxying input events

* server/proxy: Update CMakeLists

* server/proxy: Refactor pf_input.c

* server/proxy: Add AllowedChannels, DeniedChannels in configuration

* server/proxy: Remove unnecessary variable from parse_channels_from_str

* server/proxy: Update config file

* server/proxy: config: Rename  to

* server/proxy: config: Add mode - blacklist/whitelist

* server/proxy: Refactor, fix NULL deref

* server/proxy: Add license to proxy.h

* server/proxy: Fix newline in pf_config.c

* server/proxy: config: Rename Mode to WhitelistMode

* Add target in config. Add checks for configuration validity (#3)

* Add target in config. Add checks for configuration validity

* Update config file

* libfreerdp: nego: revert commented out check of routingToken length

* pf_server: Fix target host info from RoutingToken

* pf_server: Remove hardcoded lenght of routing token prefix

* Feat/refactor context (#8)

* Refactor main structs

* Update CMakeLists.txt

* pf_server.c: Free pdata at the end of the connection

* Run format scripts

* Rename tf to pc

* Fix licenses

* pf_server: Refactor names of structs and functions

* proxy: gfx: sync caps (#4)

* proxy: gfx: sync caps

* proxy: gfx: sync caps, hook gfx client's OnClose() call and close server resources

* fixup! Feat/refactor context (#8)

* fixup! fixup! Feat/refactor context (#8)

* rdpgfx/client: Fix rdpgfx_recv_caps_confirm_pdu caps set length parsing

* Run format scripts

* proxy config.ini: Change default port to 3389

* pf_rdpgfx: Limit caps version to freerdp's supported versions

* Gfx OnOpen() wait for dynvc ready (#10)

* proxy/gfx: Wait for dynvc ready state before open

* pf_channels: Initialize pc->gfx

* pf_rdpgfx: Add log and fix comments

* rdpgfx: Fix GFX v10.6 PDUs parsing and naming according to the spec

* pf_rdpgfx: Proxy rdpgfx v10.6 PDUs

* gfx client: Publish FrameAck sending and add auto ack flag

* proxy/gfx: Forward frame ack messages

* pf_context: Forward domain on connection

* pf_rdpgfx: Change max supported caps to 10.6

* proxy: Update config

* server/proxy: Use configuration in pf_server_handle_client

* rdpgfx/client: Fix size of surface_to_scaled_window, surface_to_window

* pf_rdpgfx: Fix formatting

* pf_server.c: Fix comments

* Move pf_server_rdpgfx_init to pf_rdpgfx

* server/proxy/CMakeLists.txt: Fix formatting

* pf_client.c: Add comment in proxy_server_reactivate

* Fixed const correctness of gfx function pointer

Signed-off-by: Mati Shabtay <matishabtay@gmail.com>

* server: proxy: update copyright

* server: proxy: wrap rdpNego and add a getter for routing token

* Refactor routing token getter (#14)

* Refactor routing token getter

* pf_server_parse_target_from_routing_token change routing_token_length to be DWORD

* libfreerdp/core/nego.c: Run format script

* pf_server: Run format script

* server/proxy: Fix os msbuild tests

* pf_channels.c: Remove unused channels

* pf_client: Remove unused callbacks

* proxy: Remove encomsp callbacks from proxy's client

* client/rdpgfx_main.c: Fix msbuild test

* pf_config.c: Use StrSep instead of strsep for Windows builds

* Removed nego struct from direct access.

Signed-off-by: Mati Shabtay <matishabtay@gmail.com>

* proxy: Rename binary to freerdp-proxy

* rdpgfx_main.c: Revert unwanted double change to send_supported_caps

* Cleaned up proxy server code.

* All internal functions static
* Added simple command line argument to supply a config file
* Silence compiler warnings

Signed-off-by: kubistika <kmizrachi18@gmail.com>
2019-05-17 14:32:54 +02:00
Armin Novak 93bf375686 Refactored settings getter/setter to stay compatible. 2019-05-08 14:35:25 +02:00
Armin Novak d7ca2db62e Fixed doulbe semicolon in C files. 2019-05-08 12:58:01 +02:00
Armin Novak 7b2608a938 Added gfx capability filter option.
With this new option it is possible to selectively disable certain
GFX capability versions. This way buggy behaviour can be addressed
at runtime.
2019-05-08 11:43:22 +02:00
Armin Novak 3b7e46fb0e Updated GFX to 10.6 spec 2019-05-07 12:10:13 +02:00
Armin Novak 841cb70f91 Fixed const correctness of gfx function pointer
Signed-off-by: Mati Shabtay <matishabtay@gmail.com>
2019-05-05 16:17:15 +03:00
Armin Novak 27d2a9e040 Fixed unused argument warnings. 2019-04-05 09:14:35 +02:00
Armin Novak e76b5d442b Silenced unused parameter warnings, added log messages. 2019-04-05 09:14:35 +02:00
Armin Novak 8b5ef6f41f Silenced unused parameter warnings, added log messages. 2019-04-05 09:14:35 +02:00
Armin Novak f4de82c242 Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak e8c8e7b6d0 Updated EGFX support to 10.6 2019-02-27 16:36:15 +01:00
Armin Novak 53b018bfef Fix callback function return types. 2018-12-04 09:34:22 +01:00
Armin Novak edd6d49f23 Fix #4909: Do not initialize HOME environment variable as it is no longer used.
GetKnownPath does not require this environment variable to be
available for windows builds.
2018-11-29 13:44:21 +01:00
Armin Novak c8908c8be6 Updated windows shadow server assistance usage. 2018-11-22 11:11:31 +01:00
Armin Novak 26b83ea74e Reenabled and fixed windows server compile. 2018-11-15 09:01:53 +01:00
Armin Novak 02f68c35b9 Fixed -Wextra sign warnings 2018-10-24 13:25:31 +02:00
Armin Novak 88d310ff2c Fixed compiler warnings (casts, ...) 2018-10-18 09:09:30 +02:00
Armin Novak e319ec5bd3 Fixed missing return in server_rdpsnd_get_formats 2018-10-17 16:17:41 +02:00
Armin Novak 7e1589a3e4 Added default rdpsnd formats. 2018-09-26 12:49:52 +02:00
Armin Novak c60ab7d068 fixed stuff 2018-09-26 12:49:52 +02:00
Armin Novak 2cf0662559 Unified format support for rdpsnd. 2018-09-26 12:49:52 +02:00
Armin Novak 40dae15cff Moved server-common to public header. 2018-09-26 12:49:09 +02:00
Armin Novak d56efaae8b Fixed server format selection. 2018-09-26 12:49:09 +02:00
Armin Novak 16531e1437 Fixed server audin callback, provide more information. 2018-09-26 12:49:09 +02:00
Armin Novak 5aa4b702c0 Fixed dst_format 2018-09-26 12:49:09 +02:00
Armin Novak 12f1cf9e35 Fixed default format. 2018-09-26 12:49:09 +02:00
Armin Novak 0560832b5f Using common audio formats for input. 2018-09-26 12:49:09 +02:00
Armin Novak db2a0dbdc0 Unified format selection. 2018-09-26 12:49:09 +02:00
Armin Novak 5e14bb1b11 Mac fixes 2018-09-26 12:49:09 +02:00
Armin Novak e61219eb58 Fixed mac callbacks. 2018-09-26 12:49:09 +02:00
Armin Novak d513f184e9 Fixed shadow server callbacks. 2018-09-26 12:49:09 +02:00
Armin Novak 18f97d03e7 Cleaned up defaults. 2018-09-26 12:49:09 +02:00
Armin Novak 106dde9571 Working mic redirection for shadow server. 2018-09-26 12:49:09 +02:00
Armin Novak 28efbbc01f Refactored audio_format* functions. 2018-09-26 12:49:09 +02:00
Armin Novak dab5770fed Added microphone support to shadow server. 2018-09-25 11:14:10 +02:00
Armin Novak fad20be6e6 Fixed missing includes. 2018-08-27 14:34:42 +02:00
Armin Novak 62c1696d4c Removed use of unchecked sprintf 2018-08-27 14:34:42 +02:00
Armin Novak c3a26b0d6a Removed +async-transport options
The async transport option is broken by design.
If used the main loop is called from the transport thread and the
main thread of the application.
Unless the transport layer is refactored to just work on queues
(input and output) this option will never work, therefore remove it.
2018-08-22 13:56:37 +02:00
Armin Novak cc44119dcf Fixed missing array initializer values 2018-08-01 12:56:18 +02:00
Armin Novak 31f933bc11 Fixed mac server compile issue. 2018-08-01 10:04:00 +02:00
Martin Fleisz a0fddd1747
Merge pull request #4530 from akallabeth/order_refactor
[leak fixes] Refactored order updates
2018-07-04 14:21:36 +02:00
Armin Novak 73b8963d14 Added automatic format support filter. 2018-07-02 16:33:50 +02:00
Armin Novak 30283e18e5 Fixed warning. 2018-07-02 16:20:39 +02:00
Pascal J. Bourguignon 15f2bafeab Cleaned up const char** -> char** for argv, since we definitely do modify the argv!
(we overwrite the password and pin arguments).
This implies changes in the argument parsing tests that now must pass a mutable argv
(copied from the statically declared test argvs).
Some other const inconsistency have been dealt with too.
2018-06-06 16:43:09 +02:00
David Fort 456b0e8934
Merge pull request #4453 from akallabeth/sound_channel_refactor
Sound channel refactoring
2018-05-03 11:56:58 +02:00
Kyle Evans a7c0632bf2 Use SetFreeRDPCMakeInstallDir where CMake modules are installed 2018-05-02 10:36:52 -05:00
Armin Novak 4e66972616 Fixed remaining global order buffers. 2018-05-02 08:54:21 +02:00
Armin Novak 3f712cab70 Fixed formatting of changed files. 2018-04-05 13:14:16 +02:00
Armin Novak f89c1857b9 Rewrite of sound and microphone channels
The sound and microphone redirection channels (and in part TSMF)
did not properly decouple encoding/decoding from the backends used
to play/record sound.
Encapsulating encoding/decoding in rewritten freerdp_dsp_* functions
with variable backends, simplifying alsa/oss/pulse/... audio backends.
2018-04-05 13:14:16 +02:00
Armin Novak d249335708 Removed winpr_exit
As the cleanup functions are called by atexit a dedicated
cleanup call is no longer required.
2018-04-03 12:56:33 +02:00
Armin Novak 1c72127c6b Do not clear invalid region if no client connected. 2018-03-07 15:37:20 +01:00
Armin Novak 2ad5b3510d Fixed windows shadow server update copy. 2018-03-07 15:37:20 +01:00
Armin Novak 44eebbb6e0 Fixed compiler warnings. 2018-03-07 14:47:06 +01:00
Armin Novak 2517755d25 Fixed thread function return and parameters. 2018-03-07 14:36:55 +01:00
Armin Novak 1f7d33a2f2 Fixed read/write of surface bits command.
The optional field exBitmapDataHeader of TS_ BITMAP_DATA_EX was ignored.
Read and expose the data (currently unused)
2018-03-01 11:38:59 +01:00
Martin Fleisz 5d1ff02d02
Merge pull request #4414 from akallabeth/pthread_cleanup_fix
Pthread cleanup fix
2018-02-15 11:02:37 +01:00
Armin Novak 990b8c23a9 Fixed PubSub function pointer casts. 2018-02-14 11:00:52 +01:00
Armin Novak 2d58e96dcc Exit main thread with winpr_exit to trigger resource cleanup.
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
2018-02-12 10:33:02 +01:00
Armin Novak bb061cedb1 Increased target bitrate for shadow server.
The target bitrate (1Mbit) was much too small for proper shadowing
on devices with higher resolutions. Increased to 10Mbit to improve
image quality.
2018-02-02 13:59:08 +01:00
Armin Novak 5f439f06b1 Fixed AVC444v2 detection. 2018-02-02 10:39:33 +01:00
Armin Novak 3b70d1178b Added AVC444 chroma support to shadow server. 2018-02-02 10:39:33 +01:00
Armin Novak 7305828122 Fix #4239: Various memory leaks
* Fixed all tests, now can be run with -DWITH_ADDRESS_SANITIZER=ON compiled.
* Enabled address sanitizer for nightly builds.
2017-12-12 11:40:48 +01:00
David Fort 3b670703fb
Merge pull request #4277 from akallabeth/mac_server
Mac fixes
2017-12-12 10:40:14 +01:00
Armin Novak 877f161465 Reset errno in X11 monitor enumeration
XOpenDisplay may succeed but set errno,
reset at the end of the function.
2017-11-29 14:17:27 +01:00
Armin Novak 33271415fe Fixed /monitors argument checks. 2017-11-29 14:13:50 +01:00
Armin Novak 57958cb178 Fixed #3810: Renamed color functions 2017-11-24 13:21:43 +01:00
Armin Novak 8eaba5b002 Fixed mac server compilation. 2017-11-24 13:21:43 +01:00
Brent Collins e21f9e359b Initialize SSL directly in the sample server, instead of relying on the SSL initialize logic
in the tls code as it was removed in a previous patch due to its redundancy.
2017-11-17 12:43:07 +01:00
Armin Novak 4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Sri Ramanujam 66c925c9e4 Fix libavcodec encoding errors and set tunables. 2017-11-09 11:39:54 -05:00
David Fort 504b771686
Merge pull request #4053 from akallabeth/ffmpeg_encoder
Implemented FFMPEG based encoder.
2017-11-06 11:25:48 +01:00
Mike Gabriel dc075fb133 Fix warning in man pages
"warning: can't find macro file `www.tmac))'""`"
2017-08-03 08:41:50 +02:00
Armin Novak 8a0cec946b Added AVC420 in AVC444 shadow encoding 2017-08-02 09:42:04 +02:00
Armin Novak 8b9e3fa51e Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
Armin Novak 0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
Armin Novak 1d724e1343 Add 10.3 capability check. 2017-07-17 11:37:53 +02:00
Armin Novak 5764d5a78a Disable GFX H264 if no backend compiled in. 2017-07-17 09:25:21 +02:00