From e31fee1a6d00c44db72bada64199b81e4a438b74 Mon Sep 17 00:00:00 2001 From: Luna Yao <40349250+ZnqbuZ@users.noreply.github.com> Date: Wed, 13 May 2026 21:30:59 +0200 Subject: [PATCH] merge Cargo.lock --- easytier/Cargo.toml | 5 ++--- easytier/src/common/machine_id.rs | 6 ++---- easytier/src/proto/utils.rs | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/easytier/Cargo.toml b/easytier/Cargo.toml index 0fded525..16b6aeb5 100644 --- a/easytier/Cargo.toml +++ b/easytier/Cargo.toml @@ -74,9 +74,10 @@ async-trait = "0.1.74" maplit = "1.0.2" dashmap = "6.0" -moka = { version = "0.12", features = ["future"] } timedmap = "=1.0.1" +moka = { version = "0.12", features = ["future"] } + # for full-path zero-copy zerocopy = { version = "0.7.32", features = ["derive", "simd"] } bytes = "1.5.0" @@ -176,8 +177,6 @@ petgraph = "0.8.1" ordered_hash_map = "0.5.0" indexmap = "2.13.1" -moka = { version = "0.12.13", features = ["future"] } - # for wireguard boringtun = { package = "boringtun-easytier", version = "0.6.1", optional = true } diff --git a/easytier/src/common/machine_id.rs b/easytier/src/common/machine_id.rs index ce904244..2fb96b74 100644 --- a/easytier/src/common/machine_id.rs +++ b/easytier/src/common/machine_id.rs @@ -6,6 +6,7 @@ use std::{ time::{Duration, Instant}, }; +use crate::utils::hostname; use anyhow::Context as _; #[cfg(unix)] use nix::{ @@ -233,10 +234,7 @@ fn machine_uid_seed() -> Option { fn linux_machine_id_seed(machine_uid: &str) -> String { let mut seed = format!("machine_uid={machine_uid}"); - let hostname = gethostname::gethostname() - .to_string_lossy() - .trim() - .to_string(); + let hostname = hostname(); if !hostname.is_empty() { seed.push_str("\nhostname="); seed.push_str(&hostname); diff --git a/easytier/src/proto/utils.rs b/easytier/src/proto/utils.rs index 1660c3f1..951a9b2c 100644 --- a/easytier/src/proto/utils.rs +++ b/easytier/src/proto/utils.rs @@ -2,7 +2,7 @@ use delegate::delegate; use derivative::Derivative; use derive_more::{AsMut, AsRef, Deref, DerefMut, From, IntoIterator}; use prost::Message; -use serde::Serialize; +use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; /// Generates a stable digest strictly within the lifecycle of the current process.