Async TUN/TAP
Asynchronous allocation of TUN/TAP devices in Rust using async-std. Use tokio-tun for tokio version.
Getting Started
- Create a tun device using
TunBuilderand read from it in a loop:
async
- Run the code using
sudo:
- Set the address of device (address and netmask could also be set using
TunBuilder):
- Ping to read packets:
- Display devices and analyze the network traffic:
➜ ip tuntap
➜ sudo tshark -i <tun-name>
Supported Platforms
- Linux
- FreeBSD
- Android
- OSX
- iOS
- Windows