We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
os: macos m1
let mut tun_config = tun::Configuration::default(); tun_config.address((10, 0, 0, 1)).netmask((255, 255, 255, 0)).up();
# netstat -nr -f inet Routing tables Internet: Destination Gateway Flags Netif Expire 10.0.0.255 10.0.0.1 UH utun14
let mut tun_config = tun::Configuration::default(); tun_config.address((10, 0, 1, 1)).netmask((255, 255, 255, 0)).up();
# netstat -nr -f inet Routing tables Internet: Destination Gateway Flags Netif Expire 10.0.0.255 10.0.1.1 UH utun14
I think corret route table is 10.0.1.255, but it's not change.
The text was updated successfully, but these errors were encountered:
Hi @flyzxt!
For the destination to change, you must call the destination() setter with the desired address on the tun_config:
destination()
tun_config
tun_config .address((10, 0, 1, 1)) .destination((10, 0, 1, 255)) .netmask((255, 255, 255, 0)) .up();
Be wary of this on Windows, however, as it override the default gateway.
Sorry, something went wrong.
No branches or pull requests
os: macos m1
when use default code to create tun device, system route table like blow:
change address in code, and re run
I think corret route table is 10.0.1.255, but it's not change.
The text was updated successfully, but these errors were encountered: