My understanding is that TOR also provides the latter - as that is specifically the purpose of the "onion" routing: https://en.wikipedia.org/wiki/Onion_routing
I had the impression that onion services are exactly that: protection inside the P2P network.
reply
My understanding is that TOR also provides the latter - as that is specifically the purpose of the "onion" routing: https://en.wikipedia.org/wiki/Onion_routing