meh / rust-tun

TUN device creation and handling.
340 stars 133 forks source link

fix(macOS): sc_unit should be the number in name + 1 #61

Closed zonyitoo closed 9 months ago

zonyitoo commented 1 year ago

Current implementation, if you set utun10 in name, then the actual utun device name is utun9. If the name is set to utun0, then it actually tells the kernel to dynamically allocate a free id for it.

ref https://github.com/shadowsocks/shadowsocks-rust/issues/1176