Add -n flag

This commit is contained in:
reykfloeter 2019-12-01 02:07:16 +00:00
parent 293d9fbbb0
commit 60a0a3a081

View file

@ -124,6 +124,9 @@ async fn main() {
let addr: SocketAddr = address.parse().unwrap(); let addr: SocketAddr = address.parse().unwrap();
config.address = Some(addr); config.address = Some(addr);
} }
if let Some(servername) = matches.opt_str("n") {
config.servername = Some(servername);
}
let addr = match config.address { let addr = match config.address {
Some(SocketAddr::V6(addr)) => addr.clone(), Some(SocketAddr::V6(addr)) => addr.clone(),