tun2proxy / rust-tun

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

Routing setup seems broken in macOS and FreeBSD #56

Closed GyulyVGC closed 6 months ago

GyulyVGC commented 6 months ago

I'm migrating to this fork since the original repo is unmaintained.

While migrating I noticed a problem concerning the automatic route setup on macOS and FreeBSD, this is a nice feature you introduced but I think there could something wrong.

image

image

First picture is the routing table after a manual setup by myself using the original repo, which works.

Second picture is the routing table after the automatic setup by this fork, which seems to not allow any packets to be sent out.

Note: in this example the TUN IP is 10.0.0.113

GyulyVGC commented 6 months ago

Whoops, this was not the problem.

It was just me manually adding the AF_INET special header in macOS, but now you're automatically handling it inside the library so there is no more need to worry about it.