182 changed files with 6842 additions and 8348 deletions
@ -1,12 +0,0 @@
|
||||
ZeroTier One, an endpoint server for the ZeroTier virtual network layer. |
||||
Copyright © 2011–2019 ZeroTier, Inc. |
||||
|
||||
ZeroTier is released under the terms of the BUSL version 1.1. See the |
||||
file LICENSE.txt for details. |
||||
|
||||
.. |
||||
Local variables: |
||||
coding: utf-8 |
||||
mode: text |
||||
End: |
||||
vim: fileencoding=utf-8 filetype=text : |
||||
@ -0,0 +1,373 @@
|
||||
Mozilla Public License Version 2.0 |
||||
================================== |
||||
|
||||
1. Definitions |
||||
-------------- |
||||
|
||||
1.1. "Contributor" |
||||
means each individual or legal entity that creates, contributes to |
||||
the creation of, or owns Covered Software. |
||||
|
||||
1.2. "Contributor Version" |
||||
means the combination of the Contributions of others (if any) used |
||||
by a Contributor and that particular Contributor's Contribution. |
||||
|
||||
1.3. "Contribution" |
||||
means Covered Software of a particular Contributor. |
||||
|
||||
1.4. "Covered Software" |
||||
means Source Code Form to which the initial Contributor has attached |
||||
the notice in Exhibit A, the Executable Form of such Source Code |
||||
Form, and Modifications of such Source Code Form, in each case |
||||
including portions thereof. |
||||
|
||||
1.5. "Incompatible With Secondary Licenses" |
||||
means |
||||
|
||||
(a) that the initial Contributor has attached the notice described |
||||
in Exhibit B to the Covered Software; or |
||||
|
||||
(b) that the Covered Software was made available under the terms of |
||||
version 1.1 or earlier of the License, but not also under the |
||||
terms of a Secondary License. |
||||
|
||||
1.6. "Executable Form" |
||||
means any form of the work other than Source Code Form. |
||||
|
||||
1.7. "Larger Work" |
||||
means a work that combines Covered Software with other material, in |
||||
a separate file or files, that is not Covered Software. |
||||
|
||||
1.8. "License" |
||||
means this document. |
||||
|
||||
1.9. "Licensable" |
||||
means having the right to grant, to the maximum extent possible, |
||||
whether at the time of the initial grant or subsequently, any and |
||||
all of the rights conveyed by this License. |
||||
|
||||
1.10. "Modifications" |
||||
means any of the following: |
||||
|
||||
(a) any file in Source Code Form that results from an addition to, |
||||
deletion from, or modification of the contents of Covered |
||||
Software; or |
||||
|
||||
(b) any new file in Source Code Form that contains any Covered |
||||
Software. |
||||
|
||||
1.11. "Patent Claims" of a Contributor |
||||
means any patent claim(s), including without limitation, method, |
||||
process, and apparatus claims, in any patent Licensable by such |
||||
Contributor that would be infringed, but for the grant of the |
||||
License, by the making, using, selling, offering for sale, having |
||||
made, import, or transfer of either its Contributions or its |
||||
Contributor Version. |
||||
|
||||
1.12. "Secondary License" |
||||
means either the GNU General Public License, Version 2.0, the GNU |
||||
Lesser General Public License, Version 2.1, the GNU Affero General |
||||
Public License, Version 3.0, or any later versions of those |
||||
licenses. |
||||
|
||||
1.13. "Source Code Form" |
||||
means the form of the work preferred for making modifications. |
||||
|
||||
1.14. "You" (or "Your") |
||||
means an individual or a legal entity exercising rights under this |
||||
License. For legal entities, "You" includes any entity that |
||||
controls, is controlled by, or is under common control with You. For |
||||
purposes of this definition, "control" means (a) the power, direct |
||||
or indirect, to cause the direction or management of such entity, |
||||
whether by contract or otherwise, or (b) ownership of more than |
||||
fifty percent (50%) of the outstanding shares or beneficial |
||||
ownership of such entity. |
||||
|
||||
2. License Grants and Conditions |
||||
-------------------------------- |
||||
|
||||
2.1. Grants |
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free, |
||||
non-exclusive license: |
||||
|
||||
(a) under intellectual property rights (other than patent or trademark) |
||||
Licensable by such Contributor to use, reproduce, make available, |
||||
modify, display, perform, distribute, and otherwise exploit its |
||||
Contributions, either on an unmodified basis, with Modifications, or |
||||
as part of a Larger Work; and |
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer |
||||
for sale, have made, import, and otherwise transfer either its |
||||
Contributions or its Contributor Version. |
||||
|
||||
2.2. Effective Date |
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution |
||||
become effective for each Contribution on the date the Contributor first |
||||
distributes such Contribution. |
||||
|
||||
2.3. Limitations on Grant Scope |
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under |
||||
this License. No additional rights or licenses will be implied from the |
||||
distribution or licensing of Covered Software under this License. |
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a |
||||
Contributor: |
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software; |
||||
or |
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's |
||||
modifications of Covered Software, or (ii) the combination of its |
||||
Contributions with other software (except as part of its Contributor |
||||
Version); or |
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of |
||||
its Contributions. |
||||
|
||||
This License does not grant any rights in the trademarks, service marks, |
||||
or logos of any Contributor (except as may be necessary to comply with |
||||
the notice requirements in Section 3.4). |
||||
|
||||
2.4. Subsequent Licenses |
||||
|
||||
No Contributor makes additional grants as a result of Your choice to |
||||
distribute the Covered Software under a subsequent version of this |
||||
License (see Section 10.2) or under the terms of a Secondary License (if |
||||
permitted under the terms of Section 3.3). |
||||
|
||||
2.5. Representation |
||||
|
||||
Each Contributor represents that the Contributor believes its |
||||
Contributions are its original creation(s) or it has sufficient rights |
||||
to grant the rights to its Contributions conveyed by this License. |
||||
|
||||
2.6. Fair Use |
||||
|
||||
This License is not intended to limit any rights You have under |
||||
applicable copyright doctrines of fair use, fair dealing, or other |
||||
equivalents. |
||||
|
||||
2.7. Conditions |
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted |
||||
in Section 2.1. |
||||
|
||||
3. Responsibilities |
||||
------------------- |
||||
|
||||
3.1. Distribution of Source Form |
||||
|
||||
All distribution of Covered Software in Source Code Form, including any |
||||
Modifications that You create or to which You contribute, must be under |
||||
the terms of this License. You must inform recipients that the Source |
||||
Code Form of the Covered Software is governed by the terms of this |
||||
License, and how they can obtain a copy of this License. You may not |
||||
attempt to alter or restrict the recipients' rights in the Source Code |
||||
Form. |
||||
|
||||
3.2. Distribution of Executable Form |
||||
|
||||
If You distribute Covered Software in Executable Form then: |
||||
|
||||
(a) such Covered Software must also be made available in Source Code |
||||
Form, as described in Section 3.1, and You must inform recipients of |
||||
the Executable Form how they can obtain a copy of such Source Code |
||||
Form by reasonable means in a timely manner, at a charge no more |
||||
than the cost of distribution to the recipient; and |
||||
|
||||
(b) You may distribute such Executable Form under the terms of this |
||||
License, or sublicense it under different terms, provided that the |
||||
license for the Executable Form does not attempt to limit or alter |
||||
the recipients' rights in the Source Code Form under this License. |
||||
|
||||
3.3. Distribution of a Larger Work |
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice, |
||||
provided that You also comply with the requirements of this License for |
||||
the Covered Software. If the Larger Work is a combination of Covered |
||||
Software with a work governed by one or more Secondary Licenses, and the |
||||
Covered Software is not Incompatible With Secondary Licenses, this |
||||
License permits You to additionally distribute such Covered Software |
||||
under the terms of such Secondary License(s), so that the recipient of |
||||
the Larger Work may, at their option, further distribute the Covered |
||||
Software under the terms of either this License or such Secondary |
||||
License(s). |
||||
|
||||
3.4. Notices |
||||
|
||||
You may not remove or alter the substance of any license notices |
||||
(including copyright notices, patent notices, disclaimers of warranty, |
||||
or limitations of liability) contained within the Source Code Form of |
||||
the Covered Software, except that You may alter any license notices to |
||||
the extent required to remedy known factual inaccuracies. |
||||
|
||||
3.5. Application of Additional Terms |
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support, |
||||
indemnity or liability obligations to one or more recipients of Covered |
||||
Software. However, You may do so only on Your own behalf, and not on |
||||
behalf of any Contributor. You must make it absolutely clear that any |
||||
such warranty, support, indemnity, or liability obligation is offered by |
||||
You alone, and You hereby agree to indemnify every Contributor for any |
||||
liability incurred by such Contributor as a result of warranty, support, |
||||
indemnity or liability terms You offer. You may include additional |
||||
disclaimers of warranty and limitations of liability specific to any |
||||
jurisdiction. |
||||
|
||||
4. Inability to Comply Due to Statute or Regulation |
||||
--------------------------------------------------- |
||||
|
||||
If it is impossible for You to comply with any of the terms of this |
||||
License with respect to some or all of the Covered Software due to |
||||
statute, judicial order, or regulation then You must: (a) comply with |
||||
the terms of this License to the maximum extent possible; and (b) |
||||
describe the limitations and the code they affect. Such description must |
||||
be placed in a text file included with all distributions of the Covered |
||||
Software under this License. Except to the extent prohibited by statute |
||||
or regulation, such description must be sufficiently detailed for a |
||||
recipient of ordinary skill to be able to understand it. |
||||
|
||||
5. Termination |
||||
-------------- |
||||
|
||||
5.1. The rights granted under this License will terminate automatically |
||||
if You fail to comply with any of its terms. However, if You become |
||||
compliant, then the rights granted under this License from a particular |
||||
Contributor are reinstated (a) provisionally, unless and until such |
||||
Contributor explicitly and finally terminates Your grants, and (b) on an |
||||
ongoing basis, if such Contributor fails to notify You of the |
||||
non-compliance by some reasonable means prior to 60 days after You have |
||||
come back into compliance. Moreover, Your grants from a particular |
||||
Contributor are reinstated on an ongoing basis if such Contributor |
||||
notifies You of the non-compliance by some reasonable means, this is the |
||||
first time You have received notice of non-compliance with this License |
||||
from such Contributor, and You become compliant prior to 30 days after |
||||
Your receipt of the notice. |
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent |
||||
infringement claim (excluding declaratory judgment actions, |
||||
counter-claims, and cross-claims) alleging that a Contributor Version |
||||
directly or indirectly infringes any patent, then the rights granted to |
||||
You by any and all Contributors for the Covered Software under Section |
||||
2.1 of this License shall terminate. |
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all |
||||
end user license agreements (excluding distributors and resellers) which |
||||
have been validly granted by You or Your distributors under this License |
||||
prior to termination shall survive termination. |
||||
|
||||
************************************************************************ |
||||
* * |
||||
* 6. Disclaimer of Warranty * |
||||
* ------------------------- * |
||||
* * |
||||
* Covered Software is provided under this License on an "as is" * |
||||
* basis, without warranty of any kind, either expressed, implied, or * |
||||
* statutory, including, without limitation, warranties that the * |
||||
* Covered Software is free of defects, merchantable, fit for a * |
||||
* particular purpose or non-infringing. The entire risk as to the * |
||||
* quality and performance of the Covered Software is with You. * |
||||
* Should any Covered Software prove defective in any respect, You * |
||||
* (not any Contributor) assume the cost of any necessary servicing, * |
||||
* repair, or correction. This disclaimer of warranty constitutes an * |
||||
* essential part of this License. No use of any Covered Software is * |
||||
* authorized under this License except under this disclaimer. * |
||||
* * |
||||
************************************************************************ |
||||
|
||||
************************************************************************ |
||||
* * |
||||
* 7. Limitation of Liability * |
||||
* -------------------------- * |
||||
* * |
||||
* Under no circumstances and under no legal theory, whether tort * |
||||
* (including negligence), contract, or otherwise, shall any * |
||||
* Contributor, or anyone who distributes Covered Software as * |
||||
* permitted above, be liable to You for any direct, indirect, * |
||||
* special, incidental, or consequential damages of any character * |
||||
* including, without limitation, damages for lost profits, loss of * |
||||
* goodwill, work stoppage, computer failure or malfunction, or any * |
||||
* and all other commercial damages or losses, even if such party * |
||||
* shall have been informed of the possibility of such damages. This * |
||||
* limitation of liability shall not apply to liability for death or * |
||||
* personal injury resulting from such party's negligence to the * |
||||
* extent applicable law prohibits such limitation. Some * |
||||
* jurisdictions do not allow the exclusion or limitation of * |
||||
* incidental or consequential damages, so this exclusion and * |
||||
* limitation may not apply to You. * |
||||
* * |
||||
************************************************************************ |
||||
|
||||
8. Litigation |
||||
------------- |
||||
|
||||
Any litigation relating to this License may be brought only in the |
||||
courts of a jurisdiction where the defendant maintains its principal |
||||
place of business and such litigation shall be governed by laws of that |
||||
jurisdiction, without reference to its conflict-of-law provisions. |
||||
Nothing in this Section shall prevent a party's ability to bring |
||||
cross-claims or counter-claims. |
||||
|
||||
9. Miscellaneous |
||||
---------------- |
||||
|
||||
This License represents the complete agreement concerning the subject |
||||
matter hereof. If any provision of this License is held to be |
||||
unenforceable, such provision shall be reformed only to the extent |
||||
necessary to make it enforceable. Any law or regulation which provides |
||||
that the language of a contract shall be construed against the drafter |
||||
shall not be used to construe this License against a Contributor. |
||||
|
||||
10. Versions of the License |
||||
--------------------------- |
||||
|
||||
10.1. New Versions |
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section |
||||
10.3, no one other than the license steward has the right to modify or |
||||
publish new versions of this License. Each version will be given a |
||||
distinguishing version number. |
||||
|
||||
10.2. Effect of New Versions |
||||
|
||||
You may distribute the Covered Software under the terms of the version |
||||
of the License under which You originally received the Covered Software, |
||||
or under the terms of any subsequent version published by the license |
||||
steward. |
||||
|
||||
10.3. Modified Versions |
||||
|
||||
If you create software not governed by this License, and you want to |
||||
create a new license for such software, you may create and use a |
||||
modified version of this License if you rename the license and remove |
||||
any references to the name of the license steward (except to note that |
||||
such modified license differs from this License). |
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary |
||||
Licenses |
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With |
||||
Secondary Licenses under the terms of this version of the License, the |
||||
notice described in Exhibit B of this License must be attached. |
||||
|
||||
Exhibit A - Source Code Form License Notice |
||||
------------------------------------------- |
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public |
||||
License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/. |
||||
|
||||
If it is not possible or desirable to put the notice in a particular |
||||
file, then You may include the notice in a location (such as a LICENSE |
||||
file in a relevant directory) where a recipient would be likely to look |
||||
for such a notice. |
||||
|
||||
You may add additional accurate notices of copyright ownership. |
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice |
||||
--------------------------------------------------------- |
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as |
||||
defined by the Mozilla Public License, v. 2.0. |
||||
@ -1,149 +1,5 @@
|
||||
----------------------------------------------------------------------------- |
||||
See LICENSE-MPL.txt for all code in node/, osdep/. service/, and everywhere else except ext/ and nonfree/. |
||||
|
||||
Business Source License 1.1 |
||||
See nonfree/LICENSE.md for all non-free ("source available") portions of this repository. |
||||
|
||||
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. |
||||
"Business Source License" is a trademark of MariaDB Corporation Ab. |
||||
|
||||
----------------------------------------------------------------------------- |
||||
|
||||
Parameters |
||||
|
||||
Licensor: ZeroTier, Inc. |
||||
Licensed Work: ZeroTier Network Virtualization Engine 1.4.4 |
||||
The Licensed Work is (c)2019 ZeroTier, Inc. |
||||
Additional Use Grant: You may make use of the Licensed Work, provided you |
||||
do not use it in any of the following ways: |
||||
|
||||
* Sell hosted ZeroTier services as a "SaaS" Product |
||||
|
||||
(1) Operate or sell access to ZeroTier root servers, |
||||
network controllers, or authorization key or certificate |
||||
generation components of the Licensed Work as a |
||||
for-profit service, regardless of whether the use of |
||||
these components is sold alone or is bundled with other |
||||
services. Note that this does not apply to the use of |
||||
ZeroTier behind the scenes to operate a service not |
||||
related to ZeroTier network administration. |
||||
|
||||
* Create Non-Open-Source Commercial Derivative Works |
||||
|
||||
(2) Link or directly include the Licensed Work in a |
||||
commercial or for-profit application or other product |
||||
not distributed under an Open Source Initiative (OSI) |
||||
compliant license. See: https://opensource.org/licenses |
||||
|
||||
(3) Remove the name, logo, copyright, or other branding |
||||
material from the Licensed Work to create a "rebranded" |
||||
or "white labeled" version to distribute as part of |
||||
any commercial or for-profit product or service. |
||||
|
||||
* Certain Government Uses |
||||
|
||||
(4) Use or deploy the Licensed Work in a government |
||||
setting in support of any active government function |
||||
or operation with the exception of the following: |
||||
physical or mental health care, family and social |
||||
services, social welfare, senior care, child care, and |
||||
the care of persons with disabilities. |
||||
|
||||
Change Date: 2026-01-01 |
||||
|
||||
Change License: Apache License version 2.0 as published by the Apache |
||||
Software Foundation |
||||
https://www.apache.org/licenses/ |
||||
|
||||
Alternative Licensing |
||||
|
||||
If you would like to use the Licensed Work in any way that conflicts with |
||||
the stipulations of the Additional Use Grant, contact ZeroTier, Inc. to |
||||
obtain an alternative commercial license. |
||||
|
||||
Visit us on the web at: https://www.zerotier.com/ |
||||
|
||||
Notice |
||||
|
||||
The Business Source License (this document, or the "License") is not an Open |
||||
Source license. However, the Licensed Work will eventually be made available |
||||
under an Open Source License, as stated in this License. |
||||
|
||||
For more information on the use of the Business Source License for ZeroTier |
||||
products, please visit our pricing page which contains license details and |
||||
and license FAQ: https://zerotier.com/pricing |
||||
|
||||
For more information on the use of the Business Source License generally, |
||||
please visit the Adopting and Developing Business Source License FAQ at |
||||
https://mariadb.com/bsl-faq-adopting. |
||||
|
||||
----------------------------------------------------------------------------- |
||||
|
||||
Business Source License 1.1 |
||||
|
||||
Terms |
||||
|
||||
The Licensor hereby grants you the right to copy, modify, create derivative |
||||
works, redistribute, and make non-production use of the Licensed Work. The |
||||
Licensor may make an Additional Use Grant, above, permitting limited |
||||
production use. |
||||
|
||||
Effective on the Change Date, or the fourth anniversary of the first publicly |
||||
available distribution of a specific version of the Licensed Work under this |
||||
License, whichever comes first, the Licensor hereby grants you rights under |
||||
the terms of the Change License, and the rights granted in the paragraph |
||||
above terminate. |
||||
|
||||
If your use of the Licensed Work does not comply with the requirements |
||||
currently in effect as described in this License, you must purchase a |
||||
commercial license from the Licensor, its affiliated entities, or authorized |
||||
resellers, or you must refrain from using the Licensed Work. |
||||
|
||||
All copies of the original and modified Licensed Work, and derivative works |
||||
of the Licensed Work, are subject to this License. This License applies |
||||
separately for each version of the Licensed Work and the Change Date may vary |
||||
for each version of the Licensed Work released by Licensor. |
||||
|
||||
You must conspicuously display this License on each original or modified copy |
||||
of the Licensed Work. If you receive the Licensed Work in original or |
||||
modified form from a third party, the terms and conditions set forth in this |
||||
License apply to your use of that work. |
||||
|
||||
Any use of the Licensed Work in violation of this License will automatically |
||||
terminate your rights under this License for the current and all other |
||||
versions of the Licensed Work. |
||||
|
||||
This License does not grant you any right in any trademark or logo of |
||||
Licensor or its affiliates (provided that you may use a trademark or logo of |
||||
Licensor as expressly required by this License). |
||||
|
||||
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON |
||||
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, |
||||
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF |
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND |
||||
TITLE. |
||||
|
||||
----------------------------------------------------------------------------- |
||||
|
||||
MariaDB hereby grants you permission to use this License’s text to license |
||||
your works, and to refer to it using the trademark "Business Source License", |
||||
as long as you comply with the Covenants of Licensor below. |
||||
|
||||
Covenants of Licensor |
||||
|
||||
In consideration of the right to use this License’s text and the "Business |
||||
Source License" name and trademark, Licensor covenants to MariaDB, and to all |
||||
other recipients of the licensed work to be provided by Licensor: |
||||
|
||||
1. To specify as the Change License the GPL Version 2.0 or any later version, |
||||
or a license that is compatible with GPL Version 2.0 or a later version, |
||||
where "compatible" means that software provided under the Change License can |
||||
be included in a program with software provided under GPL Version 2.0 or a |
||||
later version. Licensor may specify additional Change Licenses without |
||||
limitation. |
||||
|
||||
2. To either: (a) specify an additional grant of rights to use that does not |
||||
impose any additional restriction on the right granted in this License, as |
||||
the Additional Use Grant; or (b) insert the text "None". |
||||
|
||||
3. To specify a Change Date. |
||||
|
||||
4. Not to modify this License in any other way. |
||||
Code in ext/ is external code included for build convenience or backward compatibility and retains its original license. |
||||
|
||||
@ -1,7 +0,0 @@
|
||||
World Definitions and Generator Code |
||||
====== |
||||
|
||||
This little bit of code is used to generate world updates. Ordinary users probably will never need this unless they want to test or experiment. |
||||
|
||||
See mkworld.cpp for documentation. To build from this directory use 'source ./build.sh'. |
||||
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
c++ -std=c++11 -I../.. -I../../ext -I.. -g -o mkworld ../../node/C25519.cpp ../../node/Salsa20.cpp ../../node/SHA512.cpp ../../node/Identity.cpp ../../node/Utils.cpp ../../node/InetAddress.cpp ../../osdep/OSUtils.cpp mkworld.cpp -lm |
||||
@ -1,173 +0,0 @@
|
||||
/*
|
||||
* ZeroTier One - Network Virtualization Everywhere |
||||
* Copyright (C) 2011-2016 ZeroTier, Inc. https://www.zerotier.com/
|
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License as published by |
||||
* the Free Software Foundation, either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/ |
||||
|
||||
/*
|
||||
* This utility makes the World from the configuration specified below. |
||||
* It probably won't be much use to anyone outside ZeroTier, Inc. except |
||||
* for testing and experimentation purposes. |
||||
* |
||||
* If you want to make your own World you must edit this file. |
||||
* |
||||
* When run, it expects two files in the current directory: |
||||
* |
||||
* previous.c25519 - key pair to sign this world (key from previous world) |
||||
* current.c25519 - key pair whose public key should be embedded in this world |
||||
* |
||||
* If these files do not exist, they are both created with the same key pair |
||||
* and a self-signed initial World is born. |
||||
*/ |
||||
|
||||
#include <stdio.h> |
||||
#include <stdlib.h> |
||||
#include <string.h> |
||||
#include <stdint.h> |
||||
|
||||
#include <string> |
||||
#include <vector> |
||||
#include <algorithm> |
||||
|
||||
#include <node/Constants.hpp> |
||||
#include <node/World.hpp> |
||||
#include <node/ECC.hpp> |
||||
#include <node/Identity.hpp> |
||||
#include <node/InetAddress.hpp> |
||||
#include <osdep/OSUtils.hpp> |
||||
|
||||
using namespace ZeroTier; |
||||
|
||||
int main(int argc,char **argv) |
||||
{ |
||||
std::string previous,current; |
||||
if ((!OSUtils::readFile("previous.c25519",previous))||(!OSUtils::readFile("current.c25519",current))) { |
||||
ECC::Pair np(ECC::generate()); |
||||
previous = std::string(); |
||||
previous.append((const char *)np.pub.data,ZT_C25519_PUBLIC_KEY_LEN); |
||||
previous.append((const char *)np.priv.data,ZT_C25519_PRIVATE_KEY_LEN); |
||||
current = previous; |
||||
OSUtils::writeFile("previous.c25519",previous); |
||||
OSUtils::writeFile("current.c25519",current); |
||||
fprintf(stderr,"INFO: created initial world keys: previous.c25519 and current.c25519 (both initially the same)" ZT_EOL_S); |
||||
} |
||||
|
||||
if ((previous.length() != (ZT_C25519_PUBLIC_KEY_LEN + ZT_C25519_PRIVATE_KEY_LEN))||(current.length() != (ZT_C25519_PUBLIC_KEY_LEN + ZT_C25519_PRIVATE_KEY_LEN))) { |
||||
fprintf(stderr,"FATAL: previous.c25519 or current.c25519 empty or invalid" ZT_EOL_S); |
||||
return 1; |
||||
} |
||||
ECC::Pair previousKP; |
||||
memcpy(previousKP.pub.data,previous.data(),ZT_C25519_PUBLIC_KEY_LEN); |
||||
memcpy(previousKP.priv.data,previous.data() + ZT_C25519_PUBLIC_KEY_LEN,ZT_C25519_PRIVATE_KEY_LEN); |
||||
ECC::Pair currentKP; |
||||
memcpy(currentKP.pub.data,current.data(),ZT_C25519_PUBLIC_KEY_LEN); |
||||
memcpy(currentKP.priv.data,current.data() + ZT_C25519_PUBLIC_KEY_LEN,ZT_C25519_PRIVATE_KEY_LEN); |
||||
|
||||
// =========================================================================
|
||||
// EDIT BELOW HERE
|
||||
|
||||
std::vector<World::Root> roots; |
||||
|
||||
const uint64_t id = ZT_WORLD_ID_EARTH; |
||||
const uint64_t ts = 1567191349589ULL; // August 30th, 2019
|
||||
|
||||
// Los Angeles
|
||||
roots.push_back(World::Root()); |
||||
roots.back().identity = Identity("3a46f1bf30:0:76e66fab33e28549a62ee2064d1843273c2c300ba45c3f20bef02dbad225723bb59a9bb4b13535730961aeecf5a163ace477cceb0727025b99ac14a5166a09a3"); |
||||
roots.back().stableEndpoints.push_back(InetAddress("185.180.13.82/9993")); |
||||
roots.back().stableEndpoints.push_back(InetAddress("2a02:6ea0:c815::/9993")); |
||||
|
||||
// Miami
|
||||
roots.push_back(World::Root()); |
||||
roots.back().identity = Identity("de8950a8b2:0:1b3ada8251b91b6b6fa6535b8c7e2460918f4f729abdec97d3c7f3796868fb02f0de0b0ee554b2d59fc3524743eebfcf5315e790ed6d92db5bd10c28c09b40ef"); |
||||
roots.back().stableEndpoints.push_back(InetAddress("207.246.73.245/443")); |
||||
roots.back().stableEndpoints.push_back(InetAddress("2001:19f0:9002:5cb:ec4:7aff:fe8f:69d9/443")); |
||||
|
||||
// Tokyo
|
||||
roots.push_back(World::Root()); |
||||
roots.back().identity = Identity("34e0a5e174:0:93efb50934788f856d5cfb9ca5be88e85b40965586b75befac900df77352c145a1ba7007569d37c77bfe52c0999f3bdc67a47a4a6000b720a883ce47aa2fb7f8"); |
||||
roots.back().stableEndpoints.push_back(InetAddress("147.75.92.2/443")); |
||||
roots.back().stableEndpoints.push_back(InetAddress("2604:1380:3000:7100::1/443")); |
||||
|
||||
// Amsterdam
|
||||
roots.push_back(World::Root()); |
||||
roots.back().identity = Identity("992fcf1db7:0:206ed59350b31916f749a1f85dffb3a8787dcbf83b8c6e9448d4e3ea0e3369301be716c3609344a9d1533850fb4460c50af43322bcfc8e13d3301a1f1003ceb6"); |
||||
roots.back().stableEndpoints.push_back(InetAddress("195.181.173.159/443")); |
||||
roots.back().stableEndpoints.push_back(InetAddress("2a02:6ea0:c024::/443")); |
||||
|
||||
// Alice
|
||||
//roots.push_back(World::Root());
|
||||
//roots.back().identity = Identity("9d219039f3:0:01f0922a98e3b34ebcbff333269dc265d7a020aab69d72be4d4acc9c8c9294785771256cd1d942a90d1bd1d2dca3ea84ef7d85afe6611fb43ff0b74126d90a6e");
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("188.166.94.177/9993")); // Amsterdam
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2a03:b0c0:2:d0::7d:1/9993")); // Amsterdam
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("154.66.197.33/9993")); // Johannesburg
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2c0f:f850:154:197::33/9993")); // Johannesburg
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("159.203.97.171/9993")); // New York
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2604:a880:800:a1::54:6001/9993")); // New York
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("131.255.6.16/9993")); // Buenos Aires
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2803:eb80:0:e::2/9993")); // Buenos Aires
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("107.170.197.14/9993")); // San Francisco
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2604:a880:1:20::200:e001/9993")); // San Francisco
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("128.199.197.217/9993")); // Singapore
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2400:6180:0:d0::b7:4001/9993")); // Singapore
|
||||
|
||||
// Bob
|
||||
//roots.push_back(World::Root());
|
||||
//roots.back().identity = Identity("8841408a2e:0:bb1d31f2c323e264e9e64172c1a74f77899555ed10751cd56e86405cde118d02dffe555d462ccf6a85b5631c12350c8d5dc409ba10b9025d0f445cf449d92b1c");
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("45.32.198.130/9993")); // Dallas
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2001:19f0:6400:81c3:5400:00ff:fe18:1d61/9993")); // Dallas
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("46.101.160.249/9993")); // Frankfurt
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2a03:b0c0:3:d0::6a:3001/9993")); // Frankfurt
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("107.191.46.210/9993")); // Paris
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2001:19f0:6800:83a4::64/9993")); // Paris
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("45.32.246.179/9993")); // Sydney
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2001:19f0:5800:8bf8:5400:ff:fe15:b39a/9993")); // Sydney
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("45.32.248.87/9993")); // Tokyo
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2001:19f0:7000:9bc9:5400:00ff:fe15:c4f5/9993")); // Tokyo
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("159.203.2.154/9993")); // Toronto
|
||||
//roots.back().stableEndpoints.push_back(InetAddress("2604:a880:cad:d0::26:7001/9993")); // Toronto
|
||||
|
||||
// END WORLD DEFINITION
|
||||
// =========================================================================
|
||||
|
||||
fprintf(stderr,"INFO: generating and signing id==%llu ts==%llu" ZT_EOL_S,(unsigned long long)id,(unsigned long long)ts); |
||||
|
||||
World nw = World::make(World::TYPE_PLANET,id,ts,currentKP.pub,roots,previousKP); |
||||
|
||||
Buffer<ZT_WORLD_MAX_SERIALIZED_LENGTH> outtmp; |
||||
nw.serialize(outtmp,false); |
||||
World testw; |
||||
testw.deserialize(outtmp,0); |
||||
if (testw != nw) { |
||||
fprintf(stderr,"FATAL: serialization test failed!" ZT_EOL_S); |
||||
return 1; |
||||
} |
||||
|
||||
OSUtils::writeFile("world.bin",std::string((const char *)outtmp.data(),outtmp.size())); |
||||
fprintf(stderr,"INFO: world.bin written with %u bytes of binary world data." ZT_EOL_S,outtmp.size()); |
||||
|
||||
fprintf(stdout,ZT_EOL_S); |
||||
fprintf(stdout,"#define ZT_DEFAULT_WORLD_LENGTH %u" ZT_EOL_S,outtmp.size()); |
||||
fprintf(stdout,"static const unsigned char ZT_DEFAULT_WORLD[ZT_DEFAULT_WORLD_LENGTH] = {"); |
||||
for(unsigned int i=0;i<outtmp.size();++i) { |
||||
const unsigned char *d = (const unsigned char *)outtmp.data(); |
||||
if (i > 0) |
||||
fprintf(stdout,","); |
||||
fprintf(stdout,"0x%.2x",(unsigned int)d[i]); |
||||
} |
||||
fprintf(stdout,"};" ZT_EOL_S); |
||||
|
||||
return 0; |
||||
} |
||||
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
|
||||
#define ZT_DEFAULT_WORLD_LENGTH 732 |
||||
static const unsigned char ZT_DEFAULT_WORLD[ZT_DEFAULT_WORLD_LENGTH] = {0x01,0x00,0x00,0x00,0x00,0x08,0xea,0xc9,0x0a,0x00,0x00,0x01,0x6b,0xd4,0x16,0x08,0xc1,0xb8,0xb3,0x88,0xa4,0x69,0x22,0x14,0x91,0xaa,0x9a,0xcd,0x66,0xcc,0x76,0x4c,0xde,0xfd,0x56,0x03,0x9f,0x10,0x67,0xae,0x15,0xe6,0x9c,0x6f,0xb4,0x2d,0x7b,0x55,0x33,0x0e,0x3f,0xda,0xac,0x52,0x9c,0x07,0x92,0xfd,0x73,0x40,0xa6,0xaa,0x21,0xab,0xa8,0xa4,0x89,0xfd,0xae,0xa4,0x4a,0x39,0xbf,0x2d,0x00,0x65,0x9a,0xc9,0xc8,0x18,0xeb,0x16,0x93,0xf4,0xe5,0xbd,0x20,0xda,0x10,0xad,0xc7,0x05,0xf4,0x99,0xfe,0x04,0x08,0x9b,0xe0,0x9e,0x77,0x1d,0x9f,0x47,0x16,0xaa,0x92,0x4f,0x10,0x16,0x3d,0xc7,0xec,0xd3,0x90,0x9e,0xd1,0x74,0xfc,0xb3,0xb5,0x07,0x9c,0x4d,0x95,0xc5,0x17,0x8b,0x3d,0x0b,0x60,0x76,0xe8,0x51,0xbb,0xb6,0x3d,0x74,0xb5,0x21,0x83,0x7b,0x95,0x1d,0x02,0x9b,0xcd,0xaf,0x5c,0x3e,0x96,0xdf,0x37,0x2c,0x56,0x6d,0xfa,0x75,0x0f,0xda,0x55,0x85,0x13,0xf4,0x76,0x1a,0x66,0x4d,0x3b,0x8d,0xcf,0x12,0xc9,0x34,0xb9,0x0d,0x61,0x03,0x3a,0x46,0xf1,0xbf,0x30,0x00,0x76,0xe6,0x6f,0xab,0x33,0xe2,0x85,0x49,0xa6,0x2e,0xe2,0x06,0x4d,0x18,0x43,0x27,0x3c,0x2c,0x30,0x0b,0xa4,0x5c,0x3f,0x20,0xbe,0xf0,0x2d,0xba,0xd2,0x25,0x72,0x3b,0xb5,0x9a,0x9b,0xb4,0xb1,0x35,0x35,0x73,0x09,0x61,0xae,0xec,0xf5,0xa1,0x63,0xac,0xe4,0x77,0xcc,0xeb,0x07,0x27,0x02,0x5b,0x99,0xac,0x14,0xa5,0x16,0x6a,0x09,0xa3,0x00,0x02,0x04,0xb9,0xb4,0x0d,0x52,0x27,0x09,0x06,0x2a,0x02,0x6e,0xa0,0xc8,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x09,0x9d,0x21,0x90,0x39,0xf3,0x00,0x01,0xf0,0x92,0x2a,0x98,0xe3,0xb3,0x4e,0xbc,0xbf,0xf3,0x33,0x26,0x9d,0xc2,0x65,0xd7,0xa0,0x20,0xaa,0xb6,0x9d,0x72,0xbe,0x4d,0x4a,0xcc,0x9c,0x8c,0x92,0x94,0x78,0x57,0x71,0x25,0x6c,0xd1,0xd9,0x42,0xa9,0x0d,0x1b,0xd1,0xd2,0xdc,0xa3,0xea,0x84,0xef,0x7d,0x85,0xaf,0xe6,0x61,0x1f,0xb4,0x3f,0xf0,0xb7,0x41,0x26,0xd9,0x0a,0x6e,0x00,0x0c,0x04,0xbc,0xa6,0x5e,0xb1,0x27,0x09,0x06,0x2a,0x03,0xb0,0xc0,0x00,0x02,0x00,0xd0,0x00,0x00,0x00,0x00,0x00,0x7d,0x00,0x01,0x27,0x09,0x04,0x9a,0x42,0xc5,0x21,0x27,0x09,0x06,0x2c,0x0f,0xf8,0x50,0x01,0x54,0x01,0x97,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x27,0x09,0x04,0x9f,0xcb,0x61,0xab,0x27,0x09,0x06,0x26,0x04,0xa8,0x80,0x08,0x00,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,0x54,0x60,0x01,0x27,0x09,0x04,0x83,0xff,0x06,0x10,0x27,0x09,0x06,0x28,0x03,0xeb,0x80,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x27,0x09,0x04,0x6b,0xaa,0xc5,0x0e,0x27,0x09,0x06,0x26,0x04,0xa8,0x80,0x00,0x01,0x00,0x20,0x00,0x00,0x00,0x00,0x02,0x00,0xe0,0x01,0x27,0x09,0x04,0x80,0xc7,0xc5,0xd9,0x27,0x09,0x06,0x24,0x00,0x61,0x80,0x00,0x00,0x00,0xd0,0x00,0x00,0x00,0x00,0x00,0xb7,0x40,0x01,0x27,0x09,0x88,0x41,0x40,0x8a,0x2e,0x00,0xbb,0x1d,0x31,0xf2,0xc3,0x23,0xe2,0x64,0xe9,0xe6,0x41,0x72,0xc1,0xa7,0x4f,0x77,0x89,0x95,0x55,0xed,0x10,0x75,0x1c,0xd5,0x6e,0x86,0x40,0x5c,0xde,0x11,0x8d,0x02,0xdf,0xfe,0x55,0x5d,0x46,0x2c,0xcf,0x6a,0x85,0xb5,0x63,0x1c,0x12,0x35,0x0c,0x8d,0x5d,0xc4,0x09,0xba,0x10,0xb9,0x02,0x5d,0x0f,0x44,0x5c,0xf4,0x49,0xd9,0x2b,0x1c,0x00,0x0c,0x04,0x2d,0x20,0xc6,0x82,0x27,0x09,0x06,0x20,0x01,0x19,0xf0,0x64,0x00,0x81,0xc3,0x54,0x00,0x00,0xff,0xfe,0x18,0x1d,0x61,0x27,0x09,0x04,0x2e,0x65,0xa0,0xf9,0x27,0x09,0x06,0x2a,0x03,0xb0,0xc0,0x00,0x03,0x00,0xd0,0x00,0x00,0x00,0x00,0x00,0x6a,0x30,0x01,0x27,0x09,0x04,0x6b,0xbf,0x2e,0xd2,0x27,0x09,0x06,0x20,0x01,0x19,0xf0,0x68,0x00,0x83,0xa4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x27,0x09,0x04,0x2d,0x20,0xf6,0xb3,0x27,0x09,0x06,0x20,0x01,0x19,0xf0,0x58,0x00,0x8b,0xf8,0x54,0x00,0x00,0xff,0xfe,0x15,0xb3,0x9a,0x27,0x09,0x04,0x2d,0x20,0xf8,0x57,0x27,0x09,0x06,0x20,0x01,0x19,0xf0,0x70,0x00,0x9b,0xc9,0x54,0x00,0x00,0xff,0xfe,0x15,0xc4,0xf5,0x27,0x09,0x04,0x9f,0xcb,0x02,0x9a,0x27,0x09,0x06,0x26,0x04,0xa8,0x80,0x0c,0xad,0x00,0xd0,0x00,0x00,0x00,0x00,0x00,0x26,0x70,0x01,0x27,0x09}; |
||||
@ -1,443 +0,0 @@
|
||||
/*
|
||||
* Copyright (c)2019 ZeroTier, Inc. |
||||
* |
||||
* Use of this software is governed by the Business Source License included |
||||
* in the LICENSE.TXT file in the project's root directory. |
||||
* |
||||
* Change Date: 2026-01-01 |
||||
* |
||||
* On the date above, in accordance with the Business Source License, use |
||||
* of this software will be governed by version 2.0 of the Apache License. |
||||
*/ |
||||
/****/ |
||||
|
||||
#include "LFDB.hpp" |
||||
|
||||
#include "../ext/cpp-httplib/httplib.h" |
||||
#include "../osdep/OSUtils.hpp" |
||||
|
||||
#include <chrono> |
||||
#include <iostream> |
||||
#include <sstream> |
||||
#include <thread> |
||||
|
||||
namespace ZeroTier { |
||||
|
||||
LFDB::LFDB(const Identity& myId, const char* path, const char* lfOwnerPrivate, const char* lfOwnerPublic, const char* lfNodeHost, int lfNodePort, bool storeOnlineState) |
||||
: DB() |
||||
, _myId(myId) |
||||
, _lfOwnerPrivate((lfOwnerPrivate) ? lfOwnerPrivate : "") |
||||
, _lfOwnerPublic((lfOwnerPublic) ? lfOwnerPublic : "") |
||||
, _lfNodeHost((lfNodeHost) ? lfNodeHost : "127.0.0.1") |
||||
, _lfNodePort(((lfNodePort > 0) && (lfNodePort < 65536)) ? lfNodePort : 9980) |
||||
, _running(true) |
||||
, _ready(false) |
||||
, _storeOnlineState(storeOnlineState) |
||||
{ |
||||
_syncThread = std::thread([this]() { |
||||
char controllerAddress[24]; |
||||
const uint64_t controllerAddressInt = _myId.address().toInt(); |
||||
_myId.address().toString(controllerAddress); |
||||
std::string networksSelectorName("com.zerotier.controller.lfdb:"); |
||||
networksSelectorName.append(controllerAddress); |
||||
networksSelectorName.append("/network"); |
||||
|
||||
// LF record masking key is the first 32 bytes of SHA512(controller private key) in hex,
|
||||
// hiding record values from anything but the controller or someone who has its key.
|
||||
uint8_t sha512pk[64]; |
||||
_myId.sha512PrivateKey(sha512pk); |
||||
char maskingKey[128]; |
||||
Utils::hex(sha512pk, 32, maskingKey); |
||||
|
||||
httplib::Client htcli(_lfNodeHost.c_str(), _lfNodePort); |
||||
int64_t timeRangeStart = 0; |
||||
while (_running.load()) { |
||||
{ |
||||
std::lock_guard<std::mutex> sl(_state_l); |
||||
for (auto ns = _state.begin(); ns != _state.end(); ++ns) { |
||||
if (ns->second.dirty) { |
||||
nlohmann::json network; |
||||
if (get(ns->first, network)) { |
||||
nlohmann::json newrec, selector0; |
||||
selector0["Name"] = networksSelectorName; |
||||
selector0["Ordinal"] = ns->first; |
||||
newrec["Selectors"].push_back(selector0); |
||||
newrec["Value"] = network.dump(); |
||||
newrec["OwnerPrivate"] = _lfOwnerPrivate; |
||||
newrec["MaskingKey"] = maskingKey; |
||||
newrec["PulseIfUnchanged"] = true; |
||||
try { |
||||
auto resp = htcli.Post("/makerecord", newrec.dump(), "application/json"); |
||||
if (resp) { |
||||
if (resp->status == 200) { |
||||
ns->second.dirty = false; |
||||
// printf("SET network %.16llx %s\n",ns->first,resp->body.c_str());
|
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: %d from node (create/update network): %s" ZT_EOL_S, resp->status, resp->body.c_str()); |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: node is offline" ZT_EOL_S); |
||||
} |
||||
} |
||||
catch (std::exception& e) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (create/update network): %s" ZT_EOL_S, e.what()); |
||||
} |
||||
catch (...) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (create/update network): unknown exception" ZT_EOL_S); |
||||
} |
||||
} |
||||
} |
||||
|
||||
for (auto ms = ns->second.members.begin(); ms != ns->second.members.end(); ++ms) { |
||||
if ((_storeOnlineState) && (ms->second.lastOnlineDirty) && (ms->second.lastOnlineAddress)) { |
||||
nlohmann::json newrec, selector0, selector1, selectors, ip; |
||||
char tmp[1024], tmp2[128]; |
||||
OSUtils::ztsnprintf(tmp, sizeof(tmp), "com.zerotier.controller.lfdb:%s/network/%.16llx/online", controllerAddress, (unsigned long long)ns->first); |
||||
ms->second.lastOnlineAddress.toIpString(tmp2); |
||||
selector0["Name"] = tmp; |
||||
selector0["Ordinal"] = ms->first; |
||||
selector1["Name"] = tmp2; |
||||
selector1["Ordinal"] = 0; |
||||
selectors.push_back(selector0); |
||||
selectors.push_back(selector1); |
||||
newrec["Selectors"] = selectors; |
||||
const uint8_t* const rawip = (const uint8_t*)ms->second.lastOnlineAddress.rawIpData(); |
||||
switch (ms->second.lastOnlineAddress.ss_family) { |
||||
case AF_INET: |
||||
for (int j = 0; j < 4; ++j) |
||||
ip.push_back((unsigned int)rawip[j]); |
||||
break; |
||||
case AF_INET6: |
||||
for (int j = 0; j < 16; ++j) |
||||
ip.push_back((unsigned int)rawip[j]); |
||||
break; |
||||
default: |
||||
ip = tmp2; // should never happen since only IP transport is currently supported
|
||||
break; |
||||
} |
||||
newrec["Value"] = ip; |
||||
newrec["OwnerPrivate"] = _lfOwnerPrivate; |
||||
newrec["MaskingKey"] = maskingKey; |
||||
newrec["Timestamp"] = ms->second.lastOnlineTime; |
||||
newrec["PulseIfUnchanged"] = true; |
||||
try { |
||||
auto resp = htcli.Post("/makerecord", newrec.dump(), "application/json"); |
||||
if (resp) { |
||||
if (resp->status == 200) { |
||||
ms->second.lastOnlineDirty = false; |
||||
// printf("SET member online %.16llx %.10llx %s\n",ns->first,ms->first,resp->body.c_str());
|
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: %d from node (create/update member online status): %s" ZT_EOL_S, resp->status, resp->body.c_str()); |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: node is offline" ZT_EOL_S); |
||||
} |
||||
} |
||||
catch (std::exception& e) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (create/update member online status): %s" ZT_EOL_S, e.what()); |
||||
} |
||||
catch (...) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (create/update member online status): unknown exception" ZT_EOL_S); |
||||
} |
||||
} |
||||
|
||||
if (ms->second.dirty) { |
||||
nlohmann::json network, member; |
||||
if (get(ns->first, network, ms->first, member)) { |
||||
nlohmann::json newrec, selector0, selector1, selectors; |
||||
selector0["Name"] = networksSelectorName; |
||||
selector0["Ordinal"] = ns->first; |
||||
selector1["Name"] = "member"; |
||||
selector1["Ordinal"] = ms->first; |
||||
selectors.push_back(selector0); |
||||
selectors.push_back(selector1); |
||||
newrec["Selectors"] = selectors; |
||||
newrec["Value"] = member.dump(); |
||||
newrec["OwnerPrivate"] = _lfOwnerPrivate; |
||||
newrec["MaskingKey"] = maskingKey; |
||||
newrec["PulseIfUnchanged"] = true; |
||||
try { |
||||
auto resp = htcli.Post("/makerecord", newrec.dump(), "application/json"); |
||||
if (resp) { |
||||
if (resp->status == 200) { |
||||
ms->second.dirty = false; |
||||
// printf("SET member %.16llx %.10llx %s\n",ns->first,ms->first,resp->body.c_str());
|
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: %d from node (create/update member): %s" ZT_EOL_S, resp->status, resp->body.c_str()); |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: node is offline" ZT_EOL_S); |
||||
} |
||||
} |
||||
catch (std::exception& e) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (create/update member): %s" ZT_EOL_S, e.what()); |
||||
} |
||||
catch (...) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (create/update member): unknown exception" ZT_EOL_S); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
try { |
||||
std::ostringstream query; |
||||
query << "{" |
||||
"\"Ranges\":[{" |
||||
"\"Name\":\"" |
||||
<< networksSelectorName |
||||
<< "\"," |
||||
"\"Range\":[0,18446744073709551615]" |
||||
"}]," |
||||
"\"TimeRange\":[" |
||||
<< timeRangeStart |
||||
<< ",9223372036854775807]," |
||||
"\"MaskingKey\":\"" |
||||
<< maskingKey |
||||
<< "\"," |
||||
"\"Owners\":[\"" |
||||
<< _lfOwnerPublic |
||||
<< "\"]" |
||||
"}"; |
||||
auto resp = htcli.Post("/query", query.str(), "application/json"); |
||||
if (resp) { |
||||
if (resp->status == 200) { |
||||
nlohmann::json results(OSUtils::jsonParse(resp->body)); |
||||
if ((results.is_array()) && (! results.empty())) { |
||||
for (std::size_t ri = 0; ri < results.size(); ++ri) { |
||||
nlohmann::json& rset = results[ri]; |
||||
if ((rset.is_array()) && (! rset.empty())) { |
||||
nlohmann::json& result = rset[0]; |
||||
if (result.is_object()) { |
||||
nlohmann::json& record = result["Record"]; |
||||
if (record.is_object()) { |
||||
const std::string recordValue = result["Value"]; |
||||
// printf("GET network %s\n",recordValue.c_str());
|
||||
nlohmann::json network(OSUtils::jsonParse(recordValue)); |
||||
if (network.is_object()) { |
||||
const std::string idstr = network["id"]; |
||||
const uint64_t id = Utils::hexStrToU64(idstr.c_str()); |
||||
if ((id >> 24) == controllerAddressInt) { // sanity check
|
||||
|
||||
nlohmann::json oldNetwork; |
||||
if ((timeRangeStart > 0) && (get(id, oldNetwork))) { |
||||
const uint64_t revision = network["revision"]; |
||||
const uint64_t prevRevision = oldNetwork["revision"]; |
||||
if (prevRevision < revision) { |
||||
_networkChanged(oldNetwork, network, timeRangeStart > 0); |
||||
} |
||||
} |
||||
else { |
||||
nlohmann::json nullJson; |
||||
_networkChanged(nullJson, network, timeRangeStart > 0); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: %d from node (check for network updates): %s" ZT_EOL_S, resp->status, resp->body.c_str()); |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: node is offline" ZT_EOL_S); |
||||
} |
||||
} |
||||
catch (std::exception& e) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (check for network updates): %s" ZT_EOL_S, e.what()); |
||||
} |
||||
catch (...) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (check for network updates): unknown exception" ZT_EOL_S); |
||||
} |
||||
|
||||
try { |
||||
std::ostringstream query; |
||||
query << "{" |
||||
"\"Ranges\":[{" |
||||
"\"Name\":\"" |
||||
<< networksSelectorName |
||||
<< "\"," |
||||
"\"Range\":[0,18446744073709551615]" |
||||
"},{" |
||||
"\"Name\":\"member\"," |
||||
"\"Range\":[0,18446744073709551615]" |
||||
"}]," |
||||
"\"TimeRange\":[" |
||||
<< timeRangeStart |
||||
<< ",9223372036854775807]," |
||||
"\"MaskingKey\":\"" |
||||
<< maskingKey |
||||
<< "\"," |
||||
"\"Owners\":[\"" |
||||
<< _lfOwnerPublic |
||||
<< "\"]" |
||||
"}"; |
||||
auto resp = htcli.Post("/query", query.str(), "application/json"); |
||||
if (resp) { |
||||
if (resp->status == 200) { |
||||
nlohmann::json results(OSUtils::jsonParse(resp->body)); |
||||
if ((results.is_array()) && (! results.empty())) { |
||||
for (std::size_t ri = 0; ri < results.size(); ++ri) { |
||||
nlohmann::json& rset = results[ri]; |
||||
if ((rset.is_array()) && (! rset.empty())) { |
||||
nlohmann::json& result = rset[0]; |
||||
if (result.is_object()) { |
||||
nlohmann::json& record = result["Record"]; |
||||
if (record.is_object()) { |
||||
const std::string recordValue = result["Value"]; |
||||
// printf("GET member %s\n",recordValue.c_str());
|
||||
nlohmann::json member(OSUtils::jsonParse(recordValue)); |
||||
if (member.is_object()) { |
||||
const std::string nwidstr = member["nwid"]; |
||||
const std::string idstr = member["id"]; |
||||
const uint64_t nwid = Utils::hexStrToU64(nwidstr.c_str()); |
||||
const uint64_t id = Utils::hexStrToU64(idstr.c_str()); |
||||
if ((id) && ((nwid >> 24) == controllerAddressInt)) { // sanity check
|
||||
|
||||
nlohmann::json network, oldMember; |
||||
if ((timeRangeStart > 0) && (get(nwid, network, id, oldMember))) { |
||||
const uint64_t revision = member["revision"]; |
||||
const uint64_t prevRevision = oldMember["revision"]; |
||||
if (prevRevision < revision) |
||||
_memberChanged(oldMember, member, timeRangeStart > 0); |
||||
} |
||||
else if (hasNetwork(nwid)) { |
||||
nlohmann::json nullJson; |
||||
_memberChanged(nullJson, member, timeRangeStart > 0); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: %d from node (check for member updates): %s" ZT_EOL_S, resp->status, resp->body.c_str()); |
||||
} |
||||
} |
||||
else { |
||||
fprintf(stderr, "ERROR: LFDB: node is offline" ZT_EOL_S); |
||||
} |
||||
} |
||||
catch (std::exception& e) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (check for member updates): %s" ZT_EOL_S, e.what()); |
||||
} |
||||
catch (...) { |
||||
fprintf(stderr, "ERROR: LFDB: unexpected exception querying node (check for member updates): unknown exception" ZT_EOL_S); |
||||
} |
||||
|
||||
timeRangeStart = time(nullptr) - 120; // start next query 2m before now to avoid losing updates
|
||||
_ready.store(true); |
||||
|
||||
for (int k = 0; k < 4; ++k) { // 2s delay between queries for remotely modified networks or members
|
||||
if (! _running.load()) |
||||
return; |
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500)); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
|
||||
LFDB::~LFDB() |
||||
{ |
||||
_running.store(false); |
||||
_syncThread.join(); |
||||
} |
||||
|
||||
bool LFDB::waitForReady() |
||||
{ |
||||
while (! _ready.load()) { |
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500)); |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
bool LFDB::isReady() |
||||
{ |
||||
return (_ready.load()); |
||||
} |
||||
|
||||
bool LFDB::save(nlohmann::json& record, bool notifyListeners) |
||||
{ |
||||
bool modified = false; |
||||
const std::string objtype = record["objtype"]; |
||||
if (objtype == "network") { |
||||
const uint64_t nwid = OSUtils::jsonIntHex(record["id"], 0ULL); |
||||
if (nwid) { |
||||
nlohmann::json old; |
||||
get(nwid, old); |
||||
if ((! old.is_object()) || (! _compareRecords(old, record))) { |
||||
record["revision"] = OSUtils::jsonInt(record["revision"], 0ULL) + 1ULL; |
||||
_networkChanged(old, record, notifyListeners); |
||||
{ |
||||
std::lock_guard<std::mutex> l(_state_l); |
||||
_state[nwid].dirty = true; |
||||
} |
||||
modified = true; |
||||
} |
||||
} |
||||
} |
||||
else if (objtype == "member") { |
||||
const uint64_t nwid = OSUtils::jsonIntHex(record["nwid"], 0ULL); |
||||
const uint64_t id = OSUtils::jsonIntHex(record["id"], 0ULL); |
||||
if ((id) && (nwid)) { |
||||
nlohmann::json network, old; |
||||
get(nwid, network, id, old); |
||||
if ((! old.is_object()) || (! _compareRecords(old, record))) { |
||||
record["revision"] = OSUtils::jsonInt(record["revision"], 0ULL) + 1ULL; |
||||
_memberChanged(old, record, notifyListeners); |
||||
{ |
||||
std::lock_guard<std::mutex> l(_state_l); |
||||
_state[nwid].members[id].dirty = true; |
||||
} |
||||
modified = true; |
||||
} |
||||
} |
||||
} |
||||
return modified; |
||||
} |
||||
|
||||
void LFDB::eraseNetwork(const uint64_t networkId) |
||||
{ |
||||
// TODO
|
||||
} |
||||
|
||||
void LFDB::eraseMember(const uint64_t networkId, const uint64_t memberId) |
||||
{ |
||||
// TODO
|
||||
} |
||||
|
||||
void LFDB::nodeIsOnline(const uint64_t networkId, const uint64_t memberId, const InetAddress& physicalAddress, const char* osArch) |
||||
{ |
||||
std::lock_guard<std::mutex> l(_state_l); |
||||
auto nw = _state.find(networkId); |
||||
if (nw != _state.end()) { |
||||
auto m = nw->second.members.find(memberId); |
||||
if (m != nw->second.members.end()) { |
||||
m->second.lastOnlineTime = OSUtils::now(); |
||||
if (physicalAddress) |
||||
m->second.lastOnlineAddress = physicalAddress; |
||||
m->second.lastOnlineDirty = true; |
||||
} |
||||
} |
||||
} |
||||
|
||||
void LFDB::nodeIsOnline(const uint64_t networkId, const uint64_t memberId, const InetAddress& physicalAddress) |
||||
{ |
||||
this->nodeIsOnline(networkId, memberId, physicalAddress, "unknown/unknown"); |
||||
} |
||||
|
||||
} // namespace ZeroTier
|
||||
@ -1,85 +0,0 @@
|
||||
/*
|
||||
* Copyright (c)2019 ZeroTier, Inc. |
||||
* |
||||
* Use of this software is governed by the Business Source License included |
||||
* in the LICENSE.TXT file in the project's root directory. |
||||
* |
||||
* Change Date: 2026-01-01 |
||||
* |
||||
* On the date above, in accordance with the Business Source License, use |
||||
* of this software will be governed by version 2.0 of the Apache License. |
||||
*/ |
||||
/****/ |
||||
|
||||
#ifndef ZT_CONTROLLER_LFDB_HPP |
||||
#define ZT_CONTROLLER_LFDB_HPP |
||||
|
||||
#include "DB.hpp" |
||||
|
||||
#include <atomic> |
||||
#include <mutex> |
||||
#include <string> |
||||
#include <unordered_map> |
||||
|
||||
namespace ZeroTier { |
||||
|
||||
/**
|
||||
* DB implementation for controller that stores data in LF |
||||
*/ |
||||
class LFDB : public DB { |
||||
public: |
||||
/**
|
||||
* @param myId This controller's identity |
||||
* @param path Base path for ZeroTier node itself |
||||
* @param lfOwnerPrivate LF owner private in PEM format |
||||
* @param lfOwnerPublic LF owner public in @base62 format |
||||
* @param lfNodeHost LF node host |
||||
* @param lfNodePort LF node http (not https) port |
||||
* @param storeOnlineState If true, store online/offline state and IP info in LF (a lot of data, only for private networks!) |
||||
*/ |
||||
LFDB(const Identity& myId, const char* path, const char* lfOwnerPrivate, const char* lfOwnerPublic, const char* lfNodeHost, int lfNodePort, bool storeOnlineState); |
||||
virtual ~LFDB(); |
||||
|
||||
virtual bool waitForReady(); |
||||
virtual bool isReady(); |
||||
virtual bool save(nlohmann::json& record, bool notifyListeners); |
||||
virtual void eraseNetwork(const uint64_t networkId); |
||||
virtual void eraseMember(const uint64_t networkId, const uint64_t memberId); |
||||
virtual void nodeIsOnline(const uint64_t networkId, const uint64_t memberId, const InetAddress& physicalAddress); |
||||
virtual void nodeIsOnline(const uint64_t networkId, const uint64_t memberId, const InetAddress& physicalAddress, const char* osArch); |
||||
|
||||
protected: |
||||
const Identity _myId; |
||||
|
||||
std::string _lfOwnerPrivate, _lfOwnerPublic; |
||||
std::string _lfNodeHost; |
||||
int _lfNodePort; |
||||
|
||||
struct _MemberState { |
||||
_MemberState() : lastOnlineAddress(), lastOnlineTime(0), dirty(false), lastOnlineDirty(false) |
||||
{ |
||||
} |
||||
InetAddress lastOnlineAddress; |
||||
int64_t lastOnlineTime; |
||||
bool dirty; |
||||
bool lastOnlineDirty; |
||||
}; |
||||
struct _NetworkState { |
||||
_NetworkState() : members(), dirty(false) |
||||
{ |
||||
} |
||||
std::unordered_map<uint64_t, _MemberState> members; |
||||
bool dirty; |
||||
}; |
||||
std::unordered_map<uint64_t, _NetworkState> _state; |
||||
std::mutex _state_l; |
||||
|
||||
std::atomic_bool _running; |
||||
std::atomic_bool _ready; |
||||
std::thread _syncThread; |
||||
bool _storeOnlineState; |
||||
}; |
||||
|
||||
} // namespace ZeroTier
|
||||
|
||||
#endif |
||||
@ -0,0 +1,103 @@
|
||||
# ZeroTier SOURCE-AVAILABLE LICENSE |
||||
Version 1.0 |
||||
Copyright (c) 2025 ZeroTier, Inc. |
||||
|
||||
## DEFINITIONS |
||||
|
||||
"Software" means ZeroTier and all associated documentation, source code, object code, and any derivatives thereof. |
||||
|
||||
"Non-Commercial Use" means use of the Software solely for: |
||||
- Personal, non-commercial purposes, in a non-commercial environment |
||||
- Educational or academic research purposes (for students, not for organizational use) |
||||
- Evaluation purposes for a period not exceeding 30 days |
||||
|
||||
"Commercial Use" includes, but is not limited to: |
||||
- Any use of the Software by or for the benefit of a for-profit company |
||||
- Any use of the Software by or for the benefit of a government or military entity |
||||
- Any use of the Software by or for the benefit of a non-profit organization, or registered charity |
||||
- Use in a production, staging, or development environment for business purposes |
||||
|
||||
- Offering paid or unpaid services powered by the Software |
||||
- Incorporation of the Software into any paid or unpaid product, platform, distribution or service |
||||
|
||||
## LICENSE STRUCTURE |
||||
|
||||
This software distribution includes components governed by different license terms: |
||||
|
||||
- The "ZeroTier Agent" component is licensed under the Mozilla Public License 2.0 (MPL-2.0). See the LICENSE-MPL.txt file in project root for details. |
||||
- The "Controller" and other related components, located in the “nonfree” source directory, are licensed under this Source-Available License for Non-Commercial Use. Use of any of these components for Commercial Use requires a separate commercial license agreement with ZeroTier, Inc. |
||||
|
||||
## GRANT OF LICENSE |
||||
|
||||
### Non-Commercial License Grant |
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this Software, to use, copy, modify, and distribute the Software for Non-Commercial Use only, subject to the following conditions: |
||||
1. The above copyright notice and this license shall be included in all copies, modified versions and redistributions, in whole or in part of the Software. |
||||
2. The Software may not be used for Commercial Use without obtaining a separate commercial license. |
||||
3. Any modifications to the Software must be clearly noted in both the source code and documentation as such and must not be misrepresented as the original Software. |
||||
4. If you distribute the Software or any derivative works, you must retain all copyright, trademark, attribution notices, and this license text. |
||||
|
||||
### Commercial License Requirement |
||||
|
||||
ANY COMMERCIAL USE OF THIS SOFTWARE REQUIRES A SEPARATE COMMERCIAL LICENSE. |
||||
|
||||
To obtain a commercial license, please contact: |
||||
sales@zerotier.com |
||||
https://www.zerotier.com/ |
||||
|
||||
## RESTRICTIONS |
||||
You may NOT: |
||||
- Use the Software for Commercial Use without a commercial license |
||||
- Remove or alter any proprietary notices, copyright or trademark statements, headers, metadata, logos, branding or other identifying information in the Software |
||||
- Use the trademarks, service marks, trade names, logos, or other brand identifiers of the copyright holder in a manner likely to cause confusion about the source, sponsorship, or endorsement of the Software without prior written permission |
||||
- Imply endorsement by the copyright holder, directly or indirectly, without written permission |
||||
|
||||
## RESERVATION OF RIGHTS |
||||
|
||||
All rights not expressly granted herein are reserved by the copyright holder. No rights or licenses are granted by implication, estoppel, or otherwise. |
||||
|
||||
## NO PATENT LICENSE |
||||
|
||||
This License does not grant any rights under any patent owned or controlled by the copyright holder. To inquire about patent licensing, please contact: legal@zerotier.com |
||||
|
||||
## CONTRIBUTIONS |
||||
|
||||
If you contribute any code, bug fixes, or enhancements to the Software, you grant the copyright holder a perpetual, worldwide, royalty-free license to use, modify, reproduce, sublicense, and distribute such contributions for any purpose, including Commercial Use. |
||||
|
||||
## DISCLAIMER |
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||
|
||||
## COMPLIANCE AND VERIFICATION |
||||
|
||||
To ensure compliance with this License, you agree to provide, upon request, reasonable documentation demonstrating that your use of the Software qualifies as Non-Commercial Use. Failure to provide such documentation within 30 days may result in termination of this License. |
||||
|
||||
## TERMINATION |
||||
|
||||
This license automatically terminates if you: |
||||
- Use the Software for Commercial Use without obtaining a commercial license |
||||
- Fail to comply with any of the terms and conditions stated herein |
||||
- Initiate legal action against the copyright holder related to the Software |
||||
Upon termination, you must cease all use of the Software and destroy all copies in your possession. |
||||
|
||||
## GOVERNING LAW |
||||
This License shall be governed by the laws of California, USA, without regard to conflict of law principles. |
||||
|
||||
## ENFORCEMENT |
||||
|
||||
The copyright holder reserves the right to enforce this License through legal or equitable remedies, including injunctive relief, in the event of a violation of its terms. |
||||
|
||||
## ENTIRE AGREEMENT |
||||
This License constitutes the entire agreement between the parties concerning the use of the Software for Non-Commercial Use and supersedes all prior or contemporaneous agreements regarding such use. |
||||
|
||||
--- |
||||
## NOTICE TO USERS |
||||
|
||||
This Software is source-available, but it is not “open source” as defined by the Open Source Initiative. |
||||
|
||||
The "ZeroTier Agent" component is licensed under the Mozilla Public License 2.0 (MPL-2.0). |
||||
The "Controller" and related components, located in the “nonfree” source directory, are licensed under this Source-Available License. |
||||
|
||||
Commercial use, as defined above, requires a paid commercial license. |
||||
|
||||
For inquiries, please contact: |
||||
sales@zerotier.com |
||||
Or visit: https://www.zerotier.com/ |
||||
@ -1,23 +1,14 @@
|
||||
/*
|
||||
* Copyright (c)2019 ZeroTier, Inc. |
||||
* |
||||
* Use of this software is governed by the Business Source License included |
||||
* in the LICENSE.TXT file in the project's root directory. |
||||
* |
||||
* Change Date: 2026-01-01 |
||||
* |
||||
* On the date above, in accordance with the Business Source License, use |
||||
* of this software will be governed by version 2.0 of the Apache License. |
||||
/* (c) ZeroTier, Inc.
|
||||
* See LICENSE.txt in nonfree/ |
||||
*/ |
||||
/****/ |
||||
|
||||
#include "CV1.hpp" |
||||
|
||||
#ifdef ZT_CONTROLLER_USE_LIBPQ |
||||
|
||||
#include "../node/Constants.hpp" |
||||
#include "../node/SHA512.hpp" |
||||
#include "../version.h" |
||||
#include "../../node/Constants.hpp" |
||||
#include "../../node/SHA512.hpp" |
||||
#include "../../version.h" |
||||
#include "CtlUtil.hpp" |
||||
#include "EmbeddedNetworkController.hpp" |
||||
#include "Redis.hpp" |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue