smoltcp
smoltcp copied to clipboard
How we are using `smoltcp`
I reached for smoltcp
because I needed to implement a TCP DNS server inside a TUN driver. The code is here: https://github.com/firezone/firezone/tree/main/rust/dns-over-tcp/src
Because we are also handling all sorts of other traffic and smoltcp
is only responsible for managing TCP sockets, I had to create some adapter structs and workarounds to be able to selectively dispatch IP packets to it. It actually works pretty well but it took me a while to figure these things out.
- Is there any interest having these adapters in this repository in case other people have similar usecases?
- Is there maybe a better way of doing this and I haven't noticed?
- Should there be a better way of using
smoltcp
if you already have IP packets and want to just give it tosmoltcp
for processing?