Closed Aryamanz29 closed 1 year ago
Add a ZeroTierParser that can parse the information of ZeroTier peers and generate a network graph.
ZeroTierParser
zerotier-cli peers -j
[ { "address": "62f865ae71", "isBonded": false, "latency": 382, "paths": [ { "active": true, "address": "50.7.252.138/9993", "expired": false, "lastReceive": 1645034513389, "lastSend": 1645034513008, "preferred": true, "trustedPathId": 0 } ], "role": "PLANET", "version": "-1.-1.-1", "versionMajor": -1, "versionMinor": -1, "versionRev": -1 }, { "address": "778cde7190", "isBonded": false, "latency": 344, "paths": [ { "active": true, "address": "103.195.103.66/9993", "expired": false, "lastReceive": 1645034513362, "lastSend": 1645034513008, "preferred": true, "trustedPathId": 0 } ], "role": "PLANET", "version": "-1.-1.-1", "versionMajor": -1, "versionMinor": -1, "versionRev": -1 }, { "address": "cafe04eba9", "isBonded": false, "latency": 253, "paths": [ { "active": true, "address": "84.17.53.155/9993", "expired": false, "lastReceive": 1645034508255, "lastSend": 1645034513008, "preferred": true, "trustedPathId": 0 } ], "role": "PLANET", "version": "-1.-1.-1", "versionMajor": -1, "versionMinor": -1, "versionRev": -1 }, { "address": "cafe9efeb9", "isBonded": false, "latency": 247, "paths": [ { "active": true, "address": "104.194.8.134/9993", "expired": false, "lastReceive": 1645034513259, "lastSend": 1645034513008, "preferred": true, "trustedPathId": 0 } ], "role": "PLANET", "version": "-1.-1.-1", "versionMajor": -1, "versionMinor": -1, "versionRev": -1 } ]
role
latency
Add a
ZeroTierParser
that can parse the information of ZeroTier peers and generate a network graph.zerotier-cli peers -j
command to obtain the ZeroTier peers information as shown below:role
andlatency
fields to set the cost of links.