--dns-addr option

This commit is contained in:
ssrlive 2023-08-31 15:59:07 +08:00
parent bbb8d3b244
commit 0044756f78
4 changed files with 28 additions and 15 deletions

View file

@ -100,6 +100,7 @@ pub struct Options {
virtual_dns: Option<virtdns::VirtualDns>,
mtu: Option<usize>,
dns_over_tcp: bool,
dns_addr: Option<std::net::IpAddr>,
ipv6_enabled: bool,
}
@ -120,6 +121,11 @@ impl Options {
self
}
pub fn with_dns_addr(mut self, addr: Option<std::net::IpAddr>) -> Self {
self.dns_addr = addr;
self
}
pub fn with_ipv6_enabled(mut self) -> Self {
self.ipv6_enabled = true;
self