From 62f0278c1afa2d11b44ea34cd9863cde3f6662f0 Mon Sep 17 00:00:00 2001 From: Datong Sun Date: Thu, 2 Jan 2025 05:50:41 -0800 Subject: [PATCH] fix(phantun): fix `tokio-tun` incompatiable API change --- phantun/src/bin/client.rs | 3 ++- phantun/src/bin/server.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/phantun/src/bin/client.rs b/phantun/src/bin/client.rs index e0c4875..2219953 100644 --- a/phantun/src/bin/client.rs +++ b/phantun/src/bin/client.rs @@ -156,7 +156,8 @@ async fn main() -> io::Result<()> { .up() // or set it up manually using `sudo ip link set up`. .address(tun_local) .destination(tun_peer) - .try_build_mq(num_cpus) + .queues(num_cpus) + .build() .unwrap(); if remote_addr.is_ipv6() { diff --git a/phantun/src/bin/server.rs b/phantun/src/bin/server.rs index 5f33f39..5160d0e 100644 --- a/phantun/src/bin/server.rs +++ b/phantun/src/bin/server.rs @@ -155,7 +155,8 @@ async fn main() -> io::Result<()> { .up() // or set it up manually using `sudo ip link set up`. .address(tun_local) .destination(tun_peer) - .try_build_mq(num_cpus) + .queues(num_cpus) + .build() .unwrap(); if let (Some(tun_local6), Some(tun_peer6)) = (tun_local6, tun_peer6) {