modules encapsulate from each other

This commit is contained in:
2026-03-26 13:19:59 +07:00
parent cb837c08f2
commit c51c086fbc
27 changed files with 194 additions and 175 deletions
+1 -1
View File
@@ -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;
+5 -9
View File
@@ -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(
+1 -1
View File
@@ -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 {
+1 -2
View File
@@ -11,8 +11,7 @@ use crate::{
network::NetworkConfig,
},
nrxp::{
frame::{Frame, FrameType},
socks::SocksReply,
SocksReply, {Frame, FrameType},
},
};
+1 -1
View File
@@ -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,