FeraeLabs / skunk

A person-in-the-middle proxy
MIT License
0 stars 0 forks source link

Raw packet socket #18

Open jgraef opened 3 months ago

jgraef commented 3 months ago

Needed to list interfaces, and opening a socket bound to an interface in raw mode. Use AsyncFd to make it async.

jgraef commented 3 months ago

The unix-implementation we have right now, doesn't work on MacOS, because of some incompatibilities in libc. I scoped it to target_os="linux" for now. We should modify that implementation to work on most unix flavors. I think that's easier than providing an implementation per flavor. At least as long as the differences aren't too large.

I added a stub-implementation that doesn't return any interfaces, and thus can't be used to do open sockets. With this we don't need to compile-out pcap on a per-platform basis in skunk-cli.