mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-10 06:34:03 -04:00
Implement event-based UDP interface
This commit is contained in:
parent
51788c9557
commit
abd9df6be4
7 changed files with 218 additions and 50 deletions
|
@ -72,8 +72,8 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
// Start TCP Virtual Interface
|
||||
let port_forwards = config.port_forwards.clone();
|
||||
let iface = TcpVirtualInterface::new(port_forwards, bus, device, config.source_peer_ip);
|
||||
tokio::spawn(async move { iface.poll_loop().await });
|
||||
let iface = TcpVirtualInterface::new(port_forwards, bus, config.source_peer_ip);
|
||||
tokio::spawn(async move { iface.poll_loop(device).await });
|
||||
}
|
||||
|
||||
if config
|
||||
|
@ -88,8 +88,8 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
// Start UDP Virtual Interface
|
||||
let port_forwards = config.port_forwards.clone();
|
||||
let iface = UdpVirtualInterface::new(port_forwards, bus, device, config.source_peer_ip);
|
||||
tokio::spawn(async move { iface.poll_loop().await });
|
||||
let iface = UdpVirtualInterface::new(port_forwards, bus, config.source_peer_ip);
|
||||
tokio::spawn(async move { iface.poll_loop(device).await });
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue