FreeRDP/libfreerdp/core
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
..
gateway Added function sspi_SetAuthIdentityW 2022-03-28 15:52:59 +02:00
test Smartcard tls logon fix (#7709) 2022-03-09 09:09:53 +01:00
activation.c Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
activation.h Implemented 2.2.1.17.1 Persistent Key List PDU Data, added checks 2020-11-20 09:39:25 +01:00
autodetect.c Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
autodetect.h Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
bulk.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
bulk.h Fixed const warnings for codec decompress routines 2022-01-31 16:25:56 +01:00
capabilities.c Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
capabilities.h Fixed tpkt header length checks. 2020-03-02 11:40:35 +01:00
certificate.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
certificate.h Added const to function arguments 2021-02-17 11:29:56 +01:00
channels.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
channels.h Raw channel send (#7255) 2021-08-26 16:17:51 +02:00
client.c Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
client.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
CMakeLists.txt Moved headers to appropriate places 2022-02-24 08:52:25 +01:00
codecs.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
connection.c Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
connection.h Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
credssp.asn1 tscredential: generate automatically the file from a parser 2022-02-24 08:52:25 +01:00
display.c Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
display.h Reformatted to new style 2019-11-07 10:53:54 +01:00
errbase.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
errconnect.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
errinfo.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
errinfo.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
fastpath.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
fastpath.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
freerdp.c Added functions to set transport io user context 2022-03-28 15:52:32 +02:00
gcc.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
gcc.h Added const to function arguments 2021-02-17 11:29:56 +01:00
graphics.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
graphics.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
heartbeat.c Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
heartbeat.h libfreerdp: core: add ServerHeartbeat callback 2020-07-07 09:57:53 +02:00
info.c Relaxed parser, fix a bug in LogonInfoV2 length 2022-03-31 16:15:27 +02:00
info.h Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
input.c Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
input.h Remove async-input from clients 2022-03-08 15:37:19 +01:00
license.c Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
license.h Reformatted to new style 2019-11-07 10:53:54 +01:00
listener.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
listener.h Reformatted to new style 2019-11-07 10:53:54 +01:00
mcs.c Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
mcs.h Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
message.c Remove async-input from clients 2022-03-08 15:37:19 +01:00
message.h Remove async-input from clients 2022-03-08 15:37:19 +01:00
metrics.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
multitransport.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
multitransport.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
nego.c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
nego.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
nla.c Added function sspi_SetAuthIdentityW 2022-03-28 15:52:59 +02:00
nla.h Nla server cleanup && server auth fix (#7743) 2022-03-25 10:47:05 +01:00
orders.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
orders.h Removed internal members of rdpAltSecUpdate from API header 2022-01-18 11:24:23 +01:00
peer.c Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
peer.h Reformatted to new style 2019-11-07 10:53:54 +01:00
proxy.c Fixed parsing of https_proxy environment variable 2022-04-05 09:22:48 +02:00
proxy.h Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
rdp.c Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
rdp.h Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
redirection.c Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
redirection.h Reformatted to new style 2019-11-07 10:53:54 +01:00
security.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
security.h Reformatted to new style 2019-11-07 10:53:54 +01:00
server.c Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
server.h Expose dynamic channel PDU types 2021-09-09 08:53:20 +02:00
settings.c Use GetComputerName instead of gethostname 2022-03-22 10:59:58 +01:00
settings.h Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
smartcardlogon.c Fixed use of rdpSettings, prefer getter/setter 2022-03-28 15:52:32 +02:00
streamdump.c Refactor proxy (#7312) 2021-09-23 14:52:03 +02:00
surface.c Workaround for [MS-RDPBCGR] 2.2.9.2.3 Frame Marker Command (TS_FRAME_MARKER) 2022-03-09 15:52:33 +01:00
surface.h Fix sending/receiving surface bits command. 2020-04-03 12:00:53 +02:00
tcp.c Fixed #7696: Abort freerdp_connect if manually canceled (#7700) 2022-03-07 13:47:43 +01:00
tcp.h Transport opaque 2021-09-09 08:36:01 +02:00
timezone.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
timezone.h Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
tpdu.c Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
tpdu.h Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
tpkt.c Improved logging, compiler warning fixes 2022-03-28 15:52:32 +02:00
tpkt.h Implemented 2.2.1.17.1 Persistent Key List PDU Data, added checks 2020-11-20 09:39:25 +01:00
transport.c Nla server cleanup && server auth fix (#7743) 2022-03-25 10:47:05 +01:00
transport.h Added deprecation to *get_fds functions 2022-01-21 08:59:09 +01:00
tscredentials.c tscredential: generate automatically the file from a parser 2022-02-24 08:52:25 +01:00
tscredentials.h tscredential: generate automatically the file from a parser 2022-02-24 08:52:25 +01:00
update.c Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
update.h Fixed proxy compilation issues after rdpUpdate refactoring 2022-01-18 11:24:23 +01:00
utils.c Instance cleanup (#7738) 2022-03-23 13:18:35 +01:00
utils.h Fixed #7696: Abort freerdp_connect if manually canceled (#7700) 2022-03-07 13:47:43 +01:00
window.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
window.h Reformatted to new style 2019-11-07 10:53:54 +01:00