From 8ef174b19c313ff060a237827f60966c3adcebfd Mon Sep 17 00:00:00 2001 From: Lyn Date: Wed, 15 Jan 2025 18:14:15 +0100 Subject: [PATCH] Merge remote-tracking branch 'yuka/main' # Conflicts: # Cargo.lock # Cargo.toml # src/main.rs --- Cargo.lock | 12 +++++++++++- src/main.rs | 2 -- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f19662a..c782075 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -452,6 +452,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +dependencies = [ + "serde", +] + [[package]] name = "ipnetwork" version = "0.20.0" @@ -1001,6 +1010,7 @@ dependencies = [ "bincode", "blake3", "futures", + "ipnet", "log", "pnet", "pretty_env_logger", diff --git a/src/main.rs b/src/main.rs index 2f29628..e47deaf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,8 +29,6 @@ const PERSIST_INTERVAL: Duration = Duration::from_secs(600); const LAN_BROADCAST_INTERVAL: Duration = Duration::from_secs(60); const IGD_INTERVAL: Duration = Duration::from_secs(60); -const IGD_LEASE_DURATION: Duration = Duration::from_secs(300); - type Pubkey = String; #[derive(Deserialize)]