diff --git a/Cargo.lock b/Cargo.lock index 64591fbb8042..9a7264e7f43a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2241,6 +2241,7 @@ version = "0.0.0" dependencies = [ "byteorder", "hickory-resolver", + "log", "rustls", "tokio", "webpki-roots", diff --git a/mullvad-encrypted-dns-proxy/Cargo.toml b/mullvad-encrypted-dns-proxy/Cargo.toml index 682894350a11..7b97bdfa627e 100644 --- a/mullvad-encrypted-dns-proxy/Cargo.toml +++ b/mullvad-encrypted-dns-proxy/Cargo.toml @@ -12,6 +12,7 @@ workspace = true [dependencies] tokio = { workspace = true, features = [ "macros" ] } +log = { workspace = true } byteorder = "1" hickory-resolver = { version = "0.24.1", features = [ "dns-over-https-rustls" ]} webpki-roots = "0.25.0" diff --git a/mullvad-encrypted-dns-proxy/src/config/mod.rs b/mullvad-encrypted-dns-proxy/src/config/mod.rs index ddbc74834a9e..6d9a46dcdf49 100644 --- a/mullvad-encrypted-dns-proxy/src/config/mod.rs +++ b/mullvad-encrypted-dns-proxy/src/config/mod.rs @@ -65,7 +65,6 @@ pub struct AvailableProxies { pub xor: Vec, } - impl TryFrom> for AvailableProxies { type Error = Error; @@ -87,8 +86,13 @@ impl TryFrom> for AvailableProxies { .xor .push(Xor::try_from(ip).map_err(Error::InvalidXor)?); } + // V1 types are ignored and so are errors - Ok(ProxyType::XorV1) | Err(_) => continue, + Ok(ProxyType::XorV1) => continue, + + Err(ErrorUnknownType(unknown_proxy_type)) => { + log::error!("Unknown proxy type {unknown_proxy_type}"); + } } } if proxies.plain.is_empty() && proxies.xor.is_empty() {