FreeRDP/libfreerdp/core
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
..
gateway Fixed review remarks. 2019-04-05 09:14:35 +02:00
test Updated settings getter/setter for RemoteApplicationSupportMask 2019-05-09 14:24:58 +02:00
activation.c Yield in connection wait loops to reduce processor use. 2019-01-18 13:03:36 +01:00
activation.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
autodetect.c Fixed stream release for transport_write 2018-10-17 14:55:55 +02:00
autodetect.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
bulk.c Fixed dead store warnings 2019-04-05 09:14:35 +02:00
bulk.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
capabilities.c Updated RAILS implementation 2019-05-08 17:25:15 +02:00
capabilities.h Updated RAILS implementation 2019-05-08 17:25:15 +02:00
certificate.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
certificate.h Fixes argument size type, function static where appropriate. 2018-01-19 09:15:26 +01:00
channels.c Fixed stream release for transport_write 2018-10-17 14:55:55 +02:00
channels.h Fix #4752: Provide message free function for channel queue. 2018-07-18 15:31:07 +02:00
client.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
client.h Fixed windows build warnings. 2018-11-15 09:01:53 +01:00
CMakeLists.txt Unified initialization of OrderSupport 2018-11-23 10:11:50 +01:00
codecs.c Deactivated all H264 related code paths. 2017-07-17 10:39:08 +02:00
connection.c Fixed dead store warnings 2019-04-05 09:14:35 +02:00
connection.h Made internal functions static to help compiler optimize. 2018-07-10 12:21:38 +02:00
errbase.c Removed unused define. 2015-03-19 14:17:48 +01:00
errconnect.c Added no or missing credentail error. 2018-07-05 16:12:52 +02:00
errinfo.c Updated error info from spec. 2018-12-05 10:55:06 +01:00
errinfo.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
fastpath.c Unified update->BeginPaint and update->EndPaint 2019-04-11 15:33:23 +02:00
fastpath.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
freerdp.c First version of an RDP proxy (#5372) 2019-05-17 14:32:54 +02:00
gcc.c Fixed sign-compare warning 2019-01-30 18:05:49 +01:00
gcc.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
graphics.c bitmap free now always deallocating all resources. 2018-02-13 10:18:43 +01:00
graphics.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
heartbeat.c fix string format specifiers 2016-12-16 13:48:43 +01:00
heartbeat.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
info.c Updated RAILS implementation 2019-05-08 17:25:15 +02:00
info.h rdp: add a callback for ServerStatusInfo 2019-01-29 10:33:06 +01:00
input.c Fixed unicode key down and up messages. 2019-04-05 09:14:35 +02:00
input.h Fixed capability checks for mouse and unicode input. 2017-07-31 12:30:35 +02:00
license.c FreeRDP#5329 if using OldLicenseBehaviour, don't try to save the Cal since we're not going to try to load it (#5330) 2019-04-08 09:42:02 +02:00
license.h license: implement server-side management 2019-01-21 09:57:15 +01:00
listener.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
listener.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
mcs.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
mcs.h Replace cryptic names; move the disconnect ultimatum reasons enum into public API and rename; remove setter 2018-09-19 09:36:39 -05:00
message.c Updated RAILS implementation 2019-05-08 17:25:15 +02:00
message.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
metrics.c Fixed leaks, NULL dereferences and broken init. 2015-06-23 21:29:21 +02:00
multitransport.c Fixes for malloc / calloc + other fixes 2015-06-22 19:21:47 +02:00
multitransport.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
nego.c First version of an RDP proxy (#5372) 2019-05-17 14:32:54 +02:00
nego.h First version of an RDP proxy (#5372) 2019-05-17 14:32:54 +02:00
nla.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
nla.h Exposing NLA functions to impersonate and revert context. 2019-03-08 10:10:43 +01:00
orders.c Fixed zero sized allocation. 2018-11-29 12:11:33 +01:00
orders.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
peer.c Refactored settings getter/setter to stay compatible. 2019-05-08 14:35:25 +02:00
peer.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
proxy.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
proxy.h proxy: cleanup SOCKS support and add user/password support 2018-05-02 10:51:16 +02:00
rdp.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
rdp.h Fixed stream release for transport_write 2018-10-17 14:55:55 +02:00
redirection.c Hide redirection implementation details. 2018-12-05 10:55:06 +01:00
redirection.h Hide redirection implementation details. 2018-12-05 10:55:06 +01:00
security.c core: Fix array overrunning during FIPS keys generation 2017-12-19 10:29:16 +01:00
security.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
server.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
server.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
settings.c Updated RAILS implementation 2019-05-08 17:25:15 +02:00
settings.h Unified initialization of OrderSupport 2018-11-23 10:11:50 +01:00
surface.c Fixed memory leak in update_recv_surfcmd_surface_bits 2018-10-22 14:41:59 +02:00
surface.h Fixed read/write of surface bits command. 2018-03-01 11:38:59 +01:00
tcp.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
tcp.h Unified dns resolving of host 2018-09-27 16:08:28 +02:00
timezone.c Scanbuild warning, argument checks and leak fixes. 2017-03-02 18:13:43 +01:00
timezone.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
tpdu.c Fix users of Stream_GetPosition() that returns size_t 2017-12-11 22:38:58 +01:00
tpdu.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
tpkt.c Fix TALOS issues 2017-07-20 09:28:47 +02:00
tpkt.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
transport.c Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
transport.h Removed +async-transport options 2018-08-22 13:56:37 +02:00
update.c Fixed window order cleanup for NOTIFY_ICON_STATE_ORDER 2019-05-09 13:24:22 +02:00
update.h Unified update->BeginPaint and update->EndPaint 2019-04-11 15:33:23 +02:00
window.c Fixed window order cleanup for NOTIFY_ICON_STATE_ORDER 2019-05-09 13:24:22 +02:00
window.h Fixed window order cleanup for NOTIFY_ICON_STATE_ORDER 2019-05-09 13:24:22 +02:00