[PATCH proxmox-backup v4 3/8] pbs-config: use http proxy schema moved to proxmox-http crate

Christian Ebner
2026-03-27T12:13:16Z

The schema was move there in preparation for moving the node config
to the pbs-config crate. Use it and drop the local one.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
Cargo.toml | 2 +-
src/api2/types/mod.rs | 11 -----------
src/config/node.rs | 4 +---
3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 69c9c2fdf..21ec356dd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -64,7 +64,7 @@ proxmox-config-digest = "1"
proxmox-daemon = "1"
proxmox-fuse = "3"
proxmox-docgen = "1"
-proxmox-http = { version = "1.0.2", features = [ "client", "http-helpers", "websocket" ] } # see below
+proxmox-http = { version = "1.0.2", features = [ "client", "http-helpers", "api-types", "websocket" ] } # see below
proxmox-human-byte = "1"
proxmox-io = "1.0.1" # tools and client use "tokio" feature
proxmox-lang = "1.1"
diff --git a/src/api2/types/mod.rs b/src/api2/types/mod.rs
index 341936853..40fe7302b 100644
--- a/src/api2/types/mod.rs
+++ b/src/api2/types/mod.rs
@@ -116,14 +116,3 @@ fn test_proxmox_user_id_schema() -> Result<(), anyhow::Error> {

Ok(())
}
-
-pub const HTTP_PROXY_SCHEMA: Schema =
- StringSchema::new("HTTP proxy configuration [http://]<host>[:port]")
- .format(&ApiStringFormat::VerifyFn(|s| {
- proxmox_http::ProxyConfig::parse_proxy_url(s)?;
- Ok(())
- }))
- .min_length(1)
- .max_length(128)
- .type_text("[http://]<host>[:port]")
- .schema();
diff --git a/src/config/node.rs b/src/config/node.rs
index a79bf5707..c01c6aa7a 100644
--- a/src/config/node.rs
+++ b/src/config/node.rs
@@ -9,14 +9,12 @@ use pbs_api_types::{
OPENSSL_CIPHERS_TLS_1_3_SCHEMA,
};
use proxmox_acme_api::{AcmeConfig, AcmeDomain, ACME_DOMAIN_PROPERTY_SCHEMA};
-use proxmox_http::ProxyConfig;
+use proxmox_http::{ProxyConfig, HTTP_PROXY_SCHEMA};
use proxmox_schema::{api, ApiStringFormat, ApiType, Updater};

use pbs_buildcfg::configdir;
use pbs_config::{open_backup_lockfile, BackupLockGuard};

-use crate::api2::types::HTTP_PROXY_SCHEMA;
-
const CONF_FILE: &str = configdir!("/node.cfg");
const LOCK_FILE: &str = configdir!("/.node.lck");

--
2.47.3