Commit Graph

44 Commits

Author SHA1 Message Date
Wolfgang Bumiller
d422852f51 bump proxmox-http to 0.8.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Wolfgang Bumiller
d7ed04f8e5 http: add RateLimitedStream::inner, drop peer_addr
instead of implementing 'peer_addr' specifically for
RateLimitedStream<tokio::net::TcpStream>, just provide
.inner() and .inner_mut() so the user can reach the inner
stream directly.

This way we can drop the tokio/net feature as well

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Wolfgang Bumiller
b2c26f74a6 http: lower hyper feature requirements for client feature
instead of 'full', we only need 'tcp+http1+http2'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Wolfgang Bumiller
10a3ab222b http: move rate-limiting out of client feature
this can now be used separately

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Wolfgang Bumiller
b62d76e80c http: start 0.8.0 refactoring
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-03-02 16:14:04 +01:00
Fabian Grünbichler
e5abc0590e define workspace dependencies in workspace
so that we no longer have to (or forget to) bump the version in multiple places.

notable changes:
- outdated versions have been unified
- proxmox-metrics -> proxmox-async no longer uses explicit empty features
  (proxmox-async doesn't provide any anyway)
- proxmox-subscription -> proxmox-http no longer uses explicit default_features
  = false (proxmox-http has an empty default feature anyway)
- missing path dependencies added (mainly proxmox-rest-server)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
4189221470 inherit shared, external dependencies
noteworthy changes:
- proxmox-http had a default_features_false dep on hyper, which is dropped (the
  default feature is empty anyway)
- hyper, libc, nix, tokio and url versions are unified
- missing (cosmetic) bindgen feature on zstd enabled everywhere

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
64959d9ae0 move common metadata to workspace
and switch all crates to 2021 edition as well as a unified "authors" value.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
Fabian Grünbichler
5b90667d05 http: bump to 0.7.0
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 09:35:51 +02:00
Fabian Grünbichler
9c444d7a94 http: add ureq-based sync client
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 09:17:45 +02:00
Fabian Grünbichler
289d297c7d build: use weak and namespaced features
to reduce the creep of optional dependencies being exposed as features.

this requires cargo 0.63 (and debcargo built against at least that
version), but greatly reduces the number of binary packages and provides
generated, while still allowing sensible selection of optional
dependencies via the explicit feature meant for pulling them in.

diff stat for running `make  deb` after this change:
 proxmox-http/debian/control         | 226 ++++--------------------------------
 proxmox-router/debian/control       |  74 +-----------
 proxmox-schema/debian/control       |  53 ++-------
 proxmox-subscription/debian/control |  17 +--
 proxmox-sys/debian/control          |  51 +++-----
 proxmox-tfa/debian/control          | 110 ++----------------
 6 files changed, 72 insertions(+), 459 deletions(-)

the 'dep:' prefix marks something on the RHS inside the features section
as dependency, it's only allowed if the string after it is an optional
dependency an no explicit feature of the same name exists. if all
pointers to the optional dependency in the features section are marked
as such, the optional dependency itself will not be exposed as a feature
(either on the cargo or debian/control level).

the '?' suffix marks dependencies as "weak", which only enables the
optional dependency + its feature(s) if the optional dependency itself
is also enabled. it has no effect on d/control since such a relationship
is not encodable in Debian package relations, but it does affect cargo
dependency resolution and allows skipping the build of unneeded optional
dependencies in some cases.

with no packages/crates depending on the no longer exposed automatically
generated features/packages, so these are safe to remove even though
it's technically a breaking change.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-26 10:35:00 +02:00
Wolfgang Bumiller
2eacdbe090 bump proxmox-http to 0.6.5-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:35:47 +02:00
Wolfgang Bumiller
1d3f4a4bbd http, shared-memory, subscription: bump proxmox-sys dependency to 0.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:35:47 +02:00
Wolfgang Bumiller
dc57115703 bump proxmox-http to 0.6.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:58:11 +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
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
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
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
b8724f4952 bump proxmox-http version to 0.5.4-1 2021-11-14 08:19:15 +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
28e1d4c342 bump proxmox-http version to 0.5.2-1 2021-11-12 09:24:17 +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
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
Thomas Lamprecht
44d571a8e0 proxmox-http: bump version to 0.3.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-20 17:45:29 +02:00
Dietmar Maurer
82d7a1cdbf bump proxmox version to 0.12.0-1 2021-07-20 15:45:45 +02:00
Fabian Grünbichler
fff7b926ee proxmox-http: bump version to 0.2.1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-18 10:31:51 +02:00
Wolfgang Bumiller
0c448080c8 bump proxmox-http to 0.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-05-17 11:25:42 +02:00
Fabian Grünbichler
80b423f30f http: takeover tools::http from proxmox_backup
the parts that were not already moved.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:53:04 +02:00
Fabian Grünbichler
7f56e0774c http: takeover ProxyConfig from proxmox_backup
adapted to use moved build_authority helper.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:52:29 +02:00
Fabian Grünbichler
f305be9583 http: takeover build_authority helper from proxmox_backup
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:45:35 +02:00
Fabian Grünbichler
6c5028512b http: takeover MaybeTlsStream from proxmox_backup
this is just a (rather HTTP specific) wrapper, so put it into a
'wrapper' module for now.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:45:04 +02:00
Fabian Grünbichler
5153e68cab http: takeover websocket feature from proxmox
adapted: use statements for proxmox::*, use statements for doctests

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:43:19 +02:00
Fabian Grünbichler
7b7e1413ff meta: add empty proxmox-http sub-crate
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-05-17 09:42:16 +02:00