mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-21 16:41:01 +00:00
dns over tcp
This commit is contained in:
parent
17566451cf
commit
89aeffe195
3 changed files with 40 additions and 0 deletions
|
@ -98,6 +98,7 @@ impl std::fmt::Display for ProxyType {
|
|||
pub struct Options {
|
||||
virtual_dns: Option<virtdns::VirtualDns>,
|
||||
mtu: Option<usize>,
|
||||
dns_over_tcp: bool,
|
||||
}
|
||||
|
||||
impl Options {
|
||||
|
@ -107,6 +108,13 @@ impl Options {
|
|||
|
||||
pub fn with_virtual_dns(mut self) -> Self {
|
||||
self.virtual_dns = Some(virtdns::VirtualDns::new());
|
||||
self.dns_over_tcp = false;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_dns_over_tcp(mut self) -> Self {
|
||||
self.dns_over_tcp = true;
|
||||
self.virtual_dns = None;
|
||||
self
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue