tun2proxy / rust-tun

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

better experience with different platforms #18

Closed szguoxz closed 5 months ago

szguoxz commented 5 months ago

for example, MacOS does not allow name the tun device. I configure it with a name. it failed creating the tun. remove the name, it works.

This is a great crate, I think it will be greater if we can finetune the creating process of every platform.

Also, you may want to add the default route for MacOS? This way, it's truly unified experience. At least, finetune this create to this direction?

It's just my thought.

xmh0511 commented 5 months ago

On macOS, the name of tun device must be the form utunxx where xx is number.

szguoxz commented 5 months ago

got it. I am just wondering how to make it easier for people does not know this information. I mean, raise compile time error when name is invalid. I have solved my problem, I am sure people will encounter the same problem again, I mean, some body simply want to port his app from windows/linux to MacOS. and expect it to just work. :-)

xmh0511 commented 5 months ago

Also, you may want to add the default route for MacOS?

Fixed by https://github.com/ssrlive/rust-tun/pull/40