tun2proxy / rust-tun

TUN device creation and handling.
https://docs.rs/tun2/
30 stars 12 forks source link

examples: ping-tun #81

Open kwsc98 opened 1 week ago

kwsc98 commented 1 week ago

test ping-tun script,Will take effect randomly,some time use ping not work, but Restart script It will work config

    config
        .address((10, 0, 0, 2))
        .netmask((255, 255, 0, 0))
        .destination((10, 0, 0, 1))
        .up();
kwsc98 commented 1 week ago

[2024-06-23T12:44:41Z INFO tun2::platform::macos::device] route -n add -net 10.0.0.2/16 10.0.0.1 macos