From 36360319ce321a8d03d3dcc003aae241f7618dee Mon Sep 17 00:00:00 2001 From: Giang Minh Date: Sat, 28 Sep 2024 17:44:32 +0700 Subject: [PATCH] fix typos --- crates/protocol/src/stream.rs | 2 +- crates/relayer/src/lib.rs | 2 +- crates/relayer/src/proxy_listener.rs | 4 ++-- crates/relayer/src/proxy_listener/cluster.rs | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/protocol/src/stream.rs b/crates/protocol/src/stream.rs index a3feb58..09184b1 100644 --- a/crates/protocol/src/stream.rs +++ b/crates/protocol/src/stream.rs @@ -179,7 +179,7 @@ where Poll::Pending => {} } } else if copy_buffer.is_lock_write() { - // we finish then switch to ShutingDonw + // we finish then switch to ShuttingDown log::info!( "[OneDirectCopy {} => {}] write finished after {} bytes => switch to ShuttingDown state", from.name(), diff --git a/crates/relayer/src/lib.rs b/crates/relayer/src/lib.rs index f5df365..6eefa18 100644 --- a/crates/relayer/src/lib.rs +++ b/crates/relayer/src/lib.rs @@ -55,7 +55,7 @@ pub use proxy_listener::cluster::{ }; pub use quinn; -pub use proxy_listener::cluster::{run_sdn, ProxyClusterIncommingTunnel, ProxyClusterListener}; +pub use proxy_listener::cluster::{run_sdn, ProxyClusterIncomingTunnel, ProxyClusterListener}; pub use proxy_listener::tcp::{ProxyTcpListener, ProxyTcpTunnel}; pub use proxy_listener::{ProxyListener, ProxyTunnel}; diff --git a/crates/relayer/src/proxy_listener.rs b/crates/relayer/src/proxy_listener.rs index e98e54a..ee4523c 100644 --- a/crates/relayer/src/proxy_listener.rs +++ b/crates/relayer/src/proxy_listener.rs @@ -7,7 +7,7 @@ use futures::{AsyncRead, AsyncWrite}; use protocol::stream::NamedStream; use tcp::ProxyTcpTunnel; -use crate::ProxyClusterIncommingTunnel; +use crate::ProxyClusterIncomingTunnel; pub mod cluster; pub mod tcp; @@ -35,7 +35,7 @@ pub trait ProxyListener: Send + Sync { #[derive(From)] pub enum ProxyTunnelWrap { Tcp(ProxyTcpTunnel), - Cluster(ProxyClusterIncommingTunnel), + Cluster(ProxyClusterIncomingTunnel), } impl ProxyTunnel for ProxyTunnelWrap { diff --git a/crates/relayer/src/proxy_listener/cluster.rs b/crates/relayer/src/proxy_listener/cluster.rs index 9a15704..fe80b80 100644 --- a/crates/relayer/src/proxy_listener/cluster.rs +++ b/crates/relayer/src/proxy_listener/cluster.rs @@ -225,11 +225,11 @@ impl ProxyClusterListener { } impl ProxyListener for ProxyClusterListener { - type Stream = ProxyClusterIncommingTunnel; + type Stream = ProxyClusterIncomingTunnel; async fn recv(&mut self) -> Option { let connecting = self.server.accept().await?; log::info!("incoming connection from {}", connecting.remote_address()); - Some(ProxyClusterIncommingTunnel { + Some(ProxyClusterIncomingTunnel { virtual_addr: connecting.remote_address(), domain: "".to_string(), handshake: vec![], @@ -241,7 +241,7 @@ impl ProxyListener for ProxyClusterListener { } } -pub struct ProxyClusterIncommingTunnel { +pub struct ProxyClusterIncomingTunnel { virtual_addr: SocketAddr, domain: String, handshake: Vec, @@ -251,7 +251,7 @@ pub struct ProxyClusterIncommingTunnel { wait_stream_write: Option, } -impl ProxyTunnel for ProxyClusterIncommingTunnel { +impl ProxyTunnel for ProxyClusterIncomingTunnel { fn source_addr(&self) -> String { format!("sdn-quic://{}", self.virtual_addr) } @@ -298,13 +298,13 @@ impl ProxyTunnel for ProxyClusterIncommingTunnel { } } -impl NamedStream for ProxyClusterIncommingTunnel { +impl NamedStream for ProxyClusterIncomingTunnel { fn name(&self) -> &'static str { "proxy-sdn-quic-tunnel" } } -impl AsyncRead for ProxyClusterIncommingTunnel { +impl AsyncRead for ProxyClusterIncomingTunnel { fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, @@ -329,7 +329,7 @@ impl AsyncRead for ProxyClusterIncommingTunnel { } } -impl AsyncWrite for ProxyClusterIncommingTunnel { +impl AsyncWrite for ProxyClusterIncomingTunnel { fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>,