Hey, I work for protocol labs (however not in the libp2p team) and I am a go-libp2p contributor.
>
Thinking out loud:
NAT traversal can use a rendezvous node, hidden services are an intriguing option
Yes there have been people who already thought that however, tor doesn't need to do anything.
>
This first is to be able to advertise libp2p network in the directory, a 16bit network ID would be sufficient(where about 16 networks could be advertised).
>
The second is to be able to send tor frames that unwrap to libp2p frames once they reach a node advertising being part of a libp2p network or networks(by way of using masking bits). I feel the second could be accomplished with hidden service, but it feels more natural to want an RPC.
If I understand correctly you want for tor clients to be able to dial libp2p clients because something would advertise and relay libp2p endpoints in tor's directory ?