meh / rust-tun

TUN device creation and handling.
343 stars 136 forks source link

Windows support #27

Open omar391 opened 3 years ago

omar391 commented 3 years ago

Any plan or timeline to support windows platform?

meh commented 3 years ago

Nope, I haven't really used Windows since Windows XP.

Pull requests welcome tho :panda_face:

NN-Binary commented 3 years ago

That would be such a great addition, I think most users can't implement this crate yet because of Windows non supported

zonyitoo commented 3 years ago

Maybe we could support it by wintun.

zonyitoo commented 3 years ago

Here is a proposal about supporting Windows with wintun. cc @iamwwc if you are interested.

Wintun is a good Tun driver on Windows designed for working in WireGuard.

  1. Add a new unix module that wraps all android, ios, linux, macos, posix, and then make a new windows module in the platform.
  2. Configuration on Windows will have optional fields wintun_library_path, wintun_pool
  3. Create a Device that contains Adapter and Session
  4. For AsyncDevice, starts 2 async tasks with spawn_blocking and then all reads and writes will send and recv from channels to those tasks.

Some problems for discussion:

  1. Should we keep the wintun as a singleton?
  2. How to support multiple interfaces (adapters) within the same "pool"?
  3. Should we support multiple "session"?
mokhtarabadi commented 1 year ago

Any news?

amyipdev commented 1 year ago

Bumping this since I think it could be really useful, I'm working on https://github.com/amyipdev/acc, after I found out pcap wouldn't work and I needed TUN, wintun support would be great.

mokhtarabadi commented 1 year ago

take a look at https://github.com/afula/tun2ostrich/tree/master/win_tun

amyipdev commented 1 year ago

@mokhtarabadi i was gonna use that, but tun2ostrich has now been removed from github...

omar391 commented 1 year ago

@amyipdev this one: https://github.com/lemos1235/tun2ostrich ?

amyipdev commented 1 year ago

@omar391 thanks

M0dEx commented 1 year ago

Any updates?

I could really use Windows support in my project Quincy.

I would love to help with anything I can to get this done in the next couple of weeks.

mokhtarabadi commented 1 year ago

@YosefUT can you help to add support for windows?

xmh0511 commented 11 months ago

Any news?

M0dEx commented 10 months ago

This can be closed now, as Windows support has been added, correct?

amyipdev commented 6 months ago

Seconding @M0dEx's request to close