[pve-devel] [PATCH manager 2/2] set https_proxy to http_proxy for querying url metadata
Dominik Csapak
d.csapak at proxmox.com
Thu Nov 25 14:34:54 CET 2021
this sadly does not work, comment inline
On 11/9/21 15:13, Oguz Bektas wrote:
> we can reuse the same 'http_proxy' from datacenter.cfg file.
> requests made this way go via a http 'CONNECT'.
>
> $ tail -f /var/log/squid/access.log
> ...
> 1636466841.211 463 127.0.0.1 TCP_TUNNEL/200 4717 CONNECT fedorapeople.org:443 - HIER_DIRECT/152.19.134.199 -
> 1636466841.696 481 127.0.0.1 TCP_TUNNEL/200 4725 CONNECT fedorapeople.org:443 - HIER_DIRECT/152.19.134.199 -
> 1636466842.179 480 127.0.0.1 TCP_TUNNEL/200 4783 CONNECT fedorapeople.org:443 - HIER_DIRECT/152.19.134.199 -
>
>
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
> PVE/API2/Nodes.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
> index 565cbccc..1e13285c 100644
> --- a/PVE/API2/Nodes.pm
> +++ b/PVE/API2/Nodes.pm
> @@ -1548,7 +1548,7 @@ __PACKAGE__->register_method({
>
> my $dccfg = PVE::Cluster::cfs_read_file('datacenter.cfg');
> if ($dccfg->{http_proxy}) {
> - $ua->proxy('http', $dccfg->{http_proxy});
> + $ua->proxy("['http', 'https']", $dccfg->{http_proxy});
the protocols must be an arrayref, not a string so
$ua->proxy(['http', 'https'], ...)
would be correct
> }
>
> my $verify = $param->{'verify-certificates'} // 1;
>
More information about the pve-devel
mailing list