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

@@ -28,6 +28,12 @@ pub mod wireguard;
#[cfg(feature = "quic")]
pub mod quic;
#[cfg(feature = "websocket")]
pub mod websocket;
#[cfg(any(feature = "quic", feature = "websocket"))]
pub mod insecure_tls;
#[derive(thiserror::Error, Debug)]
pub enum TunnelError {
#[error("io error")]
@@ -62,6 +68,10 @@ pub enum TunnelError {
#[error("no dns record found")]
NoDnsRecordFound(IpVersion),
#[cfg(feature = "websocket")]
#[error("websocket error: {0}")]
WebSocketError(#[from] tokio_websockets::Error),
#[error("tunnel error: {0}")]
TunError(String),
}