Commit Graph

831 Commits

Author SHA1 Message Date
Armin Novak
a0fa7307bd Removed unused variable 2021-12-20 08:11:00 +01:00
Armin Novak
7d80c74e97 Cleaned up RDPDR channel interhitance
* All channels inheriting from RDPDR_DRIVE base struct
* Add functions to create/free a new device of a type
* Fixed settings array resize code, prevent 0 sizes
2021-10-18 09:21:02 +02:00
akallabeth
c627e2196f Improved warning for removed legacy command line 2021-10-15 14:53:39 +02:00
Armin Novak
73fbbcf0fb Fixed const warnings 2021-10-14 13:04:59 +02:00
Armin Novak
9444dab58a Renamed global argument struct 2021-10-14 13:04:59 +02:00
Armin Novak
f8bf4b0009 Fixed const correctness of command line functions 2021-10-14 13:04:59 +02:00
Armin Novak
0816d32823 Fixed varialbe integer type warning 2021-10-14 13:04:59 +02:00
akallabeth
98977336fd
Drop legacy command line (#7348) 2021-10-14 08:25:46 +02:00
akallabeth
22484ee495 Fixed missing NULL check in mappedGeometryUnref 2021-10-14 08:21:15 +02:00
akallabeth
6c58e821dd
Do not write usbdevicestoredirect if the string is NULL (#7347) 2021-10-12 11:04:09 +02:00
akallabeth
6ac4cad8dd
Settings fixes (#7335)
* Fix temporary settings allocation for command line

Detection of legacy command line requires a temporary settings
struct. This was previously manyally allocated instead of using
freerdp_settings_new and freerdp_settings_free.

* Fixed CommandLineParseCommaSeparatedValuesEx

The name argument was not copied into the returned array.
2021-10-07 13:43:12 +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
e0a531f728
Channel fixes (#7309)
* Added missing CHANNEL_NAME defines.

* Fixed FreeRDP_ChannelDefArray setter

* Fixed code duplication due to merge error

* Added public function freerdp_channels_from_mcs

* Fixed const correctness in mcs
2021-09-22 14:27:21 +02:00
akallabeth
1c84690c2f
Fixes from tests (#7308)
* Fixed memory leak in tls_verify_certificate

* Fixed missing NULL checks

* Fixed missing checks for FreeRDP_DeactivateClientDecoding

* Added WINPR_ASSERT for client common new/free

* Added /disable-output switch to deactivate client decoding

Allows low resource remote connections that do not require visual
feedback. (e.g. load testing/...)
2021-09-21 09:56:56 +02:00
akallabeth
41aaafef77 Added unicode input for xfreerdp 2021-09-17 07:21:45 +02:00
akallabeth
70894c92e7 Added /kbd-scancode-list
Prints a listing of hexadecimal scancodes and the mapping to VK_*
2021-09-10 15:47:08 +02:00
Armin Novak
b336751861 Fixed AuthenticateEx issues 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
d3168a1436 Implemented #4341: Default to /network:auto
If no arguments are supplied, default to the behaviour of
/network:auto. This ensures the default experience is using the
best available graphics options.
As soon as any /network, /bpp, /rfx, /gfx, ... argument is used
only use these.
2021-09-04 18:01:30 +02:00
Armin Novak
413dcd3c28 Fixed RDPSND_CHANNEL_NAME
RDPSND channel is special, as it has many names.
(e.g. static channel, dynamic channel and UDP one.
Use RDPSND_CHANNEL_NAME to identify the module name instad of
RDPSND_DVC_CHANNEL_NAME
2021-08-25 13:40:47 +02:00
Armin Novak
054f0ea260 Use defines instad of channel names 2021-08-25 10:54:24 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak
b7d612d843 Remove variable shadowing 2021-08-02 10:28:06 +02:00
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
0fc21f51f5 Fixed #7200: /bpp parsing fixed 2021-07-29 18:29:16 +02:00
Armin Novak
7c14196000 Added log message for invalid DrivesToRedirect data 2021-07-29 15:09:53 +02:00
akallabeth
5a85a824d2 Used settings getter/setter for NSCodec 2021-07-01 11:56:17 +02:00
akallabeth
534d30beb3
No deprecated (#7107)
* Removed cmake options disabling compiler warnings

* Added deprecation compile options

* Fixed android client use of deprecated symbols

* Removed obsolete callback
2021-06-22 14:39:10 +02:00
Armin Novak
8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
akallabeth
b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak
390e329807 client: Fixed warnings 2021-06-18 11:32:16 +02:00
Armin Novak
5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak
1e714df24e Renamed macros to avoid windows issues 2021-06-16 11:46:42 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Martin Fleisz
be1a1dcbe0 client: Fix writing of untouched rdp settings to rdp files
Since the last change untouched string settings were written to the rdp
file because their default value was set to NULL instead of ~0. This
resulted in settings being written to the rdp file with a value of
"(null)" instead of just being skipped.
2021-06-02 12:57:31 +02:00
akallabeth
6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
Biswapriyo Nath
37bbf9d218 CMake: Install DLLs in bin folder.
In Win32 platform, executables and runtime libraries need to be in one folder.
2021-05-25 09:41:44 +02:00
Armin Novak
6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
Armin Novak
2b19576fc7 Fixed compiler warnings, function arguments and const parameter 2021-05-18 13:37:34 +02:00
akallabeth
566f47f63b Fixed compilation warnings. 2021-05-11 08:32:18 +02:00
akallabeth
b494a193db Refactored certificate API:
* Proper encapsulation
* known_hosts2 backend extended (storing PEM)
* New backend storing each host certificate in a file
2021-05-11 08:00:18 +02:00
akallabeth
ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
akallabeth
ef6e4c0570
ADDIN_ARGV cleanup, added camera setting to RDP parser (#6947)
* Added camerastoredirect to RDP parser

* Refactored ADDIN_ARGV handling

* Added ADDIN_ARGV unit tests
2021-04-12 10:38:40 +02:00
akallabeth
1d24cec7f0 Use specific names for drive hotplug special values 2021-03-09 13:58:28 +01:00
Armin Novak
5fc2290c03 Added option to disable gateway websocket support 2021-03-08 14:33:05 +01:00
Denis
b3a2042103 Add support for OpenBSD sndio 2021-03-08 13:11:50 +01:00
Fabio Fantoni
5c408e080e Minor typo fix
From debian packages patch done by Mike Gabriel
<mike.gabriel@das-netzwerkteam.de>
2021-02-14 18:35:42 +01:00
Marc-André Moreau
4e14e7d41e freerdp-client: don't enable vmconnect mode based on PCB field presence in .RDP file 2021-02-11 15:05:53 -05:00
Martin Fleisz
21158c0e8b
Merge pull request #6537 from akallabeth/kbd_remap
Added option to remap scancodes
2021-02-05 09:31:45 +01:00
Ondrej Holy
d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
akallabeth
c865c4eb64 Added support for file:// urls for rdp files 2020-12-23 12:29:37 +01:00
akallabeth
9b8d16b332 Allow autoreconnect for ERRINFO_GRAPHICS_SUBSYSTEM_FAILED
As discussed in #4717 allow autoreconnect to succeed if that
specific error code was returned as disconnection reason.
2020-11-27 09:10:41 +01:00
bolt
03ced3d8f0 Add support for -grab-mouse, to prevent the client from moving the user's pointer 2020-11-20 09:40:00 +01:00
Simon Tatham
1dc8198803 Command-line option to choose an X selection.
I personally find it more convenient to have pasted data written to
the X11 PRIMARY selection, so that I can paste it with a fast middle-
button click, than to write to CLIPBOARD which typically needs a key
sequence or menu action.

This commit adds a command-line option to let me express that
preference: now I can say "/clipboard:use-selection:PRIMARY" on the
command line, which not only enables clipboard transfer but also says
which X selection I want it to talk to. The previous options
"+clipboard" and "-clipboard" are also still supported.
2020-11-20 08:34:20 +01:00
akallabeth
f032be12d2 Fixed printf format 2020-11-17 08:53:42 +01:00
Martin Fleisz
f3591485bd client/common: Always set gatewayprofileusagemethod to 1
mstsc will only load our gateway settings if gatewayprofileusagemethod
is set to 1. Otherwise it will always set the option "Auto-detect RD
Gateway server settings" and ignore the other gateway settings in the
rdp file.
2020-11-13 11:44:19 +01:00
Martin Fleisz
60317154a3 client/common: Several fixes for the rdp file parser
This PR fixes various issues in the rdp file parser:
- NetworkAutoDetect was written inverted
- GatewayHostname was missing the port info (if not default)
- Several settings were left out when populating the file struct
2020-11-12 18:13:12 +01:00
Armin Novak
d7bf6553c5 Added option to remap scancodes 2020-10-29 18:44:32 +01:00
Martin Fleisz
0f70aa2f43
Merge pull request #6415 from akallabeth/proxy_settings_api
Use freerdp_settings_[s|g]et* api to access proxy vaiables.
2020-08-05 11:47:05 +02:00
akallabeth
44ea09e7ad Use freerdp_settings_[s|g]et* api to access proxy vaiables.
Fixes #6414
2020-08-05 11:29:00 +02:00
Martin Fleisz
d87d351c00 Add GatewayMessageType to public API 2020-08-04 15:58:48 +02:00
Martin Fleisz
3753f0ea9c Implement gateway message callback for Windows, Wayland and X11 clients 2020-08-04 15:58:48 +02:00
Bernhard Miklautz
1628939227 fix [client channels]: move exported API calls to client/common
The functions mappedGeometryRef and mappedGeometryUnref are API
functions ([1]) but were implemented in the geometry channel.
In case FreeRDP was built with BUILTIN_CHANNELS=OFF those functions
weren't available globally but used by the video channel.

Now the functions are fixed part of the freerdp-client library and
therefore available for all channels.

[1] exported in freerdp/client/geometry.h

Fixes #6236
2020-06-17 12:59:41 +02:00
Kobi
0cb7ada6de
Merge pull request #6208 from akallabeth/accept_cert_io
Read newline from stdio on certificate accept
2020-05-25 13:25:39 +03:00
akallabeth
81765e71f3 Fixed BehaviourSanitizer warning in rdp parser 2020-05-20 15:10:07 +02:00
akallabeth
5b842bc7a7 Read newline from stdio on certificate accept 2020-05-20 11:57:01 +02:00
akallabeth
7890833af8 Replaced strtok with strtok_s 2020-05-18 11:39:22 +02:00
Martin Fleisz
953fc03031
Merge pull request #6138 from akallabeth/rdp_file_message_fix
Fixed warning messages for RDP file options
2020-05-05 12:21:15 +02:00
akallabeth
5f5bf10703 Fixed warning messages for RDP file options
networkautodetect and bandwidthautodetect are both boolean options
which must match each other. Added adequate warnings.
2020-05-05 10:43:33 +02:00
David Fort
5b98aa7515
Merge pull request #6063 from akallabeth/expert_settings
Added expert settings /tune and /tune-list
2020-05-04 12:09:39 +02:00
Lukas Fink
060253c9fa Added ability to add usb devs via id and addr simultaneously
It is now possible to add usb devices both via vid+pid and via bus+addr
at the same time. To do this, the ids are directly
given to the corresponding command line options:
/usb🆔<vid+pids>,addr:<bus+addrs>
The dev option still works like before: /usb:id,dev:<vid+pids> or
/usb:addr,dev:<bus+addrs>
2020-04-26 19:09:13 +02:00
akallabeth
b094d52d0b Fixed #6099: Add a flag for legacy hash entries
If a legacy entry is found in certificate hash store print
additional information to the user informing about the change
with FreeRDP 2.0
2020-04-22 18:14:39 +02:00
akallabeth
0a86090ff1 Fix initialization of LargePointer flags
Capability exchange is first reading server capabilities,
mask these with local settings and send only what both support.
2020-04-22 11:10:56 +02:00
Armin Novak
58be47bc63 Added expert settings /tune and /tune-list 2020-04-21 17:30:24 +02:00
Martin Fleisz
9223eea61e
Merge pull request #5974 from akallabeth/cmd_avc420_fix
Cmd avc420 fix
2020-04-02 08:41:47 +02:00
Martin Fleisz
ca34fe4c12
Merge pull request #5985 from akallabeth/log_version_debug
Added buildconfig output to debug log level.
2020-03-26 09:55:46 +01:00
Martin Fleisz
43d3f89ce7
Merge pull request #5988 from akallabeth/rdp_parser_leak
Fixed memory leak in rdp file parser.
2020-03-24 12:17:05 +01:00
akallabeth
fdf151698d Fixed memory leak in rdp file parser. 2020-03-23 16:06:26 +01:00
akallabeth
453372a4bf Add option to adjust the tcp ack timeout
On high latency links the default of 9 second timeout might be too
strict. Adjusting this for all users will result in a long time
for connections to fail, so let these with high latency links
adjust the value manually.
2020-03-23 08:59:38 +01:00
akallabeth
82449a9c7d Added buildconfig output to debug log level. 2020-03-20 13:05:01 +01:00
akallabeth
efb588db04
Added deprecation warning to gfx-h264 2020-03-15 10:33:53 +01:00
akallabeth
1441e78b70
Fixed gfx-h264 option parsing. 2020-03-15 10:33:34 +01:00
Armin Novak
90bc3e793a Fixed missing config include. 2020-03-09 14:57:20 +01:00
Armin Novak
6ac1b6d78e Fixed strncmp, use _strnicmp 2020-03-06 11:37:35 +01:00
Armin Novak
316fb38e67 Added new option /cert that unifies all.
* The mess with /cert-tofu, /cert-ignore et al is now unified in
  a single option.
* Added the option to add fingerprint:<hash>:<hex string> multiple
  times to /cert to build a list of accepted certificate
  fingerprints
* Added a deprecation warning to older /cert-* options
2020-03-06 11:37:35 +01:00
Armin Novak
4eb4f58fbb Updated CMake channel detection
* Now both, dynamic and static channel entries can be defined by
  a single channel.
* Added better logging to distinguish between static and dynamic
  channel messages.
2020-02-28 12:53:39 +01:00
Martin Fleisz
da354feed0 Add dynamic channel part for rdpsnd channel 2020-02-28 12:53:39 +01:00
Armin Novak
829497b313 Made CHANNEL_TSMF optional and deprecated. 2020-02-26 13:56:43 +01:00
Ondrej Holy
3240485bfd Do not advertise /usb in help output if the channel is not built
The help output advertise an option and an example for usb redirection
regardless of the fact whether the urbdrc channel was built or not.
This is confusing for people. Let's do not show /usb in help if it is
not built.
2020-02-26 13:51:52 +01:00
Martin Fleisz
7ae8a158a0
Merge pull request #5707 from akallabeth/kbd_codepage
Added KeyboardCodePage option
2020-02-25 14:50:51 +01:00
Armin Novak
30275e7ac3 Added keyboard language codepages and listing option 2020-02-21 11:57:36 +01:00
Martin Fleisz
e304428a5f
Merge pull request #5857 from akallabeth/scanbuild_fixes
Scanbuild fixes
2020-02-12 10:16:54 +01:00
David Fort
245fc6014d
Merge pull request #5830 from akallabeth/smartcard_updates
Smartcard updates
2020-02-07 14:11:00 +01:00
Armin Novak
ddcc5ae768 Fixed copy of opaque data
do not use strcncpy for opaque data.
2020-01-23 10:12:12 +01:00
Armin Novak
5a51f97ce0 Added NULL checks to silence clang-scanbuild. 2020-01-23 10:12:12 +01:00
Armin Novak
2cb022a922 Fixed NULL dereference. 2020-01-23 10:12:12 +01:00
Martin Fleisz
baca062321 core: Fix and extend populate rdp file from settings
This PR contains the following changes:
- Get rid of unused SettingsModified array (kept in the settings struct for ABI
compatibility)
- Fix and extend freerdp_client_populate_rdp_file_form_settings (wrote <null> strings to the rdp file, missed a lot of settings)
- Set KeyboardHook default value to 2 (hook in fullscreen) just as mstsc
does
2020-01-22 14:18:30 +01:00
Kobi Mizrachi
8c5d96784d cmdline: export CommandLineParseCommaSeparatedValues 2020-01-22 14:18:21 +01:00
Martin Fleisz
263d74ee29
Merge pull request #5783 from akallabeth/gfx_mask_arg
Added /gfx and /gfx-h264 option mask=<value>
2020-01-16 10:02:15 +01:00