akallabeth
1849632c43
Fixed format strings to match arguments ( #8254 )
...
* Fixed format strings to match arguments
Reviewed and replaced all %d specifiers to match proper type
* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
akallabeth
51f4c374c4
Clear OpenSSL error queue before BIO_read/BIO_write
2022-07-02 16:32:50 +02:00
fifthdegree
85f7cb8916
clear openssl error queue after nla_client_begin
2022-07-02 16:32:50 +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
Adrian Vollmer
bfea66d5e9
Set default ports for http and socks proxies
2022-04-05 09:22:48 +02:00
Adrian Vollmer
2f1003c257
Move function declaration before first use
2022-04-05 09:22:48 +02:00
Adrian Vollmer
167a29a41f
Move function back to original position
...
This is merely done so that the diff looks nicer.
2022-04-05 09:22:48 +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
Armin Novak
edeea86dd1
Improved http_proxy_connect checks
...
* Assert function arguments
* Unify error handling
* Additional buffer size checks
2022-02-07 08:22:19 +00:00
Ayose
b43942a348
HTTP Basic authentication for HTTP proxy connections
...
This patch adds support for authentication when the connection is done
through a HTTP proxy.
It only supports HTTP Basic Authentication (like `curl --proxy`).
It is tested against Apache 2.4.
2022-02-07 08:22:19 +00:00
Armin Novak
5fb59a23a9
Fixed lots of compilation warnings and type mismatches
2021-06-16 15:21:56 +02:00
akallabeth
3c237fd687
Fixed #6656 : invalid read of proxy port.
2020-12-10 07:38:25 +01:00
akallabeth
44ea09e7ad
Use freerdp_settings_[s|g]et* api to access proxy vaiables.
...
Fixes #6414
2020-08-05 11:29:00 +02:00
Kobi Mizrachi
fddda159d9
change use of strtok to strtok_s
2020-05-18 11:08:20 +02:00
Martin Fleisz
4e06855826
proxy: Add received response in case of an error
2020-01-08 17:45:10 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00
Armin Novak
72ca88f49c
Reformatted to new style
2019-11-07 10:53:54 +01:00
Armin Novak
f01e042211
Code cleanups (strlen, casts, size_t, ...)
2019-10-29 11:58:43 +01:00
asapelkin
82eadad4a4
Fix some static analizer warnings
2019-10-22 15:39:54 +02:00
Louis Sautier
60152291b3
client: proxy: allow passing SOCKS5 proxies as env. vars
2019-08-20 14:06:38 +02:00
Armin Novak
f51a9bafcc
Fixed sign-compare warnings
2019-04-05 09:13:24 +02:00
Armin Novak
941213f504
Fixed domain and regex match.
2018-09-24 12:24:15 +02:00
Armin Novak
3a2bfa183f
Fixed #4878 : Added cidr support for proxy exception check.
2018-09-24 11:51:40 +02:00
Armin Novak
b5df39756d
Added option to ignore proxy env.
2018-08-23 17:02:43 +02:00
Armin Novak
4bea9934cf
Added patch from #4697
2018-08-23 17:02:43 +02:00
Ondrej Holy
7e4fa67026
core/proxy: Fix leak found by covscan
...
leaked_storage: Variable "s" going out of scope leaks the storage it points to.
2018-08-22 14:34:02 +02:00
Armin Novak
46a62aa1a4
Fixed missing NULL pointer checks.
2018-05-04 12:35:51 +02:00
David Fort
0f968b782c
proxy: cleanup SOCKS support and add user/password support
2018-05-02 10:51:16 +02:00
Jiri Sasek
1ba31551a6
socks proxy reply fix
2018-05-02 09:43:03 +02:00
Jiri Sasek
b1c1549ad1
SOCKS proxy support
2018-04-23 21:01:01 +02:00
Armin Novak
4eb5b8e349
Replaced atoi
2017-11-15 15:52:16 +01:00
Armin Novak
0490aeb018
Fixed clang malloc integer overflow warnings.
2017-07-20 09:29:48 +02:00
Armin Novak
99c45405cb
Fixed GetEnvironmentVariable.
2017-03-03 12:43:00 +01:00
Armin Novak
b2c29158be
Scanbuild warning, argument checks and leak fixes.
...
* Added Stream_GetRemainingCapacity to check remaining stream size
before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Christian Plattner
8658f04f42
Code reformatting of proxy.c, proxy.h
2016-12-13 12:12:04 +01:00
Christian Plattner
3cc39b2dcd
Dynamic environment variable length of $https_proxy
2016-12-12 17:16:12 +01:00
Christian Plattner
50a3f55063
Bug: strndup not supported in windows
2016-12-12 16:56:52 +01:00
Christian Plattner
58ef7cc42d
More abstracted proxy handling
2016-12-10 23:13:35 +01:00
Christian Plattner
d9e28c24ad
Use logging API for HTTP proxy
2016-12-10 18:59:58 +01:00
Christian Plattner
5d10b3bf5b
Merge branch 'gateway-http-bugfix'
...
Conflicts:
client/common/cmdline.c
include/freerdp/settings.h
libfreerdp/common/settings.c
libfreerdp/core/settings.c
libfreerdp/core/tcp.c
libfreerdp/core/transport.c
2016-12-09 20:43:02 +01:00
Christian Plattner
49a6273c91
Revert "HTTP Proxy: Simplify using buffered BIO and trio_asprintf"
...
This reverts commit 91eddce7fb
.
Conflicts:
libfreerdp/core/proxy.c
libfreerdp/core/tcp.c
2016-12-09 19:18:42 +01:00
Christian Plattner
33320a2e02
Merge remote-tracking branch 'upstream/master' into httpproxy
...
Conflicts:
libfreerdp/core/settings.c
libfreerdp/core/tcp.c
libfreerdp/core/transport.c
2015-01-22 14:33:17 +01:00
Christian Plattner
91eddce7fb
HTTP Proxy: Simplify using buffered BIO and trio_asprintf
2015-01-22 13:19:25 +01:00
Christian Plattner
ff42e9f12c
Merge commit 'dd6d82': Switch to OpenSSL BIOs
...
Conflicts:
libfreerdp/core/tcp.c
libfreerdp/core/transport.c
2015-01-20 00:47:16 +01:00
Christian Plattner
ac90c23c71
Moved HTTP Proxy methods out of transport.c into new proxy.c; use not in transport.c but in tcp.c
2014-09-22 16:58:01 +02:00