public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Oguz Bektas <o.bektas@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 2/2] set https_proxy to http_proxy for querying url metadata
Date: Thu, 25 Nov 2021 14:34:54 +0100	[thread overview]
Message-ID: <bb206ddd-92b1-4df5-e96e-0f342c411192@proxmox.com> (raw)
In-Reply-To: <20211109141359.990235-3-o.bektas@proxmox.com>

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@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;
> 





  reply	other threads:[~2021-11-25 13:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 14:13 [pve-devel] [PATCH manager storage 0/2] fix #3716: allow https proxy for URL download Oguz Bektas
2021-11-09 14:13 ` [pve-devel] [PATCH storage 1/2] download-url: reuse http_proxy from datacenter.cfg for https Oguz Bektas
2021-11-25 13:34   ` Dominik Csapak
2021-11-25 14:06     ` Thomas Lamprecht
2021-11-25 14:23       ` Dominik Csapak
2021-11-09 14:13 ` [pve-devel] [PATCH manager 2/2] set https_proxy to http_proxy for querying url metadata Oguz Bektas
2021-11-25 13:34   ` Dominik Csapak [this message]
2021-11-25 13:49     ` Oguz Bektas
2021-11-25 14:07       ` Thomas Lamprecht
2021-11-25 14:14         ` Oguz Bektas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb206ddd-92b1-4df5-e96e-0f342c411192@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=o.bektas@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal