add ability to send protocol extension packets

This commit is contained in:
Toshit Chawda 2024-04-16 21:57:27 -07:00
parent fd94f1245a
commit 6c41c54cf9
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 84 additions and 33 deletions

View file

@ -164,7 +164,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
extensions.push(Box::new(auth));
}
let (mut mux, fut) = if opts.wisp_v1 {
let (mux, fut) = if opts.wisp_v1 {
ClientMux::new(rx, tx, None).await?
} else {
ClientMux::new(rx, tx, Some(extensions.as_slice())).await?
@ -212,7 +212,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
let start_time = Instant::now();
for _ in 0..opts.streams {
let (mut cr, mut cw) = mux
let (cr, cw) = mux
.client_new_stream(StreamType::Tcp, addr_dest.clone(), addr_dest_port)
.await?
.into_split();