[pve-devel] [PATCH manager 3/3] api: nodes: use new dc proxy option
Maximiliano Sandoval
m.sandoval at proxmox.com
Tue Oct 21 12:03:30 CEST 2025
For the 'apl_download' and the 'query_url_metadata' API endpoints.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
PVE/API2/Nodes.pm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 4590b618..fde8229b 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -1750,7 +1750,8 @@ __PACKAGE__->register_method({
hash_required => 1,
sha512sum => $appliance->{sha512sum},
md5sum => $appliance->{md5sum},
- http_proxy => $dccfg->{http_proxy},
+ http_proxy => PVE::Cluster::get_proxy($dccfg, 'http', 'download'),
+ https_proxy => PVE::Cluster::get_proxy($dccfg, 'https', 'download'),
},
);
};
@@ -1818,8 +1819,12 @@ __PACKAGE__->register_method({
$ua->agent("Proxmox VE");
my $dccfg = PVE::Cluster::cfs_read_file('datacenter.cfg');
- if ($dccfg->{http_proxy}) {
- $ua->proxy(['http', 'https'], $dccfg->{http_proxy});
+ if (my $http_proxy = PVE::Cluster::get_proxy($dccfg, 'http', 'download')) {
+ $ua->proxy('http', $http_proxy);
+ }
+
+ if (my $https_proxy = PVE::Cluster::get_proxy($dccfg, 'https', 'download')) {
+ $ua->proxy('https', $https_proxy);
}
my $verify = $param->{'verify-certificates'} // 1;
--
2.47.3
More information about the pve-devel
mailing list