mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-07 13:33:17 +00:00
update proxmox-http to 0.5 for the split
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
336dab0177
commit
4ccd6256a8
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "proxmox-http"
|
name = "proxmox-http"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
authors = [
|
authors = [
|
||||||
"Dietmar Maurer <dietmar@proxmox.com>",
|
"Dietmar Maurer <dietmar@proxmox.com>",
|
||||||
"Wolfgang Bumiller <w.bumiller@proxmox.com>",
|
"Wolfgang Bumiller <w.bumiller@proxmox.com>",
|
||||||
@ -21,11 +21,20 @@ openssl = { version = "0.10", optional = true }
|
|||||||
tokio = { version = "1.0", features = [], optional = true }
|
tokio = { version = "1.0", features = [], optional = true }
|
||||||
tokio-openssl = { version = "0.6.1", optional = true }
|
tokio-openssl = { version = "0.6.1", optional = true }
|
||||||
|
|
||||||
proxmox = { path = "../proxmox", optional = true, version = "0.13.0", default-features = false }
|
proxmox = { path = "../proxmox", optional = true, version = "0.14.0", default-features = false }
|
||||||
|
proxmox-io = { path = "../proxmox-io", optional = true, version = "1.0.0" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
client = [ "futures", "http-helpers", "openssl" ]
|
client = [ "futures", "http-helpers", "openssl" ]
|
||||||
http-helpers = [ "base64", "http", "hyper", "tokio/io-util", "tokio-openssl", "proxmox" ]
|
http-helpers = [ "base64", "http", "hyper", "tokio/io-util", "tokio-openssl", "proxmox" ]
|
||||||
websocket = [ "base64", "futures", "hyper", "openssl", "proxmox/tokio", "tokio/io-util", "tokio/sync" ]
|
websocket = [
|
||||||
|
"base64",
|
||||||
|
"futures",
|
||||||
|
"hyper",
|
||||||
|
"openssl",
|
||||||
|
"proxmox-io/tokio",
|
||||||
|
"tokio/io-util",
|
||||||
|
"tokio/sync",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
rust-proxmox-http (0.5.0-1) stable; urgency=medium
|
||||||
|
|
||||||
|
* update to proxmox 0.14.0
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Fri, 08 Oct 2021 08:50:27 +0200
|
||||||
|
|
||||||
rust-proxmox-http (0.4.0-1) stable; urgency=medium
|
rust-proxmox-http (0.4.0-1) stable; urgency=medium
|
||||||
|
|
||||||
* update proxmox to 0.13.0
|
* update proxmox to 0.13.0
|
||||||
|
@ -28,6 +28,7 @@ Suggests:
|
|||||||
librust-proxmox-http+hyper-dev (= ${binary:Version}),
|
librust-proxmox-http+hyper-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http+openssl-dev (= ${binary:Version}),
|
librust-proxmox-http+openssl-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http+proxmox-dev (= ${binary:Version}),
|
librust-proxmox-http+proxmox-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-http+proxmox-io-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http+tokio-dev (= ${binary:Version}),
|
librust-proxmox-http+tokio-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http+tokio-openssl-dev (= ${binary:Version}),
|
librust-proxmox-http+tokio-openssl-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http+websocket-dev (= ${binary:Version})
|
librust-proxmox-http+websocket-dev (= ${binary:Version})
|
||||||
@ -35,10 +36,10 @@ Provides:
|
|||||||
librust-proxmox-http+default-dev (= ${binary:Version}),
|
librust-proxmox-http+default-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0-dev (= ${binary:Version}),
|
librust-proxmox-http-0-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0+default-dev (= ${binary:Version}),
|
librust-proxmox-http-0+default-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+default-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+default-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5.0-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+default-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+default-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - Rust source code
|
Description: Proxmox HTTP library - Rust source code
|
||||||
This package contains the source for the Rust proxmox-http crate, packaged by
|
This package contains the source for the Rust proxmox-http crate, packaged by
|
||||||
debcargo for use with cargo and dh-cargo.
|
debcargo for use with cargo and dh-cargo.
|
||||||
@ -52,8 +53,8 @@ Depends:
|
|||||||
librust-base64-0.12+default-dev
|
librust-base64-0.12+default-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+base64-dev (= ${binary:Version}),
|
librust-proxmox-http-0+base64-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+base64-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+base64-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+base64-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+base64-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "base64"
|
Description: Proxmox HTTP library - feature "base64"
|
||||||
This metapackage enables feature "base64" for the Rust proxmox-http crate, by
|
This metapackage enables feature "base64" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -69,8 +70,8 @@ Depends:
|
|||||||
librust-openssl-0.10+default-dev
|
librust-openssl-0.10+default-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+client-dev (= ${binary:Version}),
|
librust-proxmox-http-0+client-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+client-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+client-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+client-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+client-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "client"
|
Description: Proxmox HTTP library - feature "client"
|
||||||
This metapackage enables feature "client" for the Rust proxmox-http crate, by
|
This metapackage enables feature "client" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -84,8 +85,8 @@ Depends:
|
|||||||
librust-futures-0.3+default-dev
|
librust-futures-0.3+default-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+futures-dev (= ${binary:Version}),
|
librust-proxmox-http-0+futures-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+futures-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+futures-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+futures-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+futures-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "futures"
|
Description: Proxmox HTTP library - feature "futures"
|
||||||
This metapackage enables feature "futures" for the Rust proxmox-http crate, by
|
This metapackage enables feature "futures" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -99,8 +100,8 @@ Depends:
|
|||||||
librust-http-0.2+default-dev
|
librust-http-0.2+default-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+http-dev (= ${binary:Version}),
|
librust-proxmox-http-0+http-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+http-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+http-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+http-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+http-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "http"
|
Description: Proxmox HTTP library - feature "http"
|
||||||
This metapackage enables feature "http" for the Rust proxmox-http crate, by
|
This metapackage enables feature "http" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -115,13 +116,13 @@ Depends:
|
|||||||
librust-http-0.2+default-dev,
|
librust-http-0.2+default-dev,
|
||||||
librust-hyper-0.14+default-dev,
|
librust-hyper-0.14+default-dev,
|
||||||
librust-hyper-0.14+full-dev,
|
librust-hyper-0.14+full-dev,
|
||||||
librust-proxmox-0.13-dev,
|
librust-proxmox-0.14-dev,
|
||||||
librust-tokio-1+io-util-dev,
|
librust-tokio-1+io-util-dev,
|
||||||
librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~)
|
librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~)
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+http-helpers-dev (= ${binary:Version}),
|
librust-proxmox-http-0+http-helpers-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+http-helpers-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+http-helpers-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+http-helpers-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+http-helpers-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "http-helpers"
|
Description: Proxmox HTTP library - feature "http-helpers"
|
||||||
This metapackage enables feature "http-helpers" for the Rust proxmox-http
|
This metapackage enables feature "http-helpers" for the Rust proxmox-http
|
||||||
crate, by pulling in any additional dependencies needed by that feature.
|
crate, by pulling in any additional dependencies needed by that feature.
|
||||||
@ -136,8 +137,8 @@ Depends:
|
|||||||
librust-hyper-0.14+full-dev
|
librust-hyper-0.14+full-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+hyper-dev (= ${binary:Version}),
|
librust-proxmox-http-0+hyper-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+hyper-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+hyper-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+hyper-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+hyper-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "hyper"
|
Description: Proxmox HTTP library - feature "hyper"
|
||||||
This metapackage enables feature "hyper" for the Rust proxmox-http crate, by
|
This metapackage enables feature "hyper" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -151,8 +152,8 @@ Depends:
|
|||||||
librust-openssl-0.10+default-dev
|
librust-openssl-0.10+default-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+openssl-dev (= ${binary:Version}),
|
librust-proxmox-http-0+openssl-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+openssl-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+openssl-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+openssl-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+openssl-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "openssl"
|
Description: Proxmox HTTP library - feature "openssl"
|
||||||
This metapackage enables feature "openssl" for the Rust proxmox-http crate, by
|
This metapackage enables feature "openssl" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -163,15 +164,30 @@ Multi-Arch: same
|
|||||||
Depends:
|
Depends:
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
librust-proxmox-http-dev (= ${binary:Version}),
|
librust-proxmox-http-dev (= ${binary:Version}),
|
||||||
librust-proxmox-0.13-dev
|
librust-proxmox-0.14-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+proxmox-dev (= ${binary:Version}),
|
librust-proxmox-http-0+proxmox-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+proxmox-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+proxmox-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+proxmox-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+proxmox-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "proxmox"
|
Description: Proxmox HTTP library - feature "proxmox"
|
||||||
This metapackage enables feature "proxmox" for the Rust proxmox-http crate, by
|
This metapackage enables feature "proxmox" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
|
|
||||||
|
Package: librust-proxmox-http+proxmox-io-dev
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends:
|
||||||
|
${misc:Depends},
|
||||||
|
librust-proxmox-http-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-io-1+default-dev
|
||||||
|
Provides:
|
||||||
|
librust-proxmox-http-0+proxmox-io-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-http-0.5+proxmox-io-dev (= ${binary:Version}),
|
||||||
|
librust-proxmox-http-0.5.0+proxmox-io-dev (= ${binary:Version})
|
||||||
|
Description: Proxmox HTTP library - feature "proxmox-io"
|
||||||
|
This metapackage enables feature "proxmox-io" for the Rust proxmox-http crate,
|
||||||
|
by pulling in any additional dependencies needed by that feature.
|
||||||
|
|
||||||
Package: librust-proxmox-http+tokio-dev
|
Package: librust-proxmox-http+tokio-dev
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Multi-Arch: same
|
Multi-Arch: same
|
||||||
@ -181,8 +197,8 @@ Depends:
|
|||||||
librust-tokio-1+default-dev
|
librust-tokio-1+default-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+tokio-dev (= ${binary:Version}),
|
librust-proxmox-http-0+tokio-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+tokio-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+tokio-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+tokio-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+tokio-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "tokio"
|
Description: Proxmox HTTP library - feature "tokio"
|
||||||
This metapackage enables feature "tokio" for the Rust proxmox-http crate, by
|
This metapackage enables feature "tokio" for the Rust proxmox-http crate, by
|
||||||
pulling in any additional dependencies needed by that feature.
|
pulling in any additional dependencies needed by that feature.
|
||||||
@ -196,8 +212,8 @@ Depends:
|
|||||||
librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~)
|
librust-tokio-openssl-0.6+default-dev (>= 0.6.1-~~)
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+tokio-openssl-dev (= ${binary:Version}),
|
librust-proxmox-http-0+tokio-openssl-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+tokio-openssl-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+tokio-openssl-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+tokio-openssl-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+tokio-openssl-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "tokio-openssl"
|
Description: Proxmox HTTP library - feature "tokio-openssl"
|
||||||
This metapackage enables feature "tokio-openssl" for the Rust proxmox-http
|
This metapackage enables feature "tokio-openssl" for the Rust proxmox-http
|
||||||
crate, by pulling in any additional dependencies needed by that feature.
|
crate, by pulling in any additional dependencies needed by that feature.
|
||||||
@ -213,13 +229,13 @@ Depends:
|
|||||||
librust-hyper-0.14+default-dev,
|
librust-hyper-0.14+default-dev,
|
||||||
librust-hyper-0.14+full-dev,
|
librust-hyper-0.14+full-dev,
|
||||||
librust-openssl-0.10+default-dev,
|
librust-openssl-0.10+default-dev,
|
||||||
librust-proxmox-0.13+tokio-dev,
|
librust-proxmox-io-1+tokio-dev,
|
||||||
librust-tokio-1+io-util-dev,
|
librust-tokio-1+io-util-dev,
|
||||||
librust-tokio-1+sync-dev
|
librust-tokio-1+sync-dev
|
||||||
Provides:
|
Provides:
|
||||||
librust-proxmox-http-0+websocket-dev (= ${binary:Version}),
|
librust-proxmox-http-0+websocket-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4+websocket-dev (= ${binary:Version}),
|
librust-proxmox-http-0.5+websocket-dev (= ${binary:Version}),
|
||||||
librust-proxmox-http-0.4.0+websocket-dev (= ${binary:Version})
|
librust-proxmox-http-0.5.0+websocket-dev (= ${binary:Version})
|
||||||
Description: Proxmox HTTP library - feature "websocket"
|
Description: Proxmox HTTP library - feature "websocket"
|
||||||
This metapackage enables feature "websocket" for the Rust proxmox-http crate,
|
This metapackage enables feature "websocket" for the Rust proxmox-http crate,
|
||||||
by pulling in any additional dependencies needed by that feature.
|
by pulling in any additional dependencies needed by that feature.
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
#[cfg(feature = "websocket")]
|
#[cfg(feature = "websocket")]
|
||||||
pub mod websocket;
|
pub mod websocket;
|
||||||
|
|
||||||
#[cfg(any(feature = "http-helpers"))]
|
#[cfg(feature = "http-helpers")]
|
||||||
pub mod tls;
|
pub mod tls;
|
||||||
|
|
||||||
#[cfg(any(feature = "http-helpers"))]
|
#[cfg(feature = "http-helpers")]
|
||||||
pub mod uri;
|
pub mod uri;
|
||||||
|
|
||||||
#[cfg(any(feature = "http-helpers"))]
|
#[cfg(feature = "http-helpers")]
|
||||||
pub mod proxy_config;
|
pub mod proxy_config;
|
||||||
#[cfg(any(feature = "http-helpers"))]
|
#[cfg(feature = "http-helpers")]
|
||||||
pub use proxy_config::ProxyConfig;
|
pub use proxy_config::ProxyConfig;
|
||||||
|
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
|
@ -42,7 +42,11 @@ impl ProxyConfig {
|
|||||||
///
|
///
|
||||||
/// Default port is 1080 (like curl)
|
/// Default port is 1080 (like curl)
|
||||||
pub fn parse_proxy_url(http_proxy: &str) -> Result<ProxyConfig, Error> {
|
pub fn parse_proxy_url(http_proxy: &str) -> Result<ProxyConfig, Error> {
|
||||||
proxmox::try_block!({
|
Self::parse_proxy_url_do(http_proxy)
|
||||||
|
.map_err(|err| format_err!("parse_proxy_url failed: {}", err))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn parse_proxy_url_do(http_proxy: &str) -> Result<ProxyConfig, Error> {
|
||||||
let proxy_uri: Uri = http_proxy.parse()?;
|
let proxy_uri: Uri = http_proxy.parse()?;
|
||||||
let proxy_authority = match proxy_uri.authority() {
|
let proxy_authority = match proxy_uri.authority() {
|
||||||
Some(authority) => authority,
|
Some(authority) => authority,
|
||||||
@ -73,8 +77,6 @@ impl ProxyConfig {
|
|||||||
authorization,
|
authorization,
|
||||||
force_connect: false,
|
force_connect: false,
|
||||||
})
|
})
|
||||||
})
|
|
||||||
.map_err(|err| format_err!("parse_proxy_url failed: {}", err))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Assemble canonical proxy string (including scheme and port)
|
/// Assemble canonical proxy string (including scheme and port)
|
||||||
|
@ -23,7 +23,7 @@ use futures::future::FutureExt;
|
|||||||
use futures::ready;
|
use futures::ready;
|
||||||
|
|
||||||
use proxmox::sys::error::io_err_other;
|
use proxmox::sys::error::io_err_other;
|
||||||
use proxmox::tools::byte_buffer::ByteBuffer;
|
use proxmox_io::ByteBuffer;
|
||||||
|
|
||||||
// see RFC6455 section 7.4.1
|
// see RFC6455 section 7.4.1
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
|
Loading…
Reference in New Issue
Block a user