mirror of
https://github.com/dndx/phantun.git
synced 2025-01-18 13:59:30 +08:00
fix(phantun): fix tokio-tun
incompatiable API change
This commit is contained in:
parent
f436325d23
commit
62f0278c1a
@ -156,7 +156,8 @@ async fn main() -> io::Result<()> {
|
|||||||
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
||||||
.address(tun_local)
|
.address(tun_local)
|
||||||
.destination(tun_peer)
|
.destination(tun_peer)
|
||||||
.try_build_mq(num_cpus)
|
.queues(num_cpus)
|
||||||
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
if remote_addr.is_ipv6() {
|
if remote_addr.is_ipv6() {
|
||||||
|
@ -155,7 +155,8 @@ async fn main() -> io::Result<()> {
|
|||||||
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
.up() // or set it up manually using `sudo ip link set <tun-name> up`.
|
||||||
.address(tun_local)
|
.address(tun_local)
|
||||||
.destination(tun_peer)
|
.destination(tun_peer)
|
||||||
.try_build_mq(num_cpus)
|
.queues(num_cpus)
|
||||||
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
if let (Some(tun_local6), Some(tun_peer6)) = (tun_local6, tun_peer6) {
|
if let (Some(tun_local6), Some(tun_peer6)) = (tun_local6, tun_peer6) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user