-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to route all traffic to a specified tun device by using this library? #8
Comments
You might first want to determine the ifindex since the library doesn't currently support specifying interfaces by name #7, for example with this function: https://www.man7.org/linux/man-pages/man3/if_nametoindex.3.html let tun_ifindex: u32 = 3;
let handle = Handle::new()?;
let route = Route::new("0.0.0.0".parse().unwrap(), 0).with_ifindex(tun_ifindex);
handle.add(&route).await |
Thanks. Does |
@johnyburd
|
yes I'm not able to tell what's wrong in the snipped you posted from macos. I would need a minimum reproduction of the error and perhaps a dump of your routing table. |
It's here #15 (comment) |
Closing in favor of #7 |
How do I achieve this target by using this crate? Honestly, the documentation is lack, I don't know how to do.
The text was updated successfully, but these errors were encountered: