mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 17:38:32 -04:00
Move TCP tunneling code to separate module
This commit is contained in:
parent
c2d0b9719a
commit
703f261344
5 changed files with 230 additions and 217 deletions
|
@ -9,10 +9,10 @@ use tokio::net::UdpSocket;
|
|||
use tokio::sync::RwLock;
|
||||
|
||||
use crate::config::Config;
|
||||
use crate::MAX_PACKET;
|
||||
|
||||
/// The capacity of the channel for received IP packets.
|
||||
const DISPATCH_CAPACITY: usize = 1_000;
|
||||
const MAX_PACKET: usize = 65536;
|
||||
|
||||
/// A WireGuard tunnel. Encapsulates and decapsulates IP packets
|
||||
/// to be sent to and received from a remote UDP endpoint.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue