global buf size mtu based config and protocol rename
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@ use crate::{
|
||||
net::engine::{EngineBuilder, EngineConfig},
|
||||
tun::routing::reset_platform_routing,
|
||||
};
|
||||
use netrunner_core::proxy::connection::connection::ConnectionRole;
|
||||
use netrunner_core::proxy::network::Network;
|
||||
use netrunner_core::net::connection::connection::ConnectionRole;
|
||||
use netrunner_core::net::network::Network;
|
||||
use netrunner_logger::{error, info};
|
||||
use std::sync::{Arc, OnceLock};
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ use crate::tun::{routing::reset_platform_routing, tun::Tun};
|
||||
use net::engine::{EngineBuilder, EngineConfig};
|
||||
|
||||
// Импортируем компоненты локального прокси
|
||||
use netrunner_core::proxy::connection::connection::ConnectionRole;
|
||||
use netrunner_core::proxy::network::Network;
|
||||
use netrunner_core::net::connection::connection::ConnectionRole;
|
||||
use netrunner_core::net::network::Network;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
#[tokio::main]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::net::CHANNEL_CAPACITY;
|
||||
use bytes::{Buf, Bytes, BytesMut};
|
||||
use netrunner_core::net::network::NetworkConfig;
|
||||
use smoltcp::{
|
||||
iface::SocketHandle,
|
||||
socket::{tcp, udp},
|
||||
@@ -28,8 +28,10 @@ pub struct ConnectionCore {
|
||||
impl ConnectionCore {
|
||||
pub fn new(handle: SocketHandle) -> (Self, mpsc::Receiver<Bytes>, mpsc::Sender<Bytes>) {
|
||||
trace!(%handle, "Creating ConnectionCore channels");
|
||||
let (tx_to_net, rx_from_smol) = mpsc::channel::<Bytes>(CHANNEL_CAPACITY);
|
||||
let (tx_to_smol, rx_from_net) = mpsc::channel::<Bytes>(CHANNEL_CAPACITY);
|
||||
let (tx_to_net, rx_from_smol) =
|
||||
mpsc::channel::<Bytes>(NetworkConfig::global().channel_capacity);
|
||||
let (tx_to_smol, rx_from_net) =
|
||||
mpsc::channel::<Bytes>(NetworkConfig::global().channel_capacity);
|
||||
|
||||
let core = Self {
|
||||
handle,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use bytes::Bytes;
|
||||
use netrunner_core::protocol::codec::socks::TargetAddress;
|
||||
use netrunner_core::nrxp::codec::socks::TargetAddress;
|
||||
use netrunner_logger::{debug, error, info, trace, warn};
|
||||
use smoltcp::{
|
||||
iface::{SocketHandle, SocketSet},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use netrunner_core::proxy::connection::connection::ClientHandler;
|
||||
use netrunner_core::proxy::connection::muxer::Muxer;
|
||||
use netrunner_core::net::connection::connection::ClientHandler;
|
||||
use netrunner_core::net::connection::muxer::Muxer;
|
||||
use smoltcp::iface::PollResult;
|
||||
use smoltcp::time::Instant;
|
||||
use smoltcp::wire::{IpAddress, IpCidr};
|
||||
|
||||
@@ -3,5 +3,3 @@ pub mod connection_manager;
|
||||
pub mod dns;
|
||||
pub mod engine;
|
||||
pub mod ip_store;
|
||||
|
||||
pub const CHANNEL_CAPACITY: usize = 16;
|
||||
|
||||
Reference in New Issue
Block a user