Skip to content

Commit

Permalink
Add homeDir to info json
Browse files Browse the repository at this point in the history
Want to show it in UIs. So need to get it via API.

It's also a pain to look up. You have to go to external docs.

zerotier-cli info -j

```json
...
 "homeDir": "/Library/Application Support/ZeroTier/One",
 "online": true,
 "planetWorldId": 149604618,`
 ...
```
  • Loading branch information
laduke committed Feb 21, 2024
1 parent 4cd1dcf commit a470bac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions service/OneService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,7 @@ class OneServiceImpl : public OneService
settings["primaryPort"] = OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff;
settings["secondaryPort"] = OSUtils::jsonInt(settings["secondaryPort"],(uint64_t)_ports[1]) & 0xffff;
settings["tertiaryPort"] = OSUtils::jsonInt(settings["tertiaryPort"],(uint64_t)_tertiaryPort) & 0xffff;
settings["homeDir"] = _homePath;
// Enumerate all local address/port pairs that this node is listening on
std::vector<InetAddress> boundAddrs(_binder.allBoundLocalInterfaceAddresses());
auto boundAddrArray = json::array();
Expand Down

0 comments on commit a470bac

Please sign in to comment.