From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 158171FF191 for ; Tue, 21 Oct 2025 12:03:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 03CA11A706; Tue, 21 Oct 2025 12:03:38 +0200 (CEST) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Date: Tue, 21 Oct 2025 12:03:29 +0200 Message-ID: <20251021100332.251697-6-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251021100332.251697-1-m.sandoval@proxmox.com> References: <20251021100332.251697-1-m.sandoval@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761041006794 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.097 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 2/3] api: apt: use new dc proxy option X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Maximiliano Sandoval --- PVE/API2/APT.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index 1ccbaf97..521cee9d 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -336,8 +336,11 @@ __PACKAGE__->register_method({ # setup proxy for apt my $aptconf = "// no proxy configured\n"; - if ($dcconf->{http_proxy}) { - $aptconf = "Acquire::http::Proxy \"$dcconf->{http_proxy}\";\n"; + if (my $http_proxy = PVE::Cluster::get_proxy($dcconf, 'http', 'apt')) { + $aptconf = "Acquire::http::Proxy \"$http_proxy\";\n"; + } + if (my $https_proxy = PVE::Cluster::get_proxy($dcconf, 'https', 'apt')) { + $aptconf .= "Acquire::https::Proxy \"$https_proxy\";\n"; } my $aptcfn = "/etc/apt/apt.conf.d/76pveproxy"; PVE::Tools::file_set_contents($aptcfn, $aptconf); -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel