diff --git a/Cargo.lock b/Cargo.lock index db2edce..6afa17e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2242,7 +2242,7 @@ dependencies = [ [[package]] name = "wstunnel" -version = "8.5.2" +version = "8.5.3" dependencies = [ "ahash", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index c183050..100eba9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wstunnel" -version = "8.5.2" +version = "8.5.3" edition = "2021" repository = "https://github.com/erebe/wstunnel.git" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/tunnel/client.rs b/src/tunnel/client.rs index 434330b..808718e 100644 --- a/src/tunnel/client.rs +++ b/src/tunnel/client.rs @@ -179,7 +179,7 @@ where .and_then(|h| h.to_str().ok()) .and_then(|h| base64::engine::general_purpose::STANDARD.decode(h).ok()) .and_then(|h| Url::parse(&String::from_utf8_lossy(&h)).ok()) - .and_then(|url| match (url.host(), url.port()) { + .and_then(|url| match (url.host(), url.port_or_known_default()) { (Some(h), Some(p)) => Some((h.to_owned(), p)), _ => None, })