aboutsummaryrefslogtreecommitdiff
path: root/src/diplonat.rs
diff options
context:
space:
mode:
authoradrien <adrien@luxeylab.net>2021-12-28 11:56:12 +0100
committeradrien <adrien@luxeylab.net>2021-12-28 11:56:12 +0100
commit4560622fa125afb8ac5161f8d0e8a353f99f7a38 (patch)
tree0e6b8c716955ea5bb5896c5dc4c8294b69e54137 /src/diplonat.rs
parent4d4d453afa3edafe71db2ae60171b8696b38a3c9 (diff)
parent7760b9c58fd98dd934a8f553dd7462049f545cf4 (diff)
downloaddiplonat-4560622fa125afb8ac5161f8d0e8a353f99f7a38.tar.gz
diplonat-4560622fa125afb8ac5161f8d0e8a353f99f7a38.zip
Merge pull request 'Allow Diplonat to automatically detect it's private IP' (#12) from autodetect-private-ip into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/diplonat/pulls/12
Diffstat (limited to 'src/diplonat.rs')
-rw-r--r--src/diplonat.rs6
1 files changed, 3 insertions, 3 deletions
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(());
}
}