diff --git a/boltconn/src/network/dns/dns.rs b/boltconn/src/network/dns/dns.rs index e40d401..cdd84a7 100644 --- a/boltconn/src/network/dns/dns.rs +++ b/boltconn/src/network/dns/dns.rs @@ -275,7 +275,7 @@ impl GenericDns

{ resp.add_answer(ans); Ok(resp.to_vec()?) } - RecordType::AAAA => Ok(resp.to_vec()?), + RecordType::AAAA | RecordType::PTR => Ok(resp.to_vec()?), _ => err, } } diff --git a/boltconn/src/platform/sys/windows_sys.rs b/boltconn/src/platform/sys/windows_sys.rs index 0841d94..911bc1a 100644 --- a/boltconn/src/platform/sys/windows_sys.rs +++ b/boltconn/src/platform/sys/windows_sys.rs @@ -82,7 +82,7 @@ pub struct SystemDnsHandle { } impl SystemDnsHandle { - pub fn new(dns_addr: Ipv4Addr, _tun_name: &str, outbound_name: &str) -> io::Result { + pub fn new(dns_addr: Ipv4Addr, tun_name: &str, outbound_name: &str) -> io::Result { // From https://github.com/dandyvica/resolver/blob/main/src/lib.rs let mut list: Vec = Vec::new(); @@ -120,7 +120,7 @@ impl SystemDnsHandle { let iface_index = (*p).Ipv6IfIndex; // skip non-outbound interfaces - if !(iface_name == outbound_name) { + if iface_name != outbound_name && iface_name != tun_name { p = (*p).Next; continue; }