libzt
libzt copied to clipboard
How do I get the addresses of other users on the peer network?
I have integrated libzt into my Java project to achieve simple network penetration.
Now I have access to the network, but I don't know how to get the address of other users on the peer network, I tried to use the command netstat -nr and it didn't return the route the zerotier network.
After some searching, I found that zerotier one can be obtained by [REST APIs](https://docs.zerotier.com/service/v1#tag/peer), but I am using libzt, how can I get the addresses of other users on the peer network?
Avahi/zeroconf probably.
You can use the Central API that you linked to do this, even if you're using libzt. But that is a separate procedure as libzt primarily just exposes the node's API and doesn't really provide a way to make queries about peers (unless you've already contacted them).
Once you've queried the Central API for peer info you can use that to talk over libzt.
Things like netstat -nr won't work at all since libzt is providing you a private network stack for a single application. Other applications running on the system cannot see this.