Commit Graph

2473 Commits

Author SHA1 Message Date
Simon Nivault
82b58325a3 Add switch to declare printer as default or not 2022-09-20 13:25:05 +02:00
garbb
940317282c remember participantId for use with assistance set control request 2022-09-19 09:41:45 +02:00
Armin Novak
707b9348ee Unify encomsp request control code 2022-09-13 09:22:41 +02:00
David Fort
942273e9cb
tls: add an option to dump tls secrets for wireshark decoding (#8120)
This new option /tls-secret-file:<file> allows to dump TLS secrets in a file with
the SSLKEYLOGFILE format. So this way you can setup the TLS dissector of wireshark
(Pre-Master-Secret log filename) and see the traffic in clear in wireshark.
It also add some more PFS ciphers to remove for netmon captures.
2022-08-16 10:40:32 +02:00
akallabeth
bf56a39e6f
Fixed #8090: Duplicate definition of strndup (#8102)
* Fixed #8090: Duplicate definition of strndup

* Moved strndup detection to winpr

Co-authored-by: Armin Novak <anovak@thincast.com>
2022-08-02 09:15:38 +02:00
David Fort
3478051f15 dynamic channels: mutualize things for listeners and plugins
The same code is copied in all dynamic channels to create a plugin, have a listener,
and manage the channel lifecycle. This patch does a mutualization effort so that channels
only have to code things that are specific to them.
2022-07-07 12:21:23 +00:00
Pascal Nowack
35d6f19d60 freerdp/peer: Add APIs to get OS major and minor type strings 2022-07-07 07:45:26 +00:00
David Véron
a3712521a8 TLS version control
* added settings for minimal and maximal TLS versions supported
* refactorisation of the force TLSv1.2 setting
2022-07-07 07:13:11 +00:00
Armin Novak
3bedc1f92e Fixed swscale and cairo checks 2022-07-06 13:09:46 +00: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
c71cc672f9 Decouple ffmpeg video encoder/decoder support from WITH_FFMPEG
It may be diesirable to only use FFMPEG for audio. Allow disabling
video decoding by introducing a new variable responsible for that.
2022-07-05 18:17:28 +02:00
akallabeth
9a2a37786e Refactored clipboard structs 2022-07-04 14:31:08 +02:00
David Fort
cbda255dcd winpr: add some ASN1 parsing functions
This patch implements ASN1 parsing in WinPR, as we need it in SSPI packages.
2022-07-01 07:51:31 +02:00
akallabeth
3f301ee6d5 Fixed copyright headers and stream length 2022-06-30 13:42:19 +02:00
akallabeth
40d142a566 Merged camera-device.h with existing rdpecam.h 2022-06-30 12:28:22 +02:00
akallabeth
4d3003b154 Renamed server channel to rdpei 2022-06-30 12:28:22 +02:00
akallabeth
5707ec3266 Fixed reserved symbol use in struct name 2022-06-30 12:28:22 +02:00
Pascal Nowack
78fc60802c server: Add channel handling for camera device and enumerator channel 2022-06-30 12:28:22 +02:00
Pascal Nowack
11351978a0 channels/server: Fix channel name in license comments 2022-06-30 12:28:22 +02:00
Pascal Nowack
3ae0d64729 constants: Add missing OS major type constants 2022-06-29 14:56:45 +02:00
akallabeth
8ecf841e71 Added RAIL compartmentinfo server to client message 2022-06-29 14:42:05 +02:00
akallabeth
7faf18d9dd Updated flags required by [MS-RDPERP] 2022-06-29 11:41:45 +02:00
akallabeth
ea0035b474 Added new rail orders textscaleinfo and caretblinkrate 2022-06-29 11:41:45 +02:00
Armin Novak
40ae6731c9 Fixed issues with settings clone 2022-06-27 14:27:12 +02:00
Armin Novak
ada4671435 Cleaned up client rdpgfx
* use rdpContext for setup
* add WINPR_ASSERT
* Removed duplicated rdpSettings variables
2022-06-27 11:06:27 +02:00
akallabeth
9613bd9bc6 Added function ReachedState to peer
This callback exposes the state the RDP peer has reached.
2022-06-23 14:19:50 +02:00
akallabeth
40723606e4 Exposed WTSVirtualChannelManagerOpen 2022-06-23 14:19:50 +02:00
akallabeth
c698f7e7d9 Expose client rdpsnd get context function 2022-06-23 14:19:50 +02:00
akallabeth
31304951de Regenerated settings helpers 2022-06-23 09:18:37 +02:00
Siva Gudivada
7ce4d8b196 add a new flag to enforce tls1.2 2022-06-23 09:18:37 +02:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
5b163b7918 Add GetRdpContext function pointer for dynamic channels 2022-06-23 07:45:55 +02:00
akallabeth
7c01af04fb Fixed missing C++ guards 2022-06-23 07:45:55 +02:00
akallabeth
650a275ceb Added new client callback LoadChannels and freerdp_client_load_channels
Split channel loading from PreConnect as it might be necessary to
reinitialize channels on redirect
2022-06-23 07:45:55 +02:00
akallabeth
968d4d8f8a Exposed freerdp_get_current_addin_provider 2022-06-23 07:45:55 +02:00
akallabeth
03e20cb541 Clean up pcap capture module 2022-06-23 07:45:55 +02:00
Armin Novak
66e73f8b08 Fixed missing static for functions, fixed declaration of FreeRDPAreColorFormatsEqualNoAlpha 2022-06-21 10:28:34 +02:00
fifthdegree
c51348a33b fixes 2022-06-21 10:27:17 +02:00
fifthdegree
e66b99f8dc deprecate old hash callback field 2022-06-21 10:27:17 +02:00
fifthdegree
6d3aa52496 set SAM file and hash callback on credential rather than context 2022-06-21 10:27:17 +02:00
fifthdegree
eeece1a027 server-side kerberos (and some fixes) 2022-06-21 10:27:17 +02:00
akallabeth
f44554e16d
Added proxy module callbacks for session init and started (#7976) 2022-06-20 13:02:25 +02:00
akallabeth
44582f821b Added utility module for string functions 2022-06-17 08:41:46 +02:00
David Fort
aff8fdac26 proxy: correctly handle dynamic channel fragmentation
This big patch fixes fragmentation handling in the dynamic channel. We used to
have a single state to handle fragmentation at the main dynamic channel level, but
in fact packets can be fragmented per sub channel. So we have to maintain a fragmentation
state per sub channel, this involve treating dynamic and static channels differentely
(so the size of the patch that has to implement state tracking per dynamic channels).
2022-06-17 08:38:57 +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
e389210673 client channels: mutualize common types between dynamic channels
Most dynamic channels share the same copied and pasted code for the XXX_CHANNEL_CALLBACK
and XXX_LISTENER_CALLBACK types. This patch introduce GENERIC_CHANNEL_CALLBACK and
GENERIC_LISTENER_CALLBACK that fits for most channels and discard custom type definitions.
2022-06-15 14:04:58 +02:00
akallabeth
c2b394c528 Invert RDPGFX_CAPVERSION_106_ERR and RDPGFX_CAPVERSION_106 values
Define the actual value as RDPGFX_CAPVERSION_106 and the wrongly
documented one as RDPGFX_CAPVERSION_106_ERR
2022-06-09 14:03:36 +02:00
Marc-André Moreau
161617c4a4 Implement RDP persistent bitmap cache 2022-06-08 23:37:06 +02:00
Pascal Nowack
9d627e0df2 channels/server: Add APIs for DVCs to get notified of channel id
This allows server implementations to watch these channel ids for their
creation statuses.
2022-06-08 15:26:51 +02:00
Pascal Nowack
dacc1e1c0f server: Add channel handling for telemetry channel 2022-06-08 09:30:30 +02:00
Pascal Nowack
3337810520 server/rdpsnd: Add API to get notified of channel id 2022-06-08 09:30:30 +02:00
Pascal Nowack
bc111b04d3 core/server: Add APIs to get notified of DVC creation statuses
This allows server implementations to add handling for situations,
where the client side does not support them.
Particularly useful for the audio output channels (static channel as
fallback, when dynamic channel is not supported).
2022-06-08 09:30:30 +02:00
akallabeth
b69499c060 Improve ABI compatibility 2022-06-03 08:48:46 +02:00
Pascal Nowack
902727df5e rdpsnd: Enhance server implementation
The current server sided channel handling of RDPSND/AUDIO_PLAYBACK_DVC
is currently very constrained.
So, solve this. This means:

- Add the missing Training/Training Confirm PDUs
- Stop overriding the average bytes per second values, when submitting
  the audio formats, as this currently makes the usage of codecs
  impossible
- Add a way to send the server formats manually again, to be able to
  restart the protocol after a Close PDU was sent
- Add a way to send already encoded audio data to let server
  implementations to take care of the encoding process and to set
  custom audio timestamps for the Video Optimized Remoting channel
- Add public attributes to let server implementations know the initial
  volume and pitch values
- Add public attribute to let server implementations know the quality
  mode setting
2022-06-03 08:48:46 +02:00
Richard Dymond
e1610a7524 Add WTSChannelGetOptions 2022-06-02 14:12:12 +02:00
Marc-André Moreau
1d5c0be5ec Add settings to load a custom SSPI shared library module 2022-06-01 15:16:12 +02:00
David Fort
094cc7ca77 utils: add implementation of POD(primitive object data) arrays
This allows to have simple array of primitive types with basic utility functions.
2022-05-30 14:05:41 +02:00
akallabeth
46ccf6d0d7
Fixed RDPGFX_CAPVERSION_106 according to errata (#7924)
The [MS-RDPEGFX] spec is not really sure which value to use, so we
just announce both, the one from the spec and the one from errata.
2022-05-25 13:11:29 +02:00
Armin Novak
40f5578206 Add GFX 10.7 capsets 2022-05-24 10:08:53 +02:00
Armin Novak
226a20025a Updated RDPGFX_CAPSET_VERSION106 code to conform to spec 2022-05-24 10:08:53 +02:00
David Fort
77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
akallabeth
97c05cbec5 Added freerdp_disconnect_before_reconnect_context 2022-05-05 14:14:45 +02:00
akallabeth
104157ed6b Added new API freerdp_abort_event 2022-05-05 14:14:45 +02:00
akallabeth
7bb1bc08c2
Settings getter (#7870)
* Added settings key helper tests

* Added test for freerdp_settings_set_value_for_name

* Added freerdp_device_equal and tests for freerdp_device_*
2022-05-02 14:20:12 +02:00
akallabeth
860f44f762 CMake check_include and struct cleanup
Move to WinPR what should be there.
2022-04-29 14:27:44 +02:00
akallabeth
5e259d13b1 Added C++ guards to header 2022-04-29 11:58:10 +02:00
akallabeth
eb95f00991 Move H264 subsystem variable to header 2022-04-28 13:25:27 +02:00
akallabeth
cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +02:00
akallabeth
bba427e71a No longer export ncrush, xcrush and mppc codecs 2022-04-28 11:24:29 +02:00
Armin Novak
83bb37d174 Fixed decoder arguments, use const correct ones 2022-04-28 09:17:41 +02:00
akallabeth
d68327ad74 Fixed const correctness of pPointer_Set
Pointer might need to be modified
2022-04-28 09:17:20 +02:00
akallabeth
fb90ac280a Refactored color.h
* Remove implementations from header
* Rename functions to be FreeRDP specific
* Add deprecation define for old names
* Fixed missing includes
2022-04-28 08:40:47 +02:00
Armin Novak
08035be41b Added missing WINPR_API 2022-04-25 16:06:34 +02:00
Armin Novak
1f9916eba2 Added settings comparison function 2022-04-22 10:20:09 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +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
akallabeth
752ac3b479
Fix #7793: Do not expose internal input API (#7794)
* Fixed GetFileInformationByHandle initializers

* Fix #7793: Do not expose internal input API

Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU

* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
Adrian Vollmer
a19de01fe3 Applied requested changes
* Add `proxy_utils.h`
* Move `proxy_parse_uri()` back to `proxy.c`
* Copy function `value_to_int` to `proxy.c`
* Remove memory leak (`uri_copy`)
2022-04-05 09:22:48 +02:00
Adrian Vollmer
28923ddd75 Fixed parsing of https_proxy environment variable
A proxy URI was parsed both in the function `proxy_read_environment()` in
`libfreerdp/core/proxy.c` and in the function
`freerdp_client_settings_parse_command_line_arguments()` in
`client/common/cmdline.c`. But only the latter was taking into account
that the URI can contain a user and password, which made it impossible
to use a proxy with authentication by just using an environment
variable like `https_proxy`.

The function `proxy_parse_uri()` in `libfreerdp/core/proxy.c` was
clearly not parsing the optional username and password.

This commit moves the code from `client/common/cmdline.c` to
`libfreerdp/common/settings.c` into a function `proxy_parse_uri()` so
redundant code is avoided. This function is then called in both
instances where a proxy URI is parsed.

Some minor adjustment were made to the code, so the `WLog_INFO()`
statement at the end works in both cases, where credentials were either
provided or not. Also, some error messages were added or clarified.

If the parsing of the environment variable fails, we ignore it entirely
(with a warning) and proceed.
2022-04-05 09:22:48 +02:00
akallabeth
1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
Pascal Nowack
5b5582c9d5 freerdp/constants: Conform osMinorType values to documentation
The OSMINORTYPE_NATIVE_WAYLAND value does not officially exist in
[MS-RDPBCGR].
Its value also is the one for Windows RT.

Fix this situation, by introducing the os minor type
OSMINORTYPE_WINDOWS_RT with its correct value and by choosing a
different value for OSMINORTYPE_NATIVE_WAYLAND, as that value does not
exist officially.
2022-03-29 10:30:12 +02:00
akallabeth
102e43baaa Added functions to set transport io user context 2022-03-28 15:52:32 +02:00
akallabeth
f7b6d3be73 Add peer SetState function to manually set state
Expose internal state machine manipulation to allow skipping parts
of a peer connection state
2022-03-28 15:52:32 +02:00
Armin Novak
c6924cb126 Moved clipboard utils to core library, fixes #6760 2022-03-28 14:59:30 +02:00
akallabeth
14568872a9
Instance cleanup (#7738)
* Cleaned up freerdp::autodetect

* Deprecate freerdp::input

* Deprecated freerdp::update

* Deprecated freerdp::settings

* Deprecated freerdp::autodetect

* Removed rdpTransport::settings

* Deprecated freerdp_per::update|settings|autodetect

* Fixed mac client and server compilation

* Fixed windows compilation

* Added deprecation warnings

* Fixed initialization of structs.

* Fixed android build

* Fixed freerdp_client_context_new const correctness

* Fixed checks for android implementation

Replaced checks with assertions where appropriate

* Fixed checks for windows client

Replaced checks with assertions where appropriate

* Fixed proxy client pointer dereference
2022-03-23 13:18:35 +01:00
Kazuki Oikawa
98f9aedd62 Supports 10bit X11 color (BGRX32 only) 2022-03-20 10:05:18 +01:00
akallabeth
704289ffee
Smartcard tls logon fix (#7709)
* Early return authenticate if TLS smartcard logon

* Removed obsolete SmartcardPin and unified AuthenticateEx calls

* Remove password-is-pin from command line

The setting is implied by smartcard-logon and only of interest in
server side code, so the setting is useless

* Rework AUTH_SMARTCARD_PIN

Just prompt for PIN and not user/domain if this is requested.

* Fixed a memory leak in nla.c

* Align credentail prompt

* Handle AUTH_NLA & smartcard, just ask for PIN

* Added assertions, removed duplicate password prompt check

* Move smartcard logon after credential prompt
2022-03-09 09:09:53 +01:00
Armin Novak
71aac852d6 Remove async-input from clients 2022-03-08 15:37:19 +01:00
David Fort
6a3b5573ad drdynvc: add missing messages definitions 2022-03-07 14:30:52 +01:00
Armin Novak
46e0adda93 Removed HAVE_CONFIG_H uses 2022-03-03 11:26:48 +01:00
Armin Novak
52ea527f78 Added missing includes 2022-03-03 11:26:48 +01:00
Armin Novak
a11d13580a Fixed type naming issue 2022-03-03 11:26:48 +01:00
Armin Novak
d1f8c00f7b Fixed duplicated symbols 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
7b65677b65 Improved command line help printing 2022-02-24 14:48:46 +01:00
Armin Novak
150674f341 Moved headers to appropriate places 2022-02-24 08:52:25 +01:00
David Fort
0435b5a65d Implement smartcard logon 2022-02-24 08:52:25 +01:00
Armin Novak
b3790d7454 Removed Smartcard files from settings
* Removed file names from settings
* Added temporary file creation for pkinit
2022-02-24 08:52:25 +01:00
Armin Novak
649527ef8d Fixed const correctness of freerdp_smartcard_list 2022-02-24 08:52:25 +01:00
Armin Novak
b46d74806e Removed FreeRDP_ListSmartcards setting
* Directly print smartcard list without intermediate setting
* Centralize the help text, clients do not need to add extra code
2022-02-24 08:52:25 +01:00
David Fort
cb351a099d Enable smartcard NLA logon 2022-02-24 08:52:25 +01:00
David Fort
62ac25ef54 smartcard_emu: enable to specify the smartcard pin 2022-02-24 08:52:25 +01:00
David Fort
d545ab66e1 tscredential: generate automatically the file from a parser 2022-02-24 08:52:25 +01:00
Armin Novak
538b34c51d Moved rail application start to client common 2022-02-22 16:43:21 +01:00
Armin Novak
3bb36f4caa Fixed clang-scanbuild warnings 2022-02-22 16:15:05 +01:00
Armin Novak
0c7e6c3c2d Refactored disp channel
* Assert all input parameters
* Use DISP_CHANNEL_NAME define for channel name
2022-02-22 11:29:56 +01:00
akallabeth
c5f7f9fba8 Add option for external thread to ainput server channel 2022-02-22 09:44:13 +01:00
Armin Novak
f03059e718 Extended AINPUT API:
* Each event now has a timestamp
* Relative and absolute events are sent simultaneously
* Added a flag indicating relative events are available
2022-02-22 09:44:13 +01:00
akallabeth
ae49581673 Added missing include for ainput server channel 2022-02-22 09:44:13 +01:00
akallabeth
de81f54076 Add relative mouse input and no channel support 2022-02-22 09:44:13 +01:00
akallabeth
66338e4c1f Added reserved elements to rdpClientContext
This is necessary to provide a stable ABI for future extensions.
(this struct is used as extension of rdpContext)
2022-02-22 09:44:13 +01:00
akallabeth
4d3157c9cc Added common client mouse event functions 2022-02-22 09:44:13 +01:00
akallabeth
4ca5078027 Added common client channel handling 2022-02-22 09:44:13 +01:00
akallabeth
cdbfff87ea Unified client stop 2022-02-22 09:44:13 +01:00
akallabeth
7641710f60 Use a client/common context component
* Allows moving common client code from specific client to a
  generic client/common implementation
2022-02-22 09:44:13 +01:00
Armin Novak
fb8eb7251e Added relative mouse setting 2022-02-22 09:44:13 +01:00
akallabeth
f45e515fcd Added Advanced Input Channel 2022-02-22 09:44:13 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
David Fort
46eb50df2c proxy: improve channel treatment
This PR introduces per channel context so that we can speed up operations like
retrieving the channel name from its id, or knowing what shall be done for a
packet (no config ACL recomputation at each packet).
2022-02-04 08:44:22 +00:00
Armin Novak
10e40147fb Fixed various const warnings 2022-02-01 10:25:37 +00:00
Armin Novak
c51224e923 Fixed const warnings for codec decompress routines 2022-01-31 16:25:56 +01:00
Armin Novak
b9cfa10513 Fixed some more warnings 2022-01-31 15:55:10 +01:00
Armin Novak
c220367843 Replaced reserved name identifier 2022-01-31 15:55:10 +01:00
Armin Novak
50d6f1457c Fixed missing brace 2022-01-31 14:58:41 +01:00
dance
122268aec1 code cleanup: don't allocate excessive memory in update_read_bitmap_update
removed no more actually used count property of BITMAP_UPDATE struct,
fixed allocating twice as memory for its rectangles - as of refactoring
at e5767f07 BITMAP_UPDATE struct is reused no more
2022-01-27 10:52:02 +01:00
Armin Novak
9c7ec3888a Added deprecation to *get_fds functions 2022-01-21 08:59:09 +01:00
akallabeth
724c6f8192
Proxy cleanups (#7568)
* Fixed C++ issues with proxy context

* Added freerdp_settings_get_string_writable

* Define WITH_PROXY_EMULATE_SMARTCARD in config.h
2022-01-20 11:12:36 +01:00
akallabeth
e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
Armin Novak
1fedd36f65 Fixed proxy compilation issues after rdpUpdate refactoring 2022-01-18 11:24:23 +01:00
Armin Novak
0b3d5351e1 Removed internal members of rdpSecondaryUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
504336f796 Removed internal members of rdpPrimaryUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
3006c973c4 Removed internal members of rdpAltSecUpdate from API header 2022-01-18 11:24:23 +01:00
Armin Novak
6973c5dce2 Removed internal members of rdpInput from API header 2022-01-18 11:24:23 +01:00
Armin Novak
d210ac5e33 Removed internal members of rdpUpdate from API header 2022-01-18 11:24:23 +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
Armin Novak
3c72cc3306 Refactored rdpdr and dependent channels
* Move parsing code to core library
* Move definitions to public API to allow access from outside
* Move smartcard related parsing to core library
2022-01-11 12:34:43 +01:00
akallabeth
8c543b1de2 Added smartcard emulation layer 2022-01-11 12:34:43 +01:00
Armin Novak
3cc4a255d6 Fixed #7515: Builds with -DWITH_PROFILER=ON
PROFILER_RENAME macro did lack trailing semicolon
2022-01-10 09:33:10 +01:00
Armin Novak
fd5ac4eed0 Cleaned up wnd.h includes 2021-12-23 14:27:12 +01:00
Armin Novak
0fb83a304d Adjusted channelID and server SetVolume data types 2021-12-20 08:11:00 +01:00
Armin Novak
f3df9a520e Fixed H264 related warnings 2021-12-20 08:11:00 +01:00
akallabeth
feb6d9ae5c
Set last error on activation timeout (#7502) 2021-12-17 17:28:41 +01:00
Armin Novak
d248b635a5 Added Redirect callback 2021-12-15 14:38:13 +01:00
Armin Novak
b545094664 Cleaned up redirection code 2021-12-15 14:38:13 +01:00
Armin Novak
223da39eac Updated RDPDR version checks 2021-12-14 13:46:34 +01:00
akallabeth
b008e83179 Fixed API const correctness 2021-12-01 10:28:53 +01:00
Armin Novak
67f632982a Fixed YUV decoder API
Need to verify widht and height more rigorously.
2021-11-15 09:23:00 +01:00
Steve Pronovost
78fd3b8d6c Code review feedback from FreeRDP folks
Before rolling into path for easy review.
2021-10-21 13:11:21 +02:00
Steve Pronovost
bb7e4f220b Add support for graphics redirection protocol
Add support for new graphics redirection protocol (aka VAIL) used by
WSLg. This protocol is currently being documented and the official
documentation will be posted in the near future.
2021-10-21 13:11:21 +02:00
Steve Pronovost
f6f4acc921 Added support for AUDIO_PLAYBACK_DVC
Support audio on dynamic channel. Please refer to MS-RDPEA.
2021-10-21 13:11:21 +02:00
Steve Pronovost
c5e4fc71bc Update header with missing flag
Added definition for TS_RAIL_CLIENTSTATUS_GET_APPID_RESPONSE_EX_SUPPORTED.
2021-10-21 13:11:21 +02:00
Steve Pronovost
49d9e61884 Fix protocol violation when uploading large ICON
When uploading large ICON (96x96), we end up growing the stream
mid-update. Stream_EnsureCapacity end up reallocating the stream
with a larger capacity to accomodate the large ICON size, but in
doing so, also updating the sealed length for the data currently in
the stream. This breaks the assumption between update_begin_paint
and update_end_paint where the sealed lenght is used to keep track
of the location where we need to update the orders counts after
we're done accumulating update. As a result of the growth and lost
of that location, the number of orders is written to the wrong
location and the resulting stream is invalid which result in a
protocol violation and a connection drop.

The current fix uses a new offsetOrder in the update object to
keep track of where update_end_paint needs to write the number
of orders contained. I think a better fix would be for
Stream_EnsureCapacity to preserve the sealead length of the
stream on growth, but this has a much more significant impact and
careful analysis needs to be done to ensure this doesn't violate
other assumption. Need to follow up with FreeRDP developer to get
their take on this one.
2021-10-21 13:11:21 +02:00
Armin Novak
41d77cae46 Fixed /video buffer alignment, added assertions 2021-10-18 10:53:05 +02: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
Armin Novak
f8bf4b0009 Fixed const correctness of command line functions 2021-10-14 13:04:59 +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
1ca7e1f7a0 Added option to disable graphics decoding in client code path 2021-09-20 10:59:59 +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
akallabeth
4d23bc9372
Added proxy input state sync (#7282)
The proxy server component might receive input related events
before the proxy client has established the connection to the
target machine.
With this change, the current keyboard state is cached and sent
to the target when it is ready. All input events received before
the target is ready are discarded.
2021-09-10 10:39:07 +02:00
akallabeth
1904020d7f
Some code cleanups and WINPR_ASSERT (#7281) 2021-09-10 09:06:35 +02:00
Armin Novak
0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak
ba0da04217 Fixed compilation warnings and duplicate defines 2021-09-09 08:53:20 +02:00
Armin Novak
f794a8c7d4 Cleaned up remdesk 2021-09-09 08:53:20 +02:00
Armin Novak
b336751861 Fixed AuthenticateEx issues 2021-09-09 08:53:20 +02:00
Armin Novak
85f1d46eab Fixed cache issues
* Use rdpContext as reference instance
* WINPR_ASSERT what is not otherwise checked
2021-09-09 08:53:20 +02:00
akallabeth
3409f8d3b0 Transport add getter, add checks
* Added transport_get_context to get rdpContext in IO callbacks.
* Added WINPR_ASSERT where possible.
* Fixed handle count mismatch in transport_get_event_handles
2021-09-09 08:53:20 +02:00
Armin Novak
c9effaa6e8 Fixed missing NULL checks in proxy logger macro 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
4e44003832 Expose dynamic channel PDU types 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
akallabeth
c2f1562a4b Removed freerdp_peer::input 2021-09-09 08:36:01 +02:00
akallabeth
c2a7a78d94 Changed transport IO functions to take rdpContext 2021-09-06 10:11:14 +02:00
akallabeth
32b3f54bb3 Expose CONNECTION_STATE via public API
* Expose type CONNECTION_STATE
* Add getter freerdp_get_state
* Add helper freerdp_state_string
2021-09-06 10:11:14 +02:00
akallabeth
595a40a1e0 Transport add getter, add checks
* Added transport_get_context to get rdpContext in IO callbacks.
* Added WINPR_ASSERT where possible.
* Fixed handle count mismatch in transport_get_event_handles
2021-09-06 10:11:14 +02:00
Armin Novak
50e9d3adf9 Implemented new AuthenticateEx callbacks. 2021-09-04 18:01:30 +02:00
Armin Novak
737f5a2036 Fixed argument const correctness 2021-08-27 13:21:02 +02:00
akallabeth
f1bde376b1
Raw channel send (#7255)
* Added raw channel data write function

* Use nego_set_state

* Added ArrayList_ForEachAP

* Provide va_copy for older VS compilers
2021-08-26 16:17:51 +02:00
Armin Novak
68f24477f6 Fixed compilation warnings on mac 2021-08-26 15:08:28 +02:00
Armin Novak
13f54fc0dd Improved fingerprint hash comparison
* Allow new hash format 11bbccdd along already supported 11:22:aa:BB
2021-08-26 09:38:12 +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
akallabeth
617293e0d3
Cleanups (#7239)
* Use freerdp_settings_* for shadow and sample server

* Added freerdp_peer_set_local_and_hostname

* Code cleanups and WINPR_ASSERT

* Code cleanups

* Use CHANNEL_NAME_LEN where appropriate
* Use temporary variables in loop instead of direct array access
2021-08-24 14:09:40 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Simon Nivault
e42696bb2e
Some fixes for audin redirection (#7231)
* Fixed research for native PCM format

* Fixed compatibility detection for resampling

* dsp: Makes channel mix and encoding process use separated buffers

* Give FramesPerPacket to freerdp_dsp_context_reset function

* dsp: Fix DVI_ADPCM codec by respecting the required packet size

* Forbid mono channel in macos

* Fix audin command line channel option

* Disable ADPCM codec as it does not work

* Refactor valid native codec research

* Native codec research: Try different channels number

* Fix dsp channel mix

* Fix dsp resample
2021-08-23 14:49:28 +02:00
akallabeth
a7cdd03809
Fixed check of orderLength for secondary orders (#7233)
The orderLength field of [MS-RDPEGDI] 2.2.2.2.1.2.1.1 might be
negative if not adjusted for the 13byes of the header.
2021-08-23 12:08:35 +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
d65d4ee4fb Allow variable arguments to setChannelError 2021-07-29 15:09:53 +02:00
akallabeth
2ac12c558a Added option to allow planar topdown encoding. 2021-07-02 09:53:24 +02:00
akallabeth
645cc8bb69 Use variable surfaceId 2021-07-02 09:53:24 +02:00
akallabeth
6deb65175f Added GFX planar and rfx encoder to shadow 2021-07-01 11:56:17 +02:00
Armin Novak
a7f7de549a Added SuspendInput setting
Allows to disable all keyboard/mouse/multitouch input from the
client side.
2021-06-28 14:35:26 +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
ea78e33d17 server: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
Armin Novak
8f7b3258ef Fixed compilation warnings 2021-06-16 14:26:06 +02:00
Armin Novak
d7f3ce0acd Added callback deprecation attribute 2021-06-16 14:26:06 +02:00
Armin Novak
2a91afb0cf Added adjustable tcp connect timeout 2021-06-08 08:21:47 +02:00
Biswapriyo Nath
4c9754b269 Read from QuadPart from LARGE_INTEGER variables. 2021-05-31 13:38:19 +02:00
Biswapriyo Nath
c0c9eb5908 Check MINGW32 for duplicate type declaration. 2021-05-25 09:41:44 +02:00
Armin Novak
268bc2e8ef Updated RDPEI channel API
* Added new function pointers to cancel a pending operation
* Added new function pointers to send custom event flags
* Added exposed feature mask to disable channel features
2021-05-20 15:20:18 +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
d4ebf8546f Cleaned up crypto API 2021-05-11 08:00: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
384f997aa7 Removed support for obsolete known_hosts file. 2021-05-11 08:00:18 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
Armin Novak
8cd61a01ff Refactored shadow argument parsing
* Remove global struct
* Add logger options
2021-04-16 17:06:27 +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
sss
4a2514b58d
reverted olf signature for rfx_context_new 2021-03-30 11:03:15 +03:00
sss
6b76ac9545 Revert "Revert "allow to use in single threaded mode" (#6864)"
This reverts commit f7465af44f.
2021-03-26 11:50:45 +01:00
Armin Novak
5fc2290c03 Added option to disable gateway websocket support 2021-03-08 14:33:05 +01:00
akallabeth
f7465af44f
Revert "allow to use in single threaded mode" (#6864)
This reverts commit bee2e1526d.
2021-03-05 13:02:38 +01:00
akallabeth
f346793970 Refactored encoder functions to return changed areas 2021-03-01 11:52:07 +01:00
akallabeth
50acf72615 Refactored H264 encoding/decoding
Use YUV primitives now for all H264 operations
2021-03-01 11:52:07 +01:00
akallabeth
c67e4df96b Added getter/setter for settings 2021-03-01 11:03:52 +01:00
akallabeth
6c6e31217d Ignore alpha channel during color conversion.
Most GFX graphics do not carry alpha data. Keep the original
alpha value unless specified otherwise.
2021-02-25 14:18:01 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
Martin Fleisz
89347d85a1 Fix some incorrect keyboard mappings on Mac 2021-02-16 15:42:27 +01:00
Armin Novak
f9c2d5bab9 Added ConnectionStateChangeEvent for clients
Clients can now subscribe to connection state change events to
prevend data from being transmitted on sessions being redirected.
2021-02-11 10:41:28 +01:00
Armin Novak
65647d5763 Use separate codec contexts for legacy and GFX 2021-02-10 10:38:24 +01: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
Martin Fleisz
79fb38da84 core: Remove connection type manipulation in gcc_write_client_core_data
Removes the changes to connection type in gcc_write_client_core_data and
adds some checks if network detection is enabled when receiving network
detection requests.
2021-02-04 10:43:51 +01:00
Vic Lee
a1566574a3 progressive: fix multiple regions in one gfx frame. 2021-02-04 09:16:23 +01:00
akallabeth
dfec6228e4 Added OrderInfo callback for primary, seconardy and altsec orders
This allows gathering statistics about which orders have been
received
2021-01-26 20:00:23 +01:00
akallabeth
f3dad4106a Fixed support for huge files in clipboard 2021-01-25 08:43:46 +01:00
Martin Fleisz
bd7b43a7d0
Merge pull request #6723 from akallabeth/color_fidelity_fix
Color fidelity fix
2021-01-19 14:14:47 +01:00
jackyzy823
d537988f28 x11: add support for remote to local clipboard file copy 2021-01-18 19:13:56 +01:00
Armin Novak
6a2ae388f8 Added settings dump function 2021-01-18 18:46:04 +01:00
Martin Fleisz
68dfa353b8 locale: Fix keyboard detection on MacOS 2021-01-18 16:53:02 +01:00
Armin Novak
87e89bc719 Fixed pcap capture function const correctness 2021-01-18 09:41:13 +01:00
Armin Novak
8187ab7732 Fix ColorFidelity use 2021-01-18 09:41:13 +01:00
akallabeth
e3445eefab Fixed progressive decoding without subbanddiff 2020-12-15 14:47:05 +01:00
akallabeth
25a8abc4eb Cleaned up rfx API 2020-12-14 17:44:30 +01:00
akallabeth
0c96c3a71c Moved clipboard hasHugeFileSupport to end of struct 2020-12-04 14:09:28 +01:00
akallabeth
4d1a7cf5fa Renamed RDPEI flags due to problems with windows headers 2020-11-30 13:54:33 +01:00
Armin Novak
d493cf6f07 Cleaned up rdpei channel, updated to current spec. 2020-11-23 10:29:47 +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
Armin Novak
d7bf6553c5 Added option to remap scancodes 2020-10-29 18:44:32 +01:00
Martin Fleisz
cec261c4db Cleanup internal channel management
This PR gets rid of some unneeded/unused field and functions in the
channel handling code. It also makes it possible to call
VirtualChannelWrite from any thread like the Windows API allows. The
only restriction is that the channel must be initialized
(VirtualChannelInit) from the same thread that called freerdp_connect.
2020-10-29 15:53:32 +01:00
kubistika
437bfeb588 include: rdpgfx: add extern C for public API 2020-10-06 13:22:17 +03:00
Kobi Mizrachi
e0fa47f3b3 server: add WTSVirtualChannelManagerCheckFileDescriptorEx API 2020-10-06 13:17:38 +03:00
akallabeth
f282c55c7a Added clipboard CB_HUGE_FILE_SUPPORT_ENABLED flag 2020-09-29 09:03:49 +02:00
kubistika
508ba9201f core: server: add API to get peer accepted channel names 2020-09-21 14:16:22 +03:00
akallabeth
1546a8b655 Fixed naming of FILEDESCRIPTORW 2020-09-18 12:49:54 +02:00
Armin Novak
3b63903d3f Removed obsolete connectErrorCode 2020-09-16 10:21:15 +02:00
Alexandr
cf2daeb01d
cleanup of https://github.com/FreeRDP/FreeRDP/pull/6448 (#6455)
* Implemented switchable transport layer

Co-authored-by: akallabeth <akallabeth@posteo.net>
2020-09-02 13:37:04 +02:00
Armin Novak
75aab487e2 Added duplicate initialization check for plugins. 2020-08-10 16:17:44 +02:00