Mira Limbeck
a8a838754d
http: fix proxy authorization header to include type
...
and encode the username:password string as base64 [0]. This fixes the
error 407 issue when using proxy authentication [1].
[0] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization
[1] https://forum.proxmox.com/threads/checking-the-subscription-behind-a-proxy-fails.112063/
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
2022-07-21 12:54:59 +02:00
Wolfgang Bumiller
94d388b988
http: clippy fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:31:58 +02:00
Fabian Grünbichler
b5accff750
bump proxmox-http to 0.6.3-1
2022-06-30 12:42:18 +02:00
Fabian Grünbichler
bd1f9f103e
http: implement HttpClient for SimpleHttp
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-30 12:42:17 +02:00
Fabian Grünbichler
3c0486be50
http: add HttpClient trait
...
gated behind feature "client-trait"
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-30 12:42:12 +02:00
Fabian Grünbichler
94456ee4b1
http: move TLS helper to client feature
...
it's only used there and pulls in hyper and tokio, which we don't
want/need in http-helpers.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-29 10:32:44 +02:00
Fabian Grünbichler
210d4fdb68
http: take over json_object_to_query
2022-06-29 10:32:44 +02:00
Wolfgang Bumiller
0d30720907
http: clippy fixes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-29 10:14:33 +02:00
Fabian Grünbichler
7667e549a5
bump proxmox-http to 0.6.2
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 14:33:12 +02:00
Fabian Grünbichler
05d3c3f412
http: bump proxmox-sys to 0.3.0
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 14:33:12 +02:00
Thomas Lamprecht
42dd95aa6f
http: bump version to 0.6.1-1
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-05 10:42:52 +02:00
Thomas Lamprecht
9c0e9dca59
tree wide update of genereated control
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-05 10:22:50 +02:00
Thomas Lamprecht
0eeb0dd17c
http: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:41:21 +02:00
Wolfgang Bumiller
57d052af36
workspace: set proxmox-lang dep version to 1.1
...
to ensure the error macros are available
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:45:46 +01:00
Dominik Csapak
d4b4115400
move io error helpers to proxmox-lang
...
this removes proxmox_sys as a dependecy for proxmox-async
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:35:14 +01:00
Wolfgang Bumiller
70142e607d
proxmox-http: drop 'mut' on specialized request methods
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-11 08:56:34 +01:00
Fabian Grünbichler
ca563a8cfd
misc clippy fixes
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-02-08 14:28:44 +01:00
Thomas Lamprecht
5cc4ce3b4d
http: websocket: code cleanup
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:16:36 +01:00
Thomas Lamprecht
1edb52411e
http: websocket: drop Text frame auto-detection from docs
...
was forgotten in commit 232d87531e
when
dropping the bogus frame auto detection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:15:49 +01:00
Thomas Lamprecht
42b6f4331f
http: websocket: avoid modulo for power of 2
...
even for the small cases this can matter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:12:07 +01:00
Thomas Lamprecht
425b52586e
http: websocket: rustfmt and small cleanups
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:05:45 +01:00
Thomas Lamprecht
170564dd77
http: websocket: doc wording cleanups
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-04 17:04:50 +01:00
Dominik Csapak
4826ff99d8
proxmox-http: websocket: fix comment about callback
...
this was once a callback in an early version, but it changed to a
channel, but the comment was not updated
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-02-04 16:10:31 +01:00
Wolfgang Bumiller
c609a58086
doc fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-02 14:14:09 +01:00
Wolfgang Bumiller
179515c5b2
http: clippy fixes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-07 11:45:52 +01:00
Dietmar Maurer
82245339b8
use new proxmox-sys 0.2.0 for all crates
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-24 10:00:38 +01:00
Fabian Grünbichler
6b2d0e7427
bump proxmox-http to 0.5.6
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 11:46:21 +01:00
Fabian Grünbichler
dc14d03171
all crates: bump base64 dep to 0.13
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-19 11:46:21 +01:00
Dietmar Maurer
e3a14098f7
bump proxmox-http to 0.5.5-1
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 11:05:55 +01:00
Dietmar Maurer
81e959548b
proxmox-http: impl RateLimiterVec
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 11:01:03 +01:00
Dietmar Maurer
b8724f4952
bump proxmox-http version to 0.5.4-1
2021-11-14 08:19:15 +01:00
Dietmar Maurer
b9a1d62e47
proxmox-http: RateLimit - remove average_rate
...
Instead, add a method to return overall traffic.
2021-11-14 08:15:42 +01:00
Dietmar Maurer
100848de10
bump proxmox-http version to 0.5.3-1
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-13 17:38:41 +01:00
Dietmar Maurer
13276cc619
proxmox-http: use repr(C) for RateLimiter
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-13 17:38:18 +01:00
Dietmar Maurer
8734d0c2f9
proxmox-http: use SharedRateLimit trait object for RateLimitedStream
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-13 17:38:10 +01:00
Dietmar Maurer
937d1a6095
proxmox-http: define a RateLimit trait
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-13 17:38:00 +01:00
Dietmar Maurer
28e1d4c342
bump proxmox-http version to 0.5.2-1
2021-11-12 09:24:17 +01:00
Dietmar Maurer
2f221df863
RateLimiter: add update_rate method
2021-11-10 09:51:08 +01:00
Dietmar Maurer
0c27d5da17
RateLimitedStream: implement peer_addr
2021-11-10 09:51:08 +01:00
Dietmar Maurer
e0a9982dd1
RateLimiter: avoid panic in time computations
2021-11-10 09:51:08 +01:00
Dietmar Maurer
e0305f724b
RateLimitedStream: allow periodic limiter updates
2021-11-10 09:51:08 +01:00
Dietmar Maurer
00ca0b7fae
HttpsConnector: use RateLimitedStream
...
So that we can limit used bandwidth.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 09:51:08 +01:00
Dietmar Maurer
ded24b3f4c
RateLimitedStream: implement poll_write_vectored
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 09:51:08 +01:00
Dietmar Maurer
c94ad247b1
Implement a rate limiting stream (AsyncRead, AsyncWrite)
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 09:51:08 +01:00
Fabian Grünbichler
e848148f5c
websocket: adapt for client connection
...
previously, this was only used for the server side handling of web
sockets. by making the mask part of the WebSocket struct and making some
of the fns associated, we can re-use this for client-side connections
such as in proxmox-websocket-tunnel.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-09 15:45:56 +01:00
Dietmar Maurer
a0cfb9c20d
bump proxmox-http version to 0.5.1-1
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:37:30 +02:00
Wolfgang Bumiller
4ccd6256a8
update proxmox-http to 0.5 for the split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 12:34:14 +02:00
Wolfgang Bumiller
f189895cef
fix deprecated use of std::u16 module
...
integer primitive type modules are deprecated, use
associated constants instead
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-04 15:03:50 +02:00
Wolfgang Bumiller
0f2caafc4e
bump proxmox to 0.13.0-1 and proxmox-api-macro to 0.5.0
...
and proxmox-http to 0.4.0... urgh
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-25 09:41:17 +02:00
Wolfgang Bumiller
8c125364e4
websocket: fix doc test
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-24 15:19:47 +02:00