modules encapsulate from each other
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::net::connection::muxer::{MuxMessage, Muxer};
|
||||
use crate::net::network::NetworkConfig;
|
||||
use crate::nrxp::frame::FrameType;
|
||||
use crate::nrxp::FrameType;
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use netrunner_logger::{debug, error};
|
||||
use tokio::net::UdpSocket;
|
||||
|
||||
@@ -6,13 +6,10 @@ use crate::{
|
||||
network::NetworkConfig,
|
||||
},
|
||||
nrxp::{
|
||||
codec::Codec,
|
||||
errors::ErrorAction,
|
||||
frame::FrameType,
|
||||
socks::{SocksReply, SocksRequest},
|
||||
Codec, ErrorAction, FrameType, {SocksReply, SocksRequest},
|
||||
},
|
||||
parser::Parser,
|
||||
tlseng::profile::BrowserProfile,
|
||||
tlseng::BrowserProfile,
|
||||
};
|
||||
use bytes::BytesMut;
|
||||
use netrunner_logger::{info, warn};
|
||||
@@ -93,8 +90,8 @@ impl Connection {
|
||||
}
|
||||
|
||||
pub struct ClientHandler {
|
||||
pub conn: Connection,
|
||||
pub muxer: Muxer,
|
||||
pub(crate) conn: Connection,
|
||||
pub(crate) muxer: Muxer,
|
||||
}
|
||||
|
||||
impl ClientHandler {
|
||||
@@ -249,8 +246,7 @@ impl TunnelHandler for ClientHandler {
|
||||
}
|
||||
|
||||
pub struct ServerHandler {
|
||||
pub conn: Connection,
|
||||
pub token: CancellationToken,
|
||||
pub(crate) conn: Connection,
|
||||
}
|
||||
impl ServerHandler {
|
||||
async fn handle_stealth_fallback(
|
||||
|
||||
@@ -11,7 +11,7 @@ use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::{
|
||||
net::connection::{handler::StreamHandler, muxer::MuxMessage},
|
||||
nrxp::{codec::Codec, errors::ErrorAction, frame::FrameType},
|
||||
nrxp::{Codec, ErrorAction, FrameType},
|
||||
};
|
||||
|
||||
pub(crate) struct TunnelEngine {
|
||||
|
||||
@@ -11,8 +11,7 @@ use crate::{
|
||||
network::NetworkConfig,
|
||||
},
|
||||
nrxp::{
|
||||
frame::{Frame, FrameType},
|
||||
socks::SocksReply,
|
||||
SocksReply, {Frame, FrameType},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use std::sync::atomic::{AtomicU32, Ordering};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc::{error::SendError, Sender};
|
||||
|
||||
use crate::nrxp::frame::FrameType;
|
||||
use crate::nrxp::FrameType;
|
||||
|
||||
struct IdGenerator {
|
||||
counter: AtomicU32,
|
||||
|
||||
Reference in New Issue
Block a user