mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 17:38:32 -04:00
Allow configuration of max transmission unit
This commit is contained in:
parent
81264916e5
commit
23af49dde5
3 changed files with 20 additions and 4 deletions
|
@ -30,6 +30,8 @@ pub struct WireGuardTunnel {
|
|||
virtual_port_ip_tx: dashmap::DashMap<VirtualPort, tokio::sync::mpsc::Sender<Vec<u8>>>,
|
||||
/// IP packet dispatcher for unroutable packets. `None` if not initialized.
|
||||
sink_ip_tx: RwLock<Option<tokio::sync::mpsc::Sender<Vec<u8>>>>,
|
||||
/// The max transmission unit for WireGuard.
|
||||
pub(crate) max_transmission_unit: usize,
|
||||
}
|
||||
|
||||
impl WireGuardTunnel {
|
||||
|
@ -50,6 +52,7 @@ impl WireGuardTunnel {
|
|||
endpoint,
|
||||
virtual_port_ip_tx,
|
||||
sink_ip_tx: RwLock::new(None),
|
||||
max_transmission_unit: config.max_transmission_unit,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue