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
"config": {
  "settings": {
   "allowTcpFallbackRelay": true,
   "forceTcpRelay": true,
   "homeDir": "/Library/Application Support/ZeroTier/One",
```
  • Loading branch information
laduke committed Feb 29, 2024
1 parent 99ef1e2 commit 768c624
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 768c624

Please sign in to comment.