mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
Merge dev to edge
This commit is contained in:
commit
f9900cc6fb
50 changed files with 4563 additions and 624 deletions
|
@ -961,15 +961,17 @@ public:
|
|||
Mutex::Lock _l2(_localConfig_m);
|
||||
std::string lcbuf;
|
||||
if (OSUtils::readFile((_homePath + ZT_PATH_SEPARATOR_S "local.conf").c_str(),lcbuf)) {
|
||||
try {
|
||||
_localConfig = OSUtils::jsonParse(lcbuf);
|
||||
if (!_localConfig.is_object()) {
|
||||
fprintf(stderr,"ERROR: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S);
|
||||
if (lcbuf.length() > 0) {
|
||||
try {
|
||||
_localConfig = OSUtils::jsonParse(lcbuf);
|
||||
if (!_localConfig.is_object()) {
|
||||
fprintf(stderr,"ERROR: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S);
|
||||
exit(1);
|
||||
}
|
||||
} catch ( ... ) {
|
||||
fprintf(stderr,"ERROR: unable to parse local.conf (invalid JSON)" ZT_EOL_S);
|
||||
exit(1);
|
||||
}
|
||||
} catch ( ... ) {
|
||||
fprintf(stderr,"ERROR: unable to parse local.conf (invalid JSON)" ZT_EOL_S);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ This is the actual implementation of ZeroTier One, a service providing connectiv
|
|||
|
||||
### Local Configuration File
|
||||
|
||||
A file called `local.conf` in the ZeroTier home folder contains configuration options that apply to the local node. It can be used to set up trusted paths, blacklist physical paths, set up physical path hints for certain nodes, and define trusted upstream devices (federated roots). In a large deployment it can be deployed using a tool like Puppet, Chef, SaltStack, etc. to set a uniform configuration across systems. It's a JSON format file that can also be edited and rewritten by ZeroTier One itself, so ensure that proper JSON formatting is used.
|
||||
A file called `local.conf` in the ZeroTier home folder contains configuration options that apply to the local node. (It does not exist unless you create it). It can be used to set up trusted paths, blacklist physical paths, set up physical path hints for certain nodes, and define trusted upstream devices (federated roots). In a large deployment it can be deployed using a tool like Puppet, Chef, SaltStack, etc. to set a uniform configuration across systems. It's a JSON format file that can also be edited and rewritten by ZeroTier One itself, so ensure that proper JSON formatting is used.
|
||||
|
||||
Settings available in `local.conf` (this is not valid JSON, and JSON does not allow comments):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue