Shameless plug but I was also interested in the magic behind these mesh networking tools, so I wrote my own toy version that was very much inspired by the tools you mentioned. I blogged about it here: https://www.samlewis.me/2021/07/creating-mesh-vpn-tool-for-f...
The short answer to your question though is that the packets are sent over a secure tunnel.
Cool that this article implements the cryptography primitives, though!
e: Funnily, like the article, I also stored some BTC in a wallet and challenged people to (manually) take/steal it. At the time it was worth $10 USD.. now it's worth $123 USD!
The short answer to your question though is that the packets are sent over a secure tunnel.