From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id DEDDB1FF0AF for ; Thu, 08 Oct 2026 17:33:46 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 036CB213D3; Thu, 08 Oct 2026 17:33:46 +0200 (CEST) From: Samuel Rufinatscha To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 1/1] fix #6173: acme: use the configured HTTP proxy Date: Thu, 8 Oct 2026 17:33:21 +0200 Message-ID: <20261008153323.293158-4-s.rufinatscha@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261008153323.293158-1-s.rufinatscha@proxmox.com> References: <20261008153323.293158-1-s.rufinatscha@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791473608222 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.250 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: SD3MTPJCY3PRZB53O6FPG6ROEYDIFB4N X-Message-ID-Hash: SD3MTPJCY3PRZB53O6FPG6ROEYDIFB4N X-MailFrom: s.rufinatscha@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ACME requests ignore the node's HTTP proxy setting and fail when the CA is reachable only through a proxy. Pass the node proxy configuration to each ACME operation that contacts the CA. Link: https://bugzilla.proxmox.com/show_bug.cgi?id=6173 Signed-off-by: Samuel Rufinatscha --- src/api2/config/acme.rs | 10 +++++++--- src/api2/node/certificates.rs | 8 ++++++-- src/bin/proxmox_backup_manager/acme.rs | 4 +++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/api2/config/acme.rs b/src/api2/config/acme.rs index 16f24ea55..20f73e70a 100644 --- a/src/api2/config/acme.rs +++ b/src/api2/config/acme.rs @@ -170,6 +170,7 @@ fn register_account( tos_url, Some(directory), eab_kid.zip(eab_hmac_key), + pbs_config::node::node_http_proxy_config()?, ) .await?; @@ -210,7 +211,8 @@ pub fn update_account( auth_id.to_string(), true, move |_worker| async move { - proxmox_acme_api::update_account(&name, contact).await?; + let proxy_config = pbs_config::node::node_http_proxy_config()?; + proxmox_acme_api::update_account(&name, contact, proxy_config).await?; Ok(()) }, @@ -248,7 +250,8 @@ pub fn deactivate_account( auth_id.to_string(), true, move |_worker| async move { - proxmox_acme_api::deactivate_account(&name, force).await?; + let proxy_config = pbs_config::node::node_http_proxy_config()?; + proxmox_acme_api::deactivate_account(&name, force, proxy_config).await?; Ok(()) }, @@ -276,7 +279,8 @@ pub fn deactivate_account( )] /// Get the Terms of Service URL for an ACME directory. async fn get_tos(directory: Option) -> Result, Error> { - proxmox_acme_api::get_tos(directory).await + let proxy_config = pbs_config::node::node_http_proxy_config()?; + proxmox_acme_api::get_tos(directory, proxy_config).await } #[api( diff --git a/src/api2/node/certificates.rs b/src/api2/node/certificates.rs index 3df05b020..e93e84f93 100644 --- a/src/api2/node/certificates.rs +++ b/src/api2/node/certificates.rs @@ -368,6 +368,7 @@ fn spawn_certificate_worker( let auth_id = rpcenv.get_auth_id().unwrap(); let acme_config = node_config.acme_config()?; + let proxy_config = node_config.http_proxy(); let domains = node_config.acme_domains().try_fold( Vec::::new(), @@ -385,7 +386,8 @@ fn spawn_certificate_worker( WorkerTask::spawn(name, None, auth_id, true, move |worker| async move { let work = || async { if let Some(cert) = - proxmox_acme_api::order_certificate(worker, &acme_config, &domains).await? + proxmox_acme_api::order_certificate(worker, &acme_config, &domains, proxy_config) + .await? { crate::config::set_proxy_certificate(&cert.certificate, &cert.private_key_pem)?; crate::server::reload_proxy_certificate().await?; @@ -423,6 +425,7 @@ pub fn revoke_acme_cert(rpcenv: &mut dyn RpcEnvironment) -> Result Result