libzt icon indicating copy to clipboard operation
libzt copied to clipboard

How do I get the addresses of other users on the peer network?

Open skye-z opened this issue 3 years ago • 2 comments

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?

skye-z avatar Jun 16 '22 05:06 skye-z

Avahi/zeroconf probably.

traverseda avatar Jul 17 '22 16:07 traverseda

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.

joseph-henry avatar Aug 16 '22 19:08 joseph-henry