Commit Graph

2871 Commits

Author SHA1 Message Date
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
c5d396cdb9 bump proxmox-shared-memory to version 0.1.0-2
And add missing debian files.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 07:29:13 +01:00
Dietmar Maurer
42002bb5c9 proxmox-shared-memory: avoid compiler warnings
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 07:29:13 +01:00
Dietmar Maurer
a1728a72c8 proxmox-shared-memory: remove debug println
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-15 07:14:49 +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
564703b195 proxmox-shared-memory: improve regression tests
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 18:20:44 +01:00
Dietmar Maurer
09dc3a4abc proxmox-shared-memory: create debian package
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 18:20:23 +01:00
Dietmar Maurer
0ef72957a6 proxmox-shared-memory: implement helper to init subtypes
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 18:20:06 +01:00
Dietmar Maurer
c8251d4d24 proxmox-shared-memory: add magic number test
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 18:19:49 +01:00
Dietmar Maurer
9828acd2ef proxmox-shared-memory: shared memory and shared mutex implementation 2021-11-12 18:19:36 +01:00
Dietmar Maurer
956e7041fe bump proxmox version to 0.15.2-1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 17:39:38 +01:00
Thomas Lamprecht
c4cff1278f rest: make successful-ticket auth log a debug one to avoid syslog
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-12 11:10:12 +01:00
Dietmar Maurer
8bcd8e5357 impl proxmox::tools::fs::CreateOptions::apply_to()
Split out code to apply CreateOptions.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-12 09:24:27 +01:00
Dietmar Maurer
28e1d4c342 bump proxmox-http version to 0.5.2-1 2021-11-12 09:24:17 +01:00
Dietmar Maurer
4b3e0e331c implement Servive for RateLimitedStream
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 10:15:40 +01:00
Dietmar Maurer
745c4f37dd bump proxmox-schema version to 1.0.1-1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-10 09:58:32 +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
Wolfgang Bumiller
e0df53e793 bump proxmox-tfa to 1.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 13:27:59 +01:00
Wolfgang Bumiller
0156b3fe03 proxmox-tfa: add version field to u2f::AuthChallenge
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 13:27:59 +01:00
Wolfgang Bumiller
83934e59e6 proxmox-tfa: make u2f::AuthChallenge Clone + Debug
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-09 13:27:59 +01:00
Fabian Grünbichler
4128c5fdb5 updater: impl UpdaterType for Vec
by replacing the whole Vec.

if we ever want to support adding/removing/modifying elements of a Vec
via the Updater, we'd need to extend it anyway (or use a custom
updater).

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-11-09 09:18:08 +01:00
Wolfgang Bumiller
bc38ff7878 bump proxmox-tfa to 1.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-29 15:07:09 +02:00
Wolfgang Bumiller
1554465d45 proxmox-tfa: add Totp::digits
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-29 14:31:39 +02:00
Dominik Csapak
8e344d3d67 rrd: use saturating_sub to avoid underflow
Without this, the tests fail in debug mode.
Also having start (u64) underflow to a value greater than end does
not really make sense

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Wolfgang Bumiller
cb89d97df1 bump version to 0.3.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-21 13:14:10 +02:00
Dominik Csapak
4c5d899c3a directory: make meta object optional
some custom ACME endpoints do not have a TOS, and thus do not return
a meta property at all

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-21 13:09:42 +02:00
Wolfgang Bumiller
4f4fa80f2f bump proxmox to 0.15.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-21 12:44:12 +02:00
Wolfgang Bumiller
bdc7e9d145 proxmox: cleanup files on fsync errors
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-21 12:42:23 +02: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
Dietmar Maurer
e9bea7b7ed use new fsync parameter to replace_file and atomic_open_or_create
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Dietmar Maurer
75ca726c29 use new fsync parameter to replace_file and atomic_open_or_create
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Dietmar Maurer
8ae297c8d2 proxmox: bump d/control
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:27:43 +02:00
Dietmar Maurer
8471451a7b bump version to 0.8.1-1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:15:11 +02:00
Dietmar Maurer
6aa28f0a08 add fsync parameter to replace_file
Depend on proxmox 0.15.0

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:12:27 +02:00
Dietmar Maurer
bb089965c9 bump proxmox vertsion to 0.15.0-1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:08:34 +02:00
Dietmar Maurer
b960bc3a4a add fsync parameter to replace_file and atomic_open_or_create
The fsync is required for consistency after power failure, so it should
be set when writing config files or otherwise important data.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:06:04 +02:00
Dominik Csapak
b87aa76b64 rest-server: use hashmap for parameter errors
our ui expects a map here with 'field: "error"'. This way it can mark
the relevant field as invalid and correctly shows the complete error
message

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-21 06:32:23 +02:00