Expose relay policy in node settings.

This commit is contained in:
Adam Ierymenko 2016-11-21 15:35:18 -08:00
commit 97d915b06c
3 changed files with 18 additions and 7 deletions

View file

@ -389,6 +389,7 @@ unsigned int ControlPlane::handleRequest(
"\t\"worldId\": %llu,\n"
"\t\"worldTimestamp\": %llu,\n"
"\t\"online\": %s,\n"
"\t\"relayPolicy\": \"%s\",\n"
"\t\"tcpFallbackActive\": %s,\n"
"\t\"versionMajor\": %d,\n"
"\t\"versionMinor\": %d,\n"
@ -402,6 +403,7 @@ unsigned int ControlPlane::handleRequest(
status.worldId,
status.worldTimestamp,
(status.online) ? "true" : "false",
((status.relayPolicy == ZT_RELAY_POLICY_ALWAYS) ? "always" : ((status.relayPolicy == ZT_RELAY_POLICY_NEVER) ? "never" : "trusted")),
(_svc->tcpFallbackActive()) ? "true" : "false",
ZEROTIER_ONE_VERSION_MAJOR,
ZEROTIER_ONE_VERSION_MINOR,