maybe working channels size

This commit is contained in:
2026-03-21 20:43:23 +07:00
parent e39fa755db
commit af5ab22712
7 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
use crate::protocol::codec::frame::FrameType;
use crate::proxy::connection::connection::BUF_SIZE;
use crate::proxy::connection::muxer::{MuxMessage, Muxer};
use crate::proxy::connection::BUF_SIZE;
use bytes::{Bytes, BytesMut};
use netrunner_logger::{debug, error};
use tokio::net::UdpSocket;
+2 -4
View File
@@ -13,6 +13,7 @@ use crate::{
engine::TunnelEngine,
handler::StreamHandler,
muxer::{MuxMessage, Muxer},
BUF_SIZE, CHANNEL_SIZE,
},
tlseng::profile::BrowserProfile,
};
@@ -28,9 +29,6 @@ use tokio::{
};
use tokio_util::sync::CancellationToken;
pub const BUF_SIZE: usize = 65536;
pub const CHANNEL_SIZE: usize = 256;
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ConnectionRole {
Client,
@@ -205,7 +203,7 @@ impl TunnelHandler for ClientHandler {
target,
} => {
let stream_id = self.muxer.next_id();
let (v_tx, mut v_rx) = mpsc::channel::<bytes::Bytes>(1024);
let (v_tx, mut v_rx) = mpsc::channel::<bytes::Bytes>(BUF_SIZE);
self.muxer.register_stream(stream_id, v_tx);
self.muxer
+3
View File
@@ -3,3 +3,6 @@ pub mod connection;
pub mod engine;
pub mod handler;
pub mod muxer;
pub const BUF_SIZE: usize = 65536;
pub const CHANNEL_SIZE: usize = 16;