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)
|
Ok(ac)
|
||||||
} else {
|
} else {
|
||||||
let port = url.port_or_known_default().unwrap();
|
let port = url.port_or_known_default().unwrap();
|
||||||
let ac = tokio::net::TcpStream::connect((url.host().unwrap().to_string(), port))
|
let ac = tokio::net::TcpStream::connect((url.host().unwrap().to_string(), port)).await?;
|
||||||
.await?;
|
|
||||||
Ok(ac)
|
Ok(ac)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user