public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* Re: [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions
@ 2021-05-10  6:50 Dietmar Maurer
  0 siblings, 0 replies; 3+ messages in thread
From: Dietmar Maurer @ 2021-05-10  6:50 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dylan Whyte

Ignore me - I can fix this myself easily (no need to resend).

> On 05/10/2021 8:44 AM Dietmar Maurer <dietmar@proxmox.com> wrote:
> 
>  
> This one does not apply. Please can you rebase an d send it again.
> 
> On 5/7/21 12:53 PM, Dylan Whyte wrote:
> > Signed-off-by: Dylan Whyte <d.whyte@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)?;
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions
  2021-05-07 10:53 ` [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions Dylan Whyte
@ 2021-05-10  6:44   ` Dietmar Maurer
  0 siblings, 0 replies; 3+ messages in thread
From: Dietmar Maurer @ 2021-05-10  6:44 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dylan Whyte

This one does not apply. Please can you rebase an d send it again.

On 5/7/21 12:53 PM, Dylan Whyte wrote:
> Signed-off-by: Dylan Whyte <d.whyte@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)?;




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions
  2021-05-07 10:53 [pbs-devel] [PATCH proxmox-backup 1/4] fix 3296: add api endpoint for set, get, rm proxy Dylan Whyte
@ 2021-05-07 10:53 ` Dylan Whyte
  2021-05-10  6:44   ` Dietmar Maurer
  0 siblings, 1 reply; 3+ messages in thread
From: Dylan Whyte @ 2021-05-07 10:53 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Dylan Whyte <d.whyte@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)?;
-- 
2.20.1





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-10  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  6:50 [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions Dietmar Maurer
  -- strict thread matches above, loose matches on Subject: below --
2021-05-07 10:53 [pbs-devel] [PATCH proxmox-backup 1/4] fix 3296: add api endpoint for set, get, rm proxy Dylan Whyte
2021-05-07 10:53 ` [pbs-devel] [PATCH proxmox-backup 3/4] fix #3296: use proxy for subscriptions Dylan Whyte
2021-05-10  6:44   ` Dietmar Maurer

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