debug: dns proxy

This commit is contained in:
Ishan Jain 2023-12-12 05:00:07 +05:30
parent cc03bf0996
commit b304a38ee5
Signed by: ishan
GPG Key ID: 0506DB2A1CC75C27

View File

@ -67,6 +67,7 @@ fn main() {
} }
} }
println!("{:?}", upstream_packets);
recv_packet.answers = upstream_packets recv_packet.answers = upstream_packets
.into_iter() .into_iter()
.filter(|x| x.is_some()) .filter(|x| x.is_some())
@ -75,11 +76,12 @@ fn main() {
if packet.answers.is_empty() { if packet.answers.is_empty() {
return None; return None;
} }
Some(packet.answers[0].clone()) Some(packet.answers.clone())
} else { } else {
None None
} }
}) })
.flatten()
.collect(); .collect();
let mut response = vec![]; let mut response = vec![];