Expand description
§VCL DNS Leak Protection
Prevents DNS queries from leaking outside the VCL tunnel.
§The problem
Without DNS protection:
App → DNS query → OS resolver → ISP DNS → LEAK!
App → data → VCL tunnel → OK
With DNS protection:
App → DNS query → VCLDnsFilter → VCL tunnel → private DNS → OK
App → data → VCL tunnel → OK§Example
use vcl_protocol::dns::{DnsConfig, DnsFilter, DnsPacket};
let config = DnsConfig::default();
let mut filter = DnsFilter::new(config);
// Check if a UDP packet is a DNS query that should be intercepted
let raw = vec![0u8; 12]; // minimal DNS header
if DnsFilter::is_dns_packet(&raw) {
// route through tunnel instead of OS resolver
}
println!("Upstream DNS: {:?}", filter.config().upstream_servers);Structs§
- DnsConfig
- Configuration for DNS leak protection.
- DnsFilter
- DNS leak protection filter.
- DnsPacket
- A parsed DNS packet (header + first question only).
Enums§
- DnsAction
- Action to take for a DNS query.
- DnsQuery
Type - DNS query type.
Constants§
- CLOUDFLARE_
DNS - Well-known privacy-respecting DNS servers.
- CLOUDFLARE_
DNS2 - GOOGLE_
DNS - GOOGLE_
DNS2 - QUAD9_
DNS