Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xmh0511 authored Nov 27, 2024
1 parent 6343c9d commit 5610426
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tun/Tap interfaces
![tun-rs](https://docs.rs/tun-rs/badge.svg)
![Apache-2.0](https://img.shields.io/github/license/xmh0511/tun-rs?style=flat)

This crate allows the creation and usage of Tun/Tap interfaces(**supporting both Ipv4 and ipv6**), the aim is to make this cross-platform.
This crate allows the creation and usage of Tun/Tap interfaces(**supporting both Ipv4 and ipv6**), aiming to make this cross-platform.


Usage
Expand Down Expand Up @@ -84,6 +84,17 @@ async fn main(mut quit: Receiver<()>) -> Result<(), BoxError> {
}
````

**Offload** is supported on the Linux platform, enable it via the config
````rust
#[cfg(target_os = "linux")]
config
.platform_config(|config| {
config.offload(true);
});
````
1. [Synchronous example](https://github.com/xmh0511/tun-rs/blob/main/examples/read-offload.rs)
2. [Asynchronous example](https://github.com/xmh0511/tun-rs/blob/main/examples/ping-tun-offload-tokio.rs)

Platforms
=========
## Supported Platforms
Expand Down

0 comments on commit 5610426

Please sign in to comment.