dns over tcp

This commit is contained in:
ssrlive 2023-08-21 19:58:13 +08:00
parent 17566451cf
commit 89aeffe195
3 changed files with 40 additions and 0 deletions

View file

@ -40,6 +40,10 @@ struct Args {
/// Verbosity level
#[arg(short, long, value_name = "level", value_enum, default_value = "info")]
verbosity: ArgVerbosity,
/// DNS over TCP
#[arg(long)]
dns_over_tcp: bool,
}
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum)]
@ -79,6 +83,10 @@ fn main() -> ExitCode {
options = options.with_virtual_dns();
}
if args.dns_over_tcp {
options = options.with_dns_over_tcp();
}
let interface = match args.tun_fd {
None => NetworkInterface::Named(args.tun.clone()),
Some(fd) => {