Add: verbose for dns leak iface picking process
This commit is contained in:
@@ -265,6 +265,7 @@ fn select_interface(
|
||||
) -> Result<(datalink::NetworkInterface, Box<dyn datalink::DataLinkReceiver>), DnsLeakError> {
|
||||
let interfaces = datalink::interfaces();
|
||||
if let Some(name) = name {
|
||||
debug!("dns leak iface pick: requested={name}");
|
||||
let iface = interfaces
|
||||
.iter()
|
||||
.find(|iface| iface.name == name)
|
||||
@@ -284,12 +285,14 @@ fn select_interface(
|
||||
}
|
||||
|
||||
if let Some(iface) = pick_stable_iface(&interfaces) {
|
||||
debug!("dns leak iface pick: stable={}", iface.name);
|
||||
if let Ok(channel) = open_channel_with_timeout(iface, config) {
|
||||
return Ok(channel);
|
||||
}
|
||||
}
|
||||
|
||||
for iface in interfaces.iter() {
|
||||
debug!("dns leak iface pick: try={}", iface.name);
|
||||
if let Ok(channel) = open_channel_with_timeout(iface.clone(), config) {
|
||||
return Ok(channel);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ This document tracks the current DNS leak detector implementation against the de
|
||||
- Interface selection:
|
||||
- per-interface open timeout to avoid capture hangs
|
||||
- stable default pick (up, non-loopback, named ethernet/wlan) before fallback scan
|
||||
- verbose logging of interface selection attempts (use `-v` / `-vv`)
|
||||
|
||||
## Partially implemented
|
||||
- Route/interface classification: heuristic only (loopback/tunnel/physical by iface name).
|
||||
|
||||
Reference in New Issue
Block a user