From 768c6242cd0853932abfd9d75afda59bce2ab5bc Mon Sep 17 00:00:00 2001 From: travisladuke Date: Wed, 21 Feb 2024 09:43:52 -0800 Subject: [PATCH] Add homeDir to info json 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", ``` --- service/OneService.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/service/OneService.cpp b/service/OneService.cpp index fcebe46777..5bd67a2cab 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -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 boundAddrs(_binder.allBoundLocalInterfaceAddresses()); auto boundAddrArray = json::array();