support option proxy url

This commit is contained in:
lulin 2024-11-19 17:14:37 +08:00
parent 32507fd45d
commit 9366de3d06

View File

@ -103,8 +103,7 @@ async fn connect_to(url: &str, proxy: Option<&str>) -> anyhow::Result<tokio::net
Ok(ac)
} else {
let port = url.port_or_known_default().unwrap();
let ac = tokio::net::TcpStream::connect((url.host().unwrap().to_string(), port))
.await?;
let ac = tokio::net::TcpStream::connect((url.host().unwrap().to_string(), port)).await?;
Ok(ac)
}
}