Commit Graph

56 Commits

Author SHA1 Message Date
Armin Novak
7212621eae [proxy,config] PEM length must contain '\0' 2023-05-08 22:54:53 +02:00
Armin Novak
fad46c4455 [server,proxy] add additional PEM headers
there are some more PEM formats in use, add the headers
2023-04-26 09:55:26 +02:00
Armin Novak
c1cd48cb3c [server,proxy] allow PEM in config file
CertificateContent and PrivateKeyContent now have two valid formats:
It can be in format PEM (multiple lines) or a single line base64 encoded
PEM.
The first format is preferrable in case the pf_config* API is used to
set the certificate/key,  the latter in case an actual config file is in
use where multiline configuration data can not be directly entered.
2023-04-24 10:57:22 +02:00
akallabeth
4d663682bc [server,proxy] ensure PEM length is strlen(pem) + 1
The decoded base64 data might contain PEM with/without/with multiple
'\0' at the end of the string. We do not want to drag this through our
code so ensure the length matches the string length including '\0'
2023-04-17 17:59:06 +02:00
akallabeth
48bbb08793 [server,proxy] remove too strict assert 2023-04-14 15:54:26 +02:00
akallabeth
c3f6b665cc [server,proxy] improve error message for invalid base64
If the certificate or private key are supplied as base64 encoded string
inform what happened before aborting.
2023-04-14 15:54:26 +02:00
David Fort
b8814e723a fix some warning with the use of new crypto functions 2023-02-28 07:59:40 +01:00
Armin Novak
a7dac52a42 [license] updated copyright headers 2023-02-12 20:17:11 +01:00
akallabeth
b869927407 [proxy,config] extract PEM from config file
* Read a PEM file if provided via config
* Base64 decode if the certificate/private key are provided in the
  config file
2023-02-12 20:17:11 +01:00
Armin Novak
641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
Armin Novak
5680a347d2 [server,proxy] fixed dump config elements 2022-12-22 15:09:03 +01:00
akallabeth
b56bef23dd [proxy] clean up config parser
* Use constant strings to identify sections, keys, bool, ...
2022-12-18 15:14:30 +01:00
Armin Novak
6a0df205b0 [proxy] add mouse ex and unicode event filters 2022-11-06 19:12:27 +01:00
Armin Novak
b672bda85e Removed RdpKeyFile and RdpKeyContent settings
They are a duplicate of PrivateKeyFile and PrivateKeyContent
2022-07-06 12:01:23 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
David Fort
cfe80694da proxy: add fixed user/domain/passwd
This adds a User, Domain and Password parameter in the Target section of the configuration
to specify and use a fixed backend user, domain or password (overriding the one
passed by the front user).
2022-06-15 14:05:45 +02:00
David Fort
63d0d3e4cf proxy: rework proxy channel treatments for statefull drdynvc
The rework introduce a stateful dynamic channel treatment, so that we can take early decisions
for data packet (dropping all the current packet or pass it), but also reassemble important
packets like channel creation.
2022-04-15 09:06:09 +02:00
Armin Novak
a403848e61 Fixed const/type warnings 2022-02-01 08:48:21 +01:00
Armin Novak
4e6e5be654 Added proxy intercept channels
* New configuration to intercept certain channels
* Added rdpdr intercept implementation
2022-01-11 12:34:43 +01:00
Alexandru Bagu
7f7bf2d731 Remove passthrough channel name limit 2021-10-05 09:40:53 +02:00
akallabeth
03a9ca80c8
Refactor proxy (#7312)
* Added hidden transport dump and replay options

* Added settings to enable transport dump and replay
* Added check in freerdp_connect to skip authentication on
  dump replay

* Fixed proxy issues

* Proper shutdown handling
* Uninitialized variables
* Skip proxy-client channels, initialize from peer channels and
  config
* Filter static channels like dynamic ones
* Added proxy module filtering from config data (channels, input, ...)

* Removed oboslete proxy decoding related files

* Added defines for RDPECAM channel

* Added proxy config options:

* VideoRedirection
* CameraRedirection

* Fixed duplicate channel free
2021-09-23 14:52:03 +02:00
akallabeth
695e38398d Refactored proxy
* Removed unnecessary global data lists
* Improved error handling
* Do not initialize channel code in passthrough mode
2021-09-20 10:59:59 +02:00
Armin Novak
680dc81bad Added dump option for proxy config. 2021-09-09 08:53:20 +02:00
Armin Novak
4463e5eda9 Added config dump function, improved resource cleanup 2021-09-09 08:53:20 +02:00
Armin Novak
0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
Armin Novak
f7c7211aad Fixed compilation warnings 2021-09-09 08:53:20 +02:00
Armin Novak
5a2231172c Updated copyright for proxy 2021-09-09 08:53:20 +02:00
Armin Novak
976c3c2ab9 Refactored proxy and proxy-modules:
* Split out proxy headers and moved to public API to allow external
  modules to be built.
* Split proxy into proxy library and proxy binary. The library
  can be used by other applications and provides a simple API
* Improved channel passthrough, now all channels including dynamic
  channels work.
* Extended module API to hook more events, improved module samples
* Cleaned up proxy code, removed global static variables used,
  added WINPR_ASSERT
2021-09-09 08:53:20 +02:00
Kobi Mizrachi
67cfcb0af6 server: proxy: implement external routing 2020-09-18 09:51:12 +02:00
Kobi Mizrachi
6e1581443b server: proxy: rename SessionCapture.Enabled -> GFXSettings.DecodeGFX 2020-06-22 12:37:53 +02:00
Kobi Mizrachi
215e41b4ee server: proxy: config: fix comma separated list parsing 2020-05-19 14:42:59 +03:00
Kobi Mizrachi
079871ac65 server: proxy: support static vc passthrough 2020-02-26 11:47:01 +01:00
Kobi Mizrachi
18be45eca1 server: proxy: specify which modules to load in config 2020-01-22 14:18:21 +01:00
Kobi Mizrachi
92c3f76809 server: proxy: disconnect all active sessions on shutdown 2020-01-21 12:08:39 +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
77ca7ac2ad server: proxy: make fallback to tls configurable 2020-01-08 07:58:03 +01:00
Mati Shabtay
97606edeee proxy: Implement RAIL support in proxy 2019-12-12 11:10:44 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
kubistika
160446e093 server: proxy: stop loading session captures config if it is disabled 2019-10-28 13:31:10 +01:00
kubistika
ab2b288f87 server: proxy: refactor config loader 2019-10-24 12:57:48 +02:00
kubistika
16d4d46da6 server: proxy: implement session capture feature 2019-10-24 12:19:31 +02:00
Armin Novak
59b4988f56 Fixed compilation warnings. 2019-10-16 14:54:05 +02:00
kubistika
32913850d5 server: proxy: separate client and server security settings 2019-09-30 10:07:43 +02:00
kubistika
53a92421b1 server: proxy: config: fix mem leak 2019-09-11 14:29:04 +03:00
kubistika
0b340b784c server: proxy: drop local unix socket listen option 2019-09-09 17:42:18 +03:00
kubistika
8cf8da3e41 server: proxy: config: remove duplicate declaration of config macros 2019-09-08 15:06:22 +03:00
kubistika
e135106731 server: proxy: rdpsnd support 2019-08-29 14:39:17 +02:00
kubistika
32fff644da server: proxy: improve modules api 2019-08-23 11:58:08 +02:00
kubistika
0ad87d98ca server: proxy: load proxy clipboard config 2019-08-19 09:30:40 +02:00