diff --git a/src/main.rs b/src/main.rs index dc7c10e..d2bdf16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -459,11 +459,16 @@ fn parse_tunnel_dest(remaining: &str) -> Result<(Host, u16, BTreeMap remote_port, + // the url lib does not parse the port if it is the default one + None if remaining.ends_with(":443") => 443, + _ => { + return Err(Error::new( + ErrorKind::InvalidInput, + format!("cannot parse remote port from {}", remaining), + )) + } }; let options: BTreeMap = remote.query_pairs().into_owned().collect();