introduce websocket tunnel

This commit is contained in:
sijie.sun
2024-05-11 22:46:23 +08:00
committed by Sijie.Sun
parent a5637003ad
commit 1b1d76de99
12 changed files with 647 additions and 110 deletions

View File

@@ -105,6 +105,11 @@ pub async fn create_connector_by_url(
.await;
return Ok(Box::new(connector));
}
#[cfg(feature = "websocket")]
"ws" | "wss" => {
let connector = crate::tunnel::websocket::WSTunnelConnector::new(url);
return Ok(Box::new(connector));
}
_ => {
return Err(Error::InvalidUrl(url.into()));
}