[pbs-devel] applied: [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions

Dietmar Maurer dietmar at proxmox.com
Mon May 10 09:25:03 CEST 2021


applied

On 5/7/21 12:53 PM, Dylan Whyte wrote:
> Signed-off-by: Dylan Whyte <d.whyte at proxmox.com>
> ---
>   src/tools/subscription.rs | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/src/tools/subscription.rs b/src/tools/subscription.rs
> index eaaf0389..55b89387 100644
> --- a/src/tools/subscription.rs
> +++ b/src/tools/subscription.rs
> @@ -6,6 +6,7 @@ use regex::Regex;
>   
>   use proxmox::api::api;
>   
> +use crate::config::node;
>   use crate::tools::{self, http::SimpleHttp};
>   use proxmox::tools::fs::{replace_file, CreateOptions};
>   
> @@ -102,7 +103,13 @@ async fn register_subscription(
>           "check_token": challenge,
>       });
>   
> -    let mut client = SimpleHttp::new(None); // TODO: pass proxy_config
> +    let proxy_config = if let Ok((node_config, _digest)) = node::config() {
> +        node_config.http_proxy()
> +    } else {
> +        None
> +    };
> +
> +    let mut client = SimpleHttp::new(proxy_config);
>   
>       let uri = "https://shop.maurer-it.com/modules/servers/licensing/verify.php";
>       let query = tools::json_object_to_query(params)?;





More information about the pbs-devel mailing list