Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
Rust emailemail-validationemail-validation-apiemail-verificationemail-verification-apiemail-verifierhacktoberfest
fix: Remove local_ip retrieval
Amauryff8e5998f8b8
diff --git a/Cargo.lock b/Cargo.lockindex 806ab23f..ad53fbcb 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -441,7 +441,6 @@ dependencies = ["fast-socks5 0.9.1","futures","levenshtein",- "local-ip-address","log","mailchecker","md5",@@ -1511,18 +1510,6 @@ version = "0.1.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f"-[[package]]-name = "local-ip-address"-version = "0.5.6"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "66357e687a569abca487dc399a9c9ac19beb3f13991ed49f00c144e02cbd42ab"-dependencies = [- "libc",- "neli",- "thiserror",- "windows-sys 0.48.0",-]-[[package]]name = "lock_api"version = "0.4.7"@@ -1672,31 +1659,6 @@ dependencies = ["tempfile",]-[[package]]-name = "neli"-version = "0.6.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1100229e06604150b3becd61a4965d5c70f3be1759544ea7274166f4be41ef43"-dependencies = [- "byteorder",- "libc",- "log",- "neli-proc-macros",-]--[[package]]-name = "neli-proc-macros"-version = "0.1.3"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c168194d373b1e134786274020dae7fc5513d565ea2ebb9bc9ff17ffb69106d4"-dependencies = [- "either",- "proc-macro2",- "quote",- "serde",- "syn 1.0.109",-]-[[package]]name = "nix"version = "0.27.1"diff --git a/backend/openapi.json b/backend/openapi.jsonindex cadf1ebf..435753c7 100644--- a/backend/openapi.json+++ b/backend/openapi.json@@ -484,12 +484,6 @@"x-stoplight": {"id": "ld3cp67qd2nx8"}- },- "server_name": {- "type": "string",- "x-stoplight": {- "id": "yy9pz1lxrr4si"- }}}}diff --git a/core/Cargo.toml b/core/Cargo.tomlindex 8b579c31..d9d1f0bb 100644--- a/core/Cargo.toml+++ b/core/Cargo.toml@@ -23,7 +23,6 @@ fantoccini = { version = "0.19.3", optional = true }futures = { version = "0.3.29", optional = true }fast-socks5 = "0.9.1"levenshtein = "1.0.5"-local-ip-address = "0.5.6"log = "0.4.20"mailchecker = "6.0.1"md5 = "0.7.0"diff --git a/core/src/util/input_output.rs b/core/src/util/input_output.rsindex 1db8c7de..0af7dd73 100644--- a/core/src/util/input_output.rs+++ b/core/src/util/input_output.rs@@ -15,13 +15,11 @@// along with this program. If not, see <https://www.gnu.org/licenses/>.use std::env;-use std::net::IpAddr;use std::str::FromStr;use std::time::{Duration, SystemTime};use async_smtp::{ClientSecurity, ClientTlsParameters};use chrono::{DateTime, Utc};-use local_ip_address::{local_ip, Error as LocalIpError};use serde::{ser::SerializeMap, Deserialize, Serialize, Serializer};use crate::misc::{MiscDetails, MiscError};@@ -429,13 +427,11 @@ pub enum Reachable {}/// Details about the email verification used for debugging.-#[derive(Debug)]+#[derive(Debug, Deserialize, Serialize)]pub struct DebugDetails {/// The name of the server that performed the email verification./// It's generally passed as an environment variable RCH_BACKEND_NAME.pub server_name: String,- /// The IP address of the server that performed the email verification.- pub server_ip: Result<IpAddr, LocalIpError>,/// The time when the email verification started.pub start_time: DateTime<Utc>,/// The time when the email verification ended.@@ -444,27 +440,6 @@ pub struct DebugDetails {pub duration: Duration,}-impl Serialize for DebugDetails {- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>- where- S: Serializer,- {- let mut map = serializer.serialize_map(Some(4))?;- map.serialize_entry("start_time", &self.start_time)?;- map.serialize_entry("end_time", &self.end_time)?;- map.serialize_entry("duration", &self.duration)?;- map.serialize_entry(- "server_ip",- &match &self.server_ip {- Ok(ip) => ip.to_string(),- Err(e) => e.to_string(),- },- )?;- map.serialize_entry("server_name", &self.server_name)?;- map.end()- }-}-impl Default for DebugDetails {fn default() -> Self {Self {@@ -472,7 +447,6 @@ impl Default for DebugDetails {start_time: SystemTime::now().into(),end_time: SystemTime::now().into(),duration: Duration::default(),- server_ip: local_ip(),}}}