From 3b9e75634aa06b6df0519e5d44fd6e5281712d09 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 25 Dec 2021 19:19:19 +0100 Subject: Allow Diplonat to automatically detect it's private IP --- src/diplonat.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/diplonat.rs') diff --git a/src/diplonat.rs b/src/diplonat.rs index 496f0ab..397ba82 100644 --- a/src/diplonat.rs +++ b/src/diplonat.rs @@ -21,7 +21,7 @@ impl Diplonat { let fw = FirewallActor::new(rt_cfg.firewall.refresh_time, &ca.rx_open_ports).await?; let ia = IgdActor::new( - &rt_cfg.igd.private_ip, + rt_cfg.igd.private_ip.as_ref().map(String::as_str), rt_cfg.igd.refresh_time, rt_cfg.igd.expiration_time, &ca.rx_open_ports, @@ -34,7 +34,7 @@ impl Diplonat { firewall: fw, }; - return Ok(ctx) + return Ok(ctx); } pub async fn listen(&mut self) -> Result<()> { @@ -44,6 +44,6 @@ impl Diplonat { self.firewall.listen() )?; - return Ok(()) + return Ok(()); } } -- cgit v1.2.3