support option proxy url
This commit is contained in:
parent
32507fd45d
commit
9366de3d06
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user