onion-tunnel: make generic over any device type
- While porting onionmasq to Apple platforms (see !117 (closed)), it became apparent that a way to pass in a custom tun device type would be useful.
- This isn't hard to add at all, so make
OnionTunnel
generic over devices (with the type parameter defaulted toAsyncTunTapInterface
for compatibility).- Note however that any devices passed in must behave like a TUN interface (i.e. not split writes) for things to not horribly break.
cc @tla -- hopefully this helps!