[pve-devel] applied: [PATCH 2/2] openid connect: http client: avoid unversioned ureq module
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Jul 21 18:52:33 CEST 2025
It's simply not needed so do not bother with it.
Brings us again closer to what the proxmox-http sync client does, now
at least it's again so simple that there can be an argument for doing
this ourselves here over pulling in more dependencies.
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
proxmox-openid/src/http_client.rs | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/proxmox-openid/src/http_client.rs b/proxmox-openid/src/http_client.rs
index 904a5bac..a21e1d5a 100755
--- a/proxmox-openid/src/http_client.rs
+++ b/proxmox-openid/src/http_client.rs
@@ -4,7 +4,6 @@ use std::io::Read;
use http::method::Method;
use openidconnect::{HttpRequest, HttpResponse};
-use ureq::unversioned::transport::Connector;
// Copied from OAuth2 create, because we want to use ureq with
// native-tls. But current OAuth2 crate pulls in rustls, so we cannot
@@ -47,15 +46,7 @@ fn ureq_agent() -> Result<ureq::Agent, Error> {
let proxy = ureq::Proxy::new(&val).map_err(Box::new)?;
config = config.proxy(Some(proxy));
}
- let agent = ureq::Agent::with_parts(
- config.build(),
- ureq::unversioned::transport::ConnectProxyConnector::default()
- .chain(ureq::unversioned::transport::TcpConnector::default())
- .chain(ureq::unversioned::transport::NativeTlsConnector::default()),
- ureq::unversioned::resolver::DefaultResolver::default(),
- );
-
- Ok(agent)
+ Ok(config.build().into())
}
fn add_headers<T>(
--
2.47.2
More information about the pve-devel
mailing list