From dd58006d65fa5a3c3e921e35b398c3e2bde1314c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 7 Aug 2014 20:21:07 -0400 Subject: Rename topology/ to be more descriptive, and some more updates. --- .gitignore | 2 +- root-topology/Makefile | 17 +++++ root-topology/README.md | 7 ++ root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.c | 99 ++++++++++++++++++++++++++++ root-topology/bin2c.c | 57 ++++++++++++++++ root-topology/mktopology.cpp | 48 ++++++++++++++ root-topology/root-topology-authority.public | 1 + root-topology/supernodes/36f63d6574 | 5 ++ root-topology/supernodes/7e19876aba | 5 ++ root-topology/supernodes/8acf059fe3 | 5 ++ root-topology/supernodes/9d219039f3 | 5 ++ topology/Makefile | 14 ---- topology/README.md | 9 --- topology/ZT_DEFAULT_ROOT_TOPOLOGY.c | 99 ---------------------------- topology/bin2c.c | 57 ---------------- topology/mktopology.cpp | 54 --------------- topology/supernodes/36f63d6574 | 5 -- topology/supernodes/7e19876aba | 5 -- topology/supernodes/8acf059fe3 | 5 -- topology/supernodes/9d219039f3 | 5 -- topology/topology.public | 1 - 21 files changed, 250 insertions(+), 255 deletions(-) create mode 100644 root-topology/Makefile create mode 100644 root-topology/README.md create mode 100644 root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.c create mode 100644 root-topology/bin2c.c create mode 100644 root-topology/mktopology.cpp create mode 100644 root-topology/root-topology-authority.public create mode 100644 root-topology/supernodes/36f63d6574 create mode 100644 root-topology/supernodes/7e19876aba create mode 100644 root-topology/supernodes/8acf059fe3 create mode 100644 root-topology/supernodes/9d219039f3 delete mode 100644 topology/Makefile delete mode 100644 topology/README.md delete mode 100644 topology/ZT_DEFAULT_ROOT_TOPOLOGY.c delete mode 100644 topology/bin2c.c delete mode 100644 topology/mktopology.cpp delete mode 100644 topology/supernodes/36f63d6574 delete mode 100644 topology/supernodes/7e19876aba delete mode 100644 topology/supernodes/8acf059fe3 delete mode 100644 topology/supernodes/9d219039f3 delete mode 100644 topology/topology.public diff --git a/.gitignore b/.gitignore index a9fbc0b3..5bae233f 100755 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,4 @@ .qmake.stash *.autosave /ZeroTier One.dmg -/topology/topology.secret +/root-topology/*.secret diff --git a/root-topology/Makefile b/root-topology/Makefile new file mode 100644 index 00000000..4c256a50 --- /dev/null +++ b/root-topology/Makefile @@ -0,0 +1,17 @@ +all: FORCE + g++ -o mktopology mktopology.cpp ../node/Utils.cpp ../node/Identity.cpp ../node/C25519.cpp ../node/Salsa20.cpp ../node/Dictionary.cpp ../node/SHA512.cpp + gcc -o bin2c bin2c.c + +official: all + rm -f root_topology.out + ./mktopology >root_topology.out + ./bin2c ZT_DEFAULT_ROOT_TOPOLOGY < root_topology.out > ZT_DEFAULT_ROOT_TOPOLOGY.c + ls -l ZT_DEFAULT_ROOT_TOPOLOGY.c + +clean: + rm -f *.o mktopology bin2c root_topology.out + +realclean: clean + rm -f ZT_DEFAULT_ROOT_TOPOLOGY.c + +FORCE: diff --git a/root-topology/README.md b/root-topology/README.md new file mode 100644 index 00000000..04efc765 --- /dev/null +++ b/root-topology/README.md @@ -0,0 +1,7 @@ +This folder contains the source files to compile the signed network root topology dictionary. Users outside ZeroTier won't find this useful except for testing, since the root topology must be signed by the root topology authority (public identity in root-topology-authority.public) to be considered valid. + +ZT_DEFAULT_ROOT_TOPOLOGY.c contains the current default value, and this URL is periodically checked for updates: + +http://download.zerotier.com/sys/topology + +Obviously nothing prevents OSS users from replacing this topology with their own, changing the hard coded topology signing identity and update URL in Defaults, and signing their own dictionary. But doing so would yield a network that would have a tough(ish) time talking to the main one. Since the main network is a free service, why bother? (Except for building testnets, which ZeroTier already does for internal testing.) diff --git a/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.c b/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.c new file mode 100644 index 00000000..0d313120 --- /dev/null +++ b/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.c @@ -0,0 +1,99 @@ +static unsigned char ZT_DEFAULT_ROOT_TOPOLOGY[] = { + 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x3d, 0x33, 0x36, 0x66, 0x36, 0x33, + 0x64, 0x36, 0x35, 0x37, 0x34, 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, 0x5c, 0x3d, 0x33, 0x36, 0x66, + 0x36, 0x33, 0x64, 0x36, 0x35, 0x37, 0x34, 0x3a, 0x30, 0x3a, 0x36, 0x37, 0x61, 0x37, 0x37, 0x36, + 0x34, 0x38, 0x37, 0x61, 0x31, 0x61, 0x39, 0x39, 0x62, 0x33, 0x32, 0x66, 0x34, 0x31, 0x33, 0x33, + 0x32, 0x39, 0x66, 0x32, 0x62, 0x36, 0x37, 0x63, 0x34, 0x33, 0x66, 0x62, 0x66, 0x36, 0x31, 0x35, + 0x32, 0x65, 0x34, 0x32, 0x63, 0x36, 0x62, 0x36, 0x36, 0x65, 0x38, 0x39, 0x30, 0x34, 0x33, 0x65, + 0x36, 0x39, 0x64, 0x39, 0x33, 0x65, 0x34, 0x38, 0x33, 0x31, 0x34, 0x63, 0x37, 0x64, 0x37, 0x30, + 0x39, 0x62, 0x35, 0x38, 0x61, 0x38, 0x33, 0x30, 0x31, 0x36, 0x62, 0x64, 0x32, 0x36, 0x31, 0x32, + 0x64, 0x64, 0x38, 0x39, 0x34, 0x30, 0x30, 0x62, 0x38, 0x35, 0x36, 0x65, 0x31, 0x38, 0x63, 0x35, + 0x35, 0x33, 0x64, 0x61, 0x39, 0x34, 0x38, 0x39, 0x32, 0x66, 0x37, 0x64, 0x33, 0x63, 0x61, 0x31, + 0x36, 0x62, 0x66, 0x32, 0x63, 0x39, 0x32, 0x63, 0x32, 0x34, 0x5c, 0x5c, 0x6e, 0x75, 0x64, 0x70, + 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x32, 0x31, 0x31, 0x2e, 0x31, 0x32, 0x37, 0x2e, + 0x31, 0x37, 0x32, 0x2f, 0x39, 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, 0x63, 0x70, 0x5c, 0x5c, + 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x32, 0x31, 0x31, 0x2e, 0x31, 0x32, 0x37, 0x2e, 0x31, 0x37, + 0x32, 0x2f, 0x34, 0x34, 0x33, 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, 0x5c, 0x5c, 0x3d, + 0x41, 0x6d, 0x73, 0x74, 0x65, 0x72, 0x64, 0x61, 0x6d, 0x2c, 0x20, 0x4e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x5c, 0x5c, 0x6e, 0x64, 0x6e, 0x73, 0x5c, 0x5c, 0x5c, 0x3d, + 0x73, 0x68, 0x75, 0x62, 0x2d, 0x6e, 0x69, 0x67, 0x67, 0x75, 0x72, 0x61, 0x74, 0x68, 0x2e, 0x7a, + 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x5c, 0x5c, 0x6e, 0x5c, 0x6e, + 0x37, 0x65, 0x31, 0x39, 0x38, 0x37, 0x36, 0x61, 0x62, 0x61, 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, + 0x5c, 0x3d, 0x37, 0x65, 0x31, 0x39, 0x38, 0x37, 0x36, 0x61, 0x62, 0x61, 0x3a, 0x30, 0x3a, 0x32, + 0x61, 0x36, 0x65, 0x32, 0x62, 0x32, 0x33, 0x31, 0x38, 0x39, 0x33, 0x30, 0x66, 0x36, 0x30, 0x65, + 0x62, 0x30, 0x39, 0x37, 0x66, 0x37, 0x30, 0x64, 0x30, 0x66, 0x34, 0x62, 0x30, 0x32, 0x38, 0x62, + 0x32, 0x63, 0x64, 0x36, 0x64, 0x33, 0x64, 0x30, 0x63, 0x36, 0x33, 0x63, 0x30, 0x31, 0x34, 0x62, + 0x39, 0x30, 0x33, 0x39, 0x66, 0x66, 0x33, 0x35, 0x33, 0x39, 0x30, 0x65, 0x34, 0x31, 0x31, 0x38, + 0x31, 0x66, 0x32, 0x31, 0x36, 0x66, 0x62, 0x32, 0x65, 0x36, 0x66, 0x61, 0x38, 0x64, 0x39, 0x35, + 0x63, 0x31, 0x65, 0x65, 0x39, 0x36, 0x36, 0x37, 0x31, 0x35, 0x36, 0x34, 0x31, 0x31, 0x39, 0x30, + 0x35, 0x63, 0x33, 0x64, 0x63, 0x63, 0x66, 0x65, 0x61, 0x37, 0x38, 0x64, 0x38, 0x63, 0x36, 0x64, + 0x66, 0x61, 0x66, 0x62, 0x61, 0x36, 0x38, 0x38, 0x31, 0x37, 0x30, 0x62, 0x33, 0x66, 0x61, 0x5c, + 0x5c, 0x6e, 0x75, 0x64, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x31, 0x39, 0x39, + 0x2e, 0x39, 0x37, 0x2e, 0x32, 0x32, 0x30, 0x2f, 0x39, 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, + 0x63, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x31, 0x39, 0x39, 0x2e, 0x39, 0x37, + 0x2e, 0x32, 0x32, 0x30, 0x2f, 0x34, 0x34, 0x33, 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, + 0x5c, 0x5c, 0x3d, 0x53, 0x61, 0x6e, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x69, 0x73, 0x63, 0x6f, + 0x2c, 0x20, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61, 0x2c, 0x20, 0x55, 0x53, + 0x41, 0x5c, 0x5c, 0x6e, 0x64, 0x6e, 0x73, 0x5c, 0x5c, 0x5c, 0x3d, 0x6e, 0x79, 0x61, 0x72, 0x6c, + 0x61, 0x74, 0x68, 0x6f, 0x74, 0x65, 0x70, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, + 0x2e, 0x63, 0x6f, 0x6d, 0x5c, 0x5c, 0x6e, 0x5c, 0x6e, 0x38, 0x61, 0x63, 0x66, 0x30, 0x35, 0x39, + 0x66, 0x65, 0x33, 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, 0x5c, 0x3d, 0x38, 0x61, 0x63, 0x66, 0x30, + 0x35, 0x39, 0x66, 0x65, 0x33, 0x3a, 0x30, 0x3a, 0x34, 0x38, 0x32, 0x66, 0x36, 0x65, 0x65, 0x35, + 0x64, 0x66, 0x65, 0x39, 0x30, 0x32, 0x33, 0x31, 0x39, 0x62, 0x34, 0x31, 0x39, 0x64, 0x65, 0x35, + 0x62, 0x64, 0x63, 0x37, 0x36, 0x35, 0x32, 0x30, 0x39, 0x63, 0x30, 0x65, 0x63, 0x64, 0x61, 0x33, + 0x38, 0x63, 0x34, 0x64, 0x36, 0x65, 0x34, 0x66, 0x63, 0x66, 0x30, 0x64, 0x33, 0x33, 0x36, 0x35, + 0x38, 0x33, 0x39, 0x38, 0x62, 0x34, 0x35, 0x32, 0x37, 0x64, 0x63, 0x64, 0x32, 0x32, 0x66, 0x39, + 0x33, 0x31, 0x31, 0x32, 0x66, 0x62, 0x39, 0x62, 0x65, 0x66, 0x64, 0x30, 0x32, 0x66, 0x64, 0x37, + 0x38, 0x62, 0x66, 0x37, 0x32, 0x36, 0x31, 0x62, 0x33, 0x33, 0x33, 0x66, 0x63, 0x31, 0x30, 0x35, + 0x64, 0x31, 0x39, 0x32, 0x61, 0x36, 0x32, 0x33, 0x63, 0x61, 0x39, 0x65, 0x35, 0x30, 0x66, 0x63, + 0x36, 0x30, 0x62, 0x33, 0x37, 0x34, 0x61, 0x35, 0x5c, 0x5c, 0x6e, 0x75, 0x64, 0x70, 0x5c, 0x5c, + 0x5c, 0x3d, 0x31, 0x36, 0x32, 0x2e, 0x32, 0x34, 0x33, 0x2e, 0x37, 0x37, 0x2e, 0x31, 0x31, 0x31, + 0x2f, 0x39, 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, 0x63, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, + 0x36, 0x32, 0x2e, 0x32, 0x34, 0x33, 0x2e, 0x37, 0x37, 0x2e, 0x31, 0x31, 0x31, 0x2f, 0x34, 0x34, + 0x33, 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, 0x5c, 0x5c, 0x3d, 0x4e, 0x65, 0x77, 0x20, + 0x59, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x2c, 0x20, + 0x55, 0x53, 0x41, 0x5c, 0x5c, 0x6e, 0x64, 0x6e, 0x73, 0x5c, 0x5c, 0x5c, 0x3d, 0x63, 0x74, 0x68, + 0x75, 0x6c, 0x68, 0x75, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x63, 0x6f, + 0x6d, 0x5c, 0x5c, 0x6e, 0x5c, 0x6e, 0x39, 0x64, 0x32, 0x31, 0x39, 0x30, 0x33, 0x39, 0x66, 0x33, + 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, 0x5c, 0x3d, 0x39, 0x64, 0x32, 0x31, 0x39, 0x30, 0x33, 0x39, + 0x66, 0x33, 0x3a, 0x30, 0x3a, 0x30, 0x31, 0x66, 0x30, 0x39, 0x32, 0x32, 0x61, 0x39, 0x38, 0x65, + 0x33, 0x62, 0x33, 0x34, 0x65, 0x62, 0x63, 0x62, 0x66, 0x66, 0x33, 0x33, 0x33, 0x32, 0x36, 0x39, + 0x64, 0x63, 0x32, 0x36, 0x35, 0x64, 0x37, 0x61, 0x30, 0x32, 0x30, 0x61, 0x61, 0x62, 0x36, 0x39, + 0x64, 0x37, 0x32, 0x62, 0x65, 0x34, 0x64, 0x34, 0x61, 0x63, 0x63, 0x39, 0x63, 0x38, 0x63, 0x39, + 0x32, 0x39, 0x34, 0x37, 0x38, 0x35, 0x37, 0x37, 0x31, 0x32, 0x35, 0x36, 0x63, 0x64, 0x31, 0x64, + 0x39, 0x34, 0x32, 0x61, 0x39, 0x30, 0x64, 0x31, 0x62, 0x64, 0x31, 0x64, 0x32, 0x64, 0x63, 0x61, + 0x33, 0x65, 0x61, 0x38, 0x34, 0x65, 0x66, 0x37, 0x64, 0x38, 0x35, 0x61, 0x66, 0x65, 0x36, 0x36, + 0x31, 0x31, 0x66, 0x62, 0x34, 0x33, 0x66, 0x66, 0x30, 0x62, 0x37, 0x34, 0x31, 0x32, 0x36, 0x64, + 0x39, 0x30, 0x61, 0x36, 0x65, 0x5c, 0x5c, 0x6e, 0x75, 0x64, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, + 0x32, 0x38, 0x2e, 0x31, 0x39, 0x39, 0x2e, 0x31, 0x39, 0x37, 0x2e, 0x32, 0x31, 0x37, 0x2f, 0x39, + 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, 0x63, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x32, 0x38, + 0x2e, 0x31, 0x39, 0x39, 0x2e, 0x31, 0x39, 0x37, 0x2e, 0x32, 0x31, 0x37, 0x2f, 0x34, 0x34, 0x33, + 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, 0x5c, 0x5c, 0x3d, 0x53, 0x69, 0x6e, 0x67, 0x61, + 0x70, 0x6f, 0x72, 0x65, 0x5c, 0x5c, 0x6e, 0x68, 0x6e, 0x5c, 0x5c, 0x5c, 0x3d, 0x6d, 0x69, 0x2d, + 0x67, 0x6f, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x5c, + 0x5c, 0x6e, 0x5c, 0x6e, 0x0a, 0x7e, 0x21, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x3d, 0x64, + 0x37, 0x35, 0x32, 0x38, 0x30, 0x66, 0x30, 0x31, 0x39, 0x39, 0x32, 0x63, 0x32, 0x36, 0x38, 0x36, + 0x66, 0x38, 0x34, 0x31, 0x65, 0x64, 0x32, 0x62, 0x39, 0x37, 0x63, 0x62, 0x34, 0x38, 0x64, 0x63, + 0x64, 0x66, 0x35, 0x37, 0x35, 0x37, 0x64, 0x66, 0x31, 0x37, 0x37, 0x36, 0x34, 0x66, 0x33, 0x31, + 0x33, 0x37, 0x30, 0x64, 0x66, 0x63, 0x37, 0x36, 0x64, 0x30, 0x35, 0x63, 0x61, 0x31, 0x35, 0x32, + 0x39, 0x35, 0x62, 0x63, 0x33, 0x62, 0x62, 0x32, 0x64, 0x61, 0x64, 0x63, 0x63, 0x65, 0x63, 0x38, + 0x61, 0x63, 0x36, 0x30, 0x37, 0x61, 0x31, 0x64, 0x34, 0x35, 0x33, 0x38, 0x30, 0x39, 0x64, 0x38, + 0x62, 0x65, 0x62, 0x66, 0x38, 0x64, 0x31, 0x31, 0x63, 0x61, 0x30, 0x37, 0x63, 0x65, 0x66, 0x66, + 0x35, 0x64, 0x62, 0x66, 0x33, 0x31, 0x32, 0x30, 0x36, 0x64, 0x66, 0x38, 0x31, 0x30, 0x35, 0x64, + 0x63, 0x34, 0x39, 0x38, 0x32, 0x62, 0x65, 0x64, 0x30, 0x31, 0x30, 0x35, 0x37, 0x66, 0x63, 0x32, + 0x66, 0x65, 0x64, 0x64, 0x34, 0x39, 0x38, 0x64, 0x35, 0x64, 0x63, 0x61, 0x63, 0x30, 0x37, 0x34, + 0x62, 0x32, 0x65, 0x30, 0x36, 0x37, 0x30, 0x62, 0x66, 0x38, 0x33, 0x36, 0x37, 0x32, 0x39, 0x37, + 0x36, 0x30, 0x61, 0x39, 0x64, 0x33, 0x62, 0x37, 0x37, 0x64, 0x33, 0x61, 0x62, 0x63, 0x39, 0x0a, + 0x7e, 0x21, 0x73, 0x69, 0x67, 0x69, 0x64, 0x3d, 0x37, 0x37, 0x37, 0x39, 0x32, 0x62, 0x31, 0x63, + 0x30, 0x32, 0x3a, 0x30, 0x3a, 0x62, 0x35, 0x63, 0x33, 0x36, 0x31, 0x65, 0x38, 0x65, 0x39, 0x63, + 0x32, 0x31, 0x35, 0x34, 0x65, 0x38, 0x32, 0x63, 0x33, 0x65, 0x39, 0x30, 0x32, 0x66, 0x64, 0x66, + 0x63, 0x33, 0x33, 0x37, 0x34, 0x36, 0x38, 0x62, 0x30, 0x39, 0x32, 0x61, 0x37, 0x63, 0x34, 0x64, + 0x38, 0x64, 0x63, 0x36, 0x38, 0x35, 0x63, 0x33, 0x37, 0x65, 0x62, 0x31, 0x30, 0x65, 0x65, 0x34, + 0x66, 0x33, 0x63, 0x31, 0x37, 0x63, 0x63, 0x30, 0x62, 0x62, 0x31, 0x64, 0x30, 0x32, 0x34, 0x31, + 0x36, 0x37, 0x65, 0x38, 0x63, 0x62, 0x30, 0x38, 0x32, 0x34, 0x64, 0x31, 0x32, 0x32, 0x36, 0x33, + 0x34, 0x32, 0x38, 0x33, 0x37, 0x33, 0x35, 0x38, 0x32, 0x64, 0x61, 0x33, 0x64, 0x30, 0x61, 0x39, + 0x61, 0x31, 0x34, 0x62, 0x33, 0x36, 0x65, 0x34, 0x35, 0x34, 0x36, 0x63, 0x33, 0x31, 0x37, 0x65, + 0x38, 0x31, 0x31, 0x65, 0x36, 0x0a, 0x7e, 0x21, 0x73, 0x69, 0x67, 0x74, 0x73, 0x3d, 0x31, 0x34, + 0x37, 0x62, 0x32, 0x66, 0x62, 0x65, 0x66, 0x38, 0x35, 0x0a +}; +#define ZT_DEFAULT_ROOT_TOPOLOGY_LEN 1530 diff --git a/root-topology/bin2c.c b/root-topology/bin2c.c new file mode 100644 index 00000000..91ce7d14 --- /dev/null +++ b/root-topology/bin2c.c @@ -0,0 +1,57 @@ +/** + Converts input from stdin into an array of binary data for use in C. + + License: Public Domain + + Usage: app VariableName < input > output.c +*/ + +#include /* uintXX_t */ +#include /* PRIuXX macros */ +#include + +static char const * appName = 0; + +static void usage() +{ + printf("Usage: %s OBJECT_NAME < input > output.c\n\n", appName ); +} + +int main( int argc, char const ** argv ) +{ + appName = argv[0]; + if( (argc != 2) || (argv[1][0] == '-') ) + { + usage(); + return 1; + } + char const * varname = argv[1]; + enum { bufSize = 1024 * 8 }; + unsigned char buf[bufSize]; + size_t rd = 0; + size_t i = 0; + size_t flip = 0; + + printf( "static unsigned char %s[] = {\n\t", varname); + uint32_t size = 0; + while( 0 != (rd = fread( buf, 1, bufSize, stdin ) ) ) + { + size += rd; + for(i = 0; i < rd; ++i ) + { + printf( "0x%02x", buf[i] ); + if( !( (rd < bufSize) && (i == rd-1)) ) putchar(','); + if( 16 == ++flip ) + { + flip = 0; + printf("\n\t"); + } + else putchar(' '); + } + } + printf("\n};\n", varname ); + printf("#define %s_LEN %llu\n",varname,(unsigned long long)size); + //printf( "enum { %s_length = %"PRIu32"%s }; ", varname, size,"UL"); + //printf("enum { %s_length = sizeof(%s) };\n", varname, varname ); + return 0; +} diff --git a/root-topology/mktopology.cpp b/root-topology/mktopology.cpp new file mode 100644 index 00000000..516fd71b --- /dev/null +++ b/root-topology/mktopology.cpp @@ -0,0 +1,48 @@ +#include +#include +#include + +#include +#include +#include + +#include "../node/Utils.hpp" +#include "../node/Identity.hpp" +#include "../node/Dictionary.hpp" + +using namespace ZeroTier; + +int main(int argc,char **argv) +{ + std::string buf; + + if (!Utils::readFile("root-topology-authority.secret",buf)) { + std::cerr << "Cannot read root-topology-authority.secret" << std::endl; + return 1; + } + Identity topologyAuthority(buf); + + Dictionary topology; + + Dictionary supernodes; + std::map supernodeDictionaries(Utils::listDirectory("supernodes")); + for(std::map::iterator sn(supernodeDictionaries.begin());sn!=supernodeDictionaries.end();++sn) { + if ((sn->first.length() == 10)&&(!sn->second)) { + buf.clear(); + if (!Utils::readFile((std::string("supernodes/")+sn->first).c_str(),buf)) { + std::cerr << "Cannot read supernodes/" << sn->first << std::endl; + return 1; + } + supernodes[sn->first] = buf; + } + } + topology["supernodes"] = supernodes.toString(); + + if (!topology.sign(topologyAuthority)) { + std::cerr << "Unable to sign!" << std::endl; + return 1; + } + + std::cout << topology.toString(); + return 0; +} diff --git a/root-topology/root-topology-authority.public b/root-topology/root-topology-authority.public new file mode 100644 index 00000000..7897b616 --- /dev/null +++ b/root-topology/root-topology-authority.public @@ -0,0 +1 @@ +77792b1c02:0:b5c361e8e9c2154e82c3e902fdfc337468b092a7c4d8dc685c37eb10ee4f3c17cc0bb1d024167e8cb0824d12263428373582da3d0a9a14b36e4546c317e811e6 \ No newline at end of file diff --git a/root-topology/supernodes/36f63d6574 b/root-topology/supernodes/36f63d6574 new file mode 100644 index 00000000..b90ba8be --- /dev/null +++ b/root-topology/supernodes/36f63d6574 @@ -0,0 +1,5 @@ +id=36f63d6574:0:67a776487a1a99b32f413329f2b67c43fbf6152e42c6b66e89043e69d93e48314c7d709b58a83016bd2612dd89400b856e18c553da94892f7d3ca16bf2c92c24 +udp=198.211.127.172/9993 +tcp=198.211.127.172/443 +desc=Amsterdam, Netherlands +dns=shub-niggurath.zerotier.com diff --git a/root-topology/supernodes/7e19876aba b/root-topology/supernodes/7e19876aba new file mode 100644 index 00000000..23c2ad24 --- /dev/null +++ b/root-topology/supernodes/7e19876aba @@ -0,0 +1,5 @@ +id=7e19876aba:0:2a6e2b2318930f60eb097f70d0f4b028b2cd6d3d0c63c014b9039ff35390e41181f216fb2e6fa8d95c1ee9667156411905c3dccfea78d8c6dfafba688170b3fa +udp=198.199.97.220/9993 +tcp=198.199.97.220/443 +desc=San Francisco, California, USA +dns=nyarlathotep.zerotier.com diff --git a/root-topology/supernodes/8acf059fe3 b/root-topology/supernodes/8acf059fe3 new file mode 100644 index 00000000..438e67a3 --- /dev/null +++ b/root-topology/supernodes/8acf059fe3 @@ -0,0 +1,5 @@ +id=8acf059fe3:0:482f6ee5dfe902319b419de5bdc765209c0ecda38c4d6e4fcf0d33658398b4527dcd22f93112fb9befd02fd78bf7261b333fc105d192a623ca9e50fc60b374a5 +udp=162.243.77.111/9993 +tcp=162.243.77.111/443 +desc=New York, New York, USA +dns=cthulhu.zerotier.com diff --git a/root-topology/supernodes/9d219039f3 b/root-topology/supernodes/9d219039f3 new file mode 100644 index 00000000..5b21cf62 --- /dev/null +++ b/root-topology/supernodes/9d219039f3 @@ -0,0 +1,5 @@ +id=9d219039f3:0:01f0922a98e3b34ebcbff333269dc265d7a020aab69d72be4d4acc9c8c9294785771256cd1d942a90d1bd1d2dca3ea84ef7d85afe6611fb43ff0b74126d90a6e +udp=128.199.197.217/9993 +tcp=128.199.197.217/443 +desc=Singapore +hn=mi-go.zerotier.com diff --git a/topology/Makefile b/topology/Makefile deleted file mode 100644 index a78cc9ab..00000000 --- a/topology/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -all: FORCE - g++ -o mktopology mktopology.cpp ../node/Utils.cpp ../node/Identity.cpp ../node/C25519.cpp ../node/Salsa20.cpp ../node/Dictionary.cpp ../node/SHA512.cpp - gcc -o bin2c bin2c.c - -official: all - rm -f root_topology.out - ./mktopology >root_topology.out - ./bin2c ZT_DEFAULT_ROOT_TOPOLOGY < root_topology.out > ZT_DEFAULT_ROOT_TOPOLOGY.c - ls -l ZT_DEFAULT_ROOT_TOPOLOGY.c - -clean: - rm -f *.o mktopology bin2c root_topology.out - -FORCE: diff --git a/topology/README.md b/topology/README.md deleted file mode 100644 index 69ec3fc7..00000000 --- a/topology/README.md +++ /dev/null @@ -1,9 +0,0 @@ -This folder contains the source files to compile the signed network topology dictionary. Users outside ZeroTier won't find this useful except for documentation purposes, since this dictionary must be signed by a valid topology signing key to be considered valid. These keys are hard-coded into the source and distributed with all versions of the app. - -A default value for this dictionary is included in node/Defaults.cpp, and the following URL is periodically checked for updates: - -http://download.zerotier.com/sys/topology - -Obviously nothing prevents OSS users from replacing this topology with their own, changing the hard coded topology signing identity and update URL in Defaults, and signing their own dictionary. But doing so would yield a network that would have a tough(ish) time talking to the main one. Since the main network is a free service, why bother? (Except for building testnets, which ZeroTier already does for internal testing.) - -Increasing decentralization via federation or trust network is possible in the future though, provided it can be done without sacrificing stability, security, performance, or ease of use. diff --git a/topology/ZT_DEFAULT_ROOT_TOPOLOGY.c b/topology/ZT_DEFAULT_ROOT_TOPOLOGY.c deleted file mode 100644 index 905a419c..00000000 --- a/topology/ZT_DEFAULT_ROOT_TOPOLOGY.c +++ /dev/null @@ -1,99 +0,0 @@ -static unsigned char ZT_DEFAULT_ROOT_TOPOLOGY[] = { - 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x3d, 0x33, 0x36, 0x66, 0x36, 0x33, - 0x64, 0x36, 0x35, 0x37, 0x34, 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, 0x5c, 0x3d, 0x33, 0x36, 0x66, - 0x36, 0x33, 0x64, 0x36, 0x35, 0x37, 0x34, 0x3a, 0x30, 0x3a, 0x36, 0x37, 0x61, 0x37, 0x37, 0x36, - 0x34, 0x38, 0x37, 0x61, 0x31, 0x61, 0x39, 0x39, 0x62, 0x33, 0x32, 0x66, 0x34, 0x31, 0x33, 0x33, - 0x32, 0x39, 0x66, 0x32, 0x62, 0x36, 0x37, 0x63, 0x34, 0x33, 0x66, 0x62, 0x66, 0x36, 0x31, 0x35, - 0x32, 0x65, 0x34, 0x32, 0x63, 0x36, 0x62, 0x36, 0x36, 0x65, 0x38, 0x39, 0x30, 0x34, 0x33, 0x65, - 0x36, 0x39, 0x64, 0x39, 0x33, 0x65, 0x34, 0x38, 0x33, 0x31, 0x34, 0x63, 0x37, 0x64, 0x37, 0x30, - 0x39, 0x62, 0x35, 0x38, 0x61, 0x38, 0x33, 0x30, 0x31, 0x36, 0x62, 0x64, 0x32, 0x36, 0x31, 0x32, - 0x64, 0x64, 0x38, 0x39, 0x34, 0x30, 0x30, 0x62, 0x38, 0x35, 0x36, 0x65, 0x31, 0x38, 0x63, 0x35, - 0x35, 0x33, 0x64, 0x61, 0x39, 0x34, 0x38, 0x39, 0x32, 0x66, 0x37, 0x64, 0x33, 0x63, 0x61, 0x31, - 0x36, 0x62, 0x66, 0x32, 0x63, 0x39, 0x32, 0x63, 0x32, 0x34, 0x5c, 0x5c, 0x6e, 0x75, 0x64, 0x70, - 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x32, 0x31, 0x31, 0x2e, 0x31, 0x32, 0x37, 0x2e, - 0x31, 0x37, 0x32, 0x2f, 0x39, 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, 0x63, 0x70, 0x5c, 0x5c, - 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x32, 0x31, 0x31, 0x2e, 0x31, 0x32, 0x37, 0x2e, 0x31, 0x37, - 0x32, 0x2f, 0x34, 0x34, 0x33, 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, 0x5c, 0x5c, 0x3d, - 0x41, 0x6d, 0x73, 0x74, 0x65, 0x72, 0x64, 0x61, 0x6d, 0x2c, 0x20, 0x4e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x5c, 0x5c, 0x6e, 0x64, 0x6e, 0x73, 0x5c, 0x5c, 0x5c, 0x3d, - 0x73, 0x68, 0x75, 0x62, 0x2d, 0x6e, 0x69, 0x67, 0x67, 0x75, 0x72, 0x61, 0x74, 0x68, 0x2e, 0x7a, - 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x5c, 0x5c, 0x6e, 0x5c, 0x6e, - 0x37, 0x65, 0x31, 0x39, 0x38, 0x37, 0x36, 0x61, 0x62, 0x61, 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, - 0x5c, 0x3d, 0x37, 0x65, 0x31, 0x39, 0x38, 0x37, 0x36, 0x61, 0x62, 0x61, 0x3a, 0x30, 0x3a, 0x32, - 0x61, 0x36, 0x65, 0x32, 0x62, 0x32, 0x33, 0x31, 0x38, 0x39, 0x33, 0x30, 0x66, 0x36, 0x30, 0x65, - 0x62, 0x30, 0x39, 0x37, 0x66, 0x37, 0x30, 0x64, 0x30, 0x66, 0x34, 0x62, 0x30, 0x32, 0x38, 0x62, - 0x32, 0x63, 0x64, 0x36, 0x64, 0x33, 0x64, 0x30, 0x63, 0x36, 0x33, 0x63, 0x30, 0x31, 0x34, 0x62, - 0x39, 0x30, 0x33, 0x39, 0x66, 0x66, 0x33, 0x35, 0x33, 0x39, 0x30, 0x65, 0x34, 0x31, 0x31, 0x38, - 0x31, 0x66, 0x32, 0x31, 0x36, 0x66, 0x62, 0x32, 0x65, 0x36, 0x66, 0x61, 0x38, 0x64, 0x39, 0x35, - 0x63, 0x31, 0x65, 0x65, 0x39, 0x36, 0x36, 0x37, 0x31, 0x35, 0x36, 0x34, 0x31, 0x31, 0x39, 0x30, - 0x35, 0x63, 0x33, 0x64, 0x63, 0x63, 0x66, 0x65, 0x61, 0x37, 0x38, 0x64, 0x38, 0x63, 0x36, 0x64, - 0x66, 0x61, 0x66, 0x62, 0x61, 0x36, 0x38, 0x38, 0x31, 0x37, 0x30, 0x62, 0x33, 0x66, 0x61, 0x5c, - 0x5c, 0x6e, 0x75, 0x64, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x31, 0x39, 0x39, - 0x2e, 0x39, 0x37, 0x2e, 0x32, 0x32, 0x30, 0x2f, 0x39, 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, - 0x63, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x39, 0x38, 0x2e, 0x31, 0x39, 0x39, 0x2e, 0x39, 0x37, - 0x2e, 0x32, 0x32, 0x30, 0x2f, 0x34, 0x34, 0x33, 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, - 0x5c, 0x5c, 0x3d, 0x53, 0x61, 0x6e, 0x20, 0x46, 0x72, 0x61, 0x6e, 0x63, 0x69, 0x73, 0x63, 0x6f, - 0x2c, 0x20, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61, 0x2c, 0x20, 0x55, 0x53, - 0x41, 0x5c, 0x5c, 0x6e, 0x64, 0x6e, 0x73, 0x5c, 0x5c, 0x5c, 0x3d, 0x6e, 0x79, 0x61, 0x72, 0x6c, - 0x61, 0x74, 0x68, 0x6f, 0x74, 0x65, 0x70, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, - 0x2e, 0x63, 0x6f, 0x6d, 0x5c, 0x5c, 0x6e, 0x5c, 0x6e, 0x38, 0x61, 0x63, 0x66, 0x30, 0x35, 0x39, - 0x66, 0x65, 0x33, 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, 0x5c, 0x3d, 0x38, 0x61, 0x63, 0x66, 0x30, - 0x35, 0x39, 0x66, 0x65, 0x33, 0x3a, 0x30, 0x3a, 0x34, 0x38, 0x32, 0x66, 0x36, 0x65, 0x65, 0x35, - 0x64, 0x66, 0x65, 0x39, 0x30, 0x32, 0x33, 0x31, 0x39, 0x62, 0x34, 0x31, 0x39, 0x64, 0x65, 0x35, - 0x62, 0x64, 0x63, 0x37, 0x36, 0x35, 0x32, 0x30, 0x39, 0x63, 0x30, 0x65, 0x63, 0x64, 0x61, 0x33, - 0x38, 0x63, 0x34, 0x64, 0x36, 0x65, 0x34, 0x66, 0x63, 0x66, 0x30, 0x64, 0x33, 0x33, 0x36, 0x35, - 0x38, 0x33, 0x39, 0x38, 0x62, 0x34, 0x35, 0x32, 0x37, 0x64, 0x63, 0x64, 0x32, 0x32, 0x66, 0x39, - 0x33, 0x31, 0x31, 0x32, 0x66, 0x62, 0x39, 0x62, 0x65, 0x66, 0x64, 0x30, 0x32, 0x66, 0x64, 0x37, - 0x38, 0x62, 0x66, 0x37, 0x32, 0x36, 0x31, 0x62, 0x33, 0x33, 0x33, 0x66, 0x63, 0x31, 0x30, 0x35, - 0x64, 0x31, 0x39, 0x32, 0x61, 0x36, 0x32, 0x33, 0x63, 0x61, 0x39, 0x65, 0x35, 0x30, 0x66, 0x63, - 0x36, 0x30, 0x62, 0x33, 0x37, 0x34, 0x61, 0x35, 0x5c, 0x5c, 0x6e, 0x75, 0x64, 0x70, 0x5c, 0x5c, - 0x5c, 0x3d, 0x31, 0x36, 0x32, 0x2e, 0x32, 0x34, 0x33, 0x2e, 0x37, 0x37, 0x2e, 0x31, 0x31, 0x31, - 0x2f, 0x39, 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, 0x63, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, - 0x36, 0x32, 0x2e, 0x32, 0x34, 0x33, 0x2e, 0x37, 0x37, 0x2e, 0x31, 0x31, 0x31, 0x2f, 0x34, 0x34, - 0x33, 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, 0x5c, 0x5c, 0x3d, 0x4e, 0x65, 0x77, 0x20, - 0x59, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x2c, 0x20, - 0x55, 0x53, 0x41, 0x5c, 0x5c, 0x6e, 0x64, 0x6e, 0x73, 0x5c, 0x5c, 0x5c, 0x3d, 0x63, 0x74, 0x68, - 0x75, 0x6c, 0x68, 0x75, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x63, 0x6f, - 0x6d, 0x5c, 0x5c, 0x6e, 0x5c, 0x6e, 0x39, 0x64, 0x32, 0x31, 0x39, 0x30, 0x33, 0x39, 0x66, 0x33, - 0x5c, 0x3d, 0x69, 0x64, 0x5c, 0x5c, 0x5c, 0x3d, 0x39, 0x64, 0x32, 0x31, 0x39, 0x30, 0x33, 0x39, - 0x66, 0x33, 0x3a, 0x30, 0x3a, 0x30, 0x31, 0x66, 0x30, 0x39, 0x32, 0x32, 0x61, 0x39, 0x38, 0x65, - 0x33, 0x62, 0x33, 0x34, 0x65, 0x62, 0x63, 0x62, 0x66, 0x66, 0x33, 0x33, 0x33, 0x32, 0x36, 0x39, - 0x64, 0x63, 0x32, 0x36, 0x35, 0x64, 0x37, 0x61, 0x30, 0x32, 0x30, 0x61, 0x61, 0x62, 0x36, 0x39, - 0x64, 0x37, 0x32, 0x62, 0x65, 0x34, 0x64, 0x34, 0x61, 0x63, 0x63, 0x39, 0x63, 0x38, 0x63, 0x39, - 0x32, 0x39, 0x34, 0x37, 0x38, 0x35, 0x37, 0x37, 0x31, 0x32, 0x35, 0x36, 0x63, 0x64, 0x31, 0x64, - 0x39, 0x34, 0x32, 0x61, 0x39, 0x30, 0x64, 0x31, 0x62, 0x64, 0x31, 0x64, 0x32, 0x64, 0x63, 0x61, - 0x33, 0x65, 0x61, 0x38, 0x34, 0x65, 0x66, 0x37, 0x64, 0x38, 0x35, 0x61, 0x66, 0x65, 0x36, 0x36, - 0x31, 0x31, 0x66, 0x62, 0x34, 0x33, 0x66, 0x66, 0x30, 0x62, 0x37, 0x34, 0x31, 0x32, 0x36, 0x64, - 0x39, 0x30, 0x61, 0x36, 0x65, 0x5c, 0x5c, 0x6e, 0x75, 0x64, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, - 0x32, 0x38, 0x2e, 0x31, 0x39, 0x39, 0x2e, 0x31, 0x39, 0x37, 0x2e, 0x32, 0x31, 0x37, 0x2f, 0x39, - 0x39, 0x39, 0x33, 0x5c, 0x5c, 0x6e, 0x74, 0x63, 0x70, 0x5c, 0x5c, 0x5c, 0x3d, 0x31, 0x32, 0x38, - 0x2e, 0x31, 0x39, 0x39, 0x2e, 0x31, 0x39, 0x37, 0x2e, 0x32, 0x31, 0x37, 0x2f, 0x34, 0x34, 0x33, - 0x5c, 0x5c, 0x6e, 0x64, 0x65, 0x73, 0x63, 0x5c, 0x5c, 0x5c, 0x3d, 0x53, 0x69, 0x6e, 0x67, 0x61, - 0x70, 0x6f, 0x72, 0x65, 0x5c, 0x5c, 0x6e, 0x68, 0x6e, 0x5c, 0x5c, 0x5c, 0x3d, 0x6d, 0x69, 0x2d, - 0x67, 0x6f, 0x2e, 0x7a, 0x65, 0x72, 0x6f, 0x74, 0x69, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x5c, - 0x5c, 0x6e, 0x5c, 0x6e, 0x0a, 0x7e, 0x21, 0x65, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x3d, 0x64, - 0x37, 0x35, 0x32, 0x38, 0x30, 0x66, 0x30, 0x31, 0x39, 0x39, 0x32, 0x63, 0x32, 0x36, 0x38, 0x36, - 0x66, 0x38, 0x34, 0x31, 0x65, 0x64, 0x32, 0x62, 0x39, 0x37, 0x63, 0x62, 0x34, 0x38, 0x64, 0x63, - 0x64, 0x66, 0x35, 0x37, 0x35, 0x37, 0x64, 0x66, 0x31, 0x37, 0x37, 0x36, 0x34, 0x66, 0x33, 0x31, - 0x33, 0x37, 0x30, 0x64, 0x66, 0x63, 0x37, 0x36, 0x64, 0x30, 0x35, 0x63, 0x61, 0x31, 0x35, 0x32, - 0x39, 0x35, 0x62, 0x63, 0x33, 0x62, 0x62, 0x32, 0x64, 0x61, 0x64, 0x63, 0x63, 0x65, 0x63, 0x38, - 0x61, 0x63, 0x36, 0x30, 0x37, 0x61, 0x31, 0x64, 0x34, 0x35, 0x33, 0x38, 0x30, 0x39, 0x64, 0x38, - 0x62, 0x65, 0x62, 0x66, 0x38, 0x64, 0x31, 0x31, 0x63, 0x61, 0x30, 0x37, 0x63, 0x65, 0x66, 0x66, - 0x35, 0x64, 0x62, 0x66, 0x33, 0x31, 0x32, 0x30, 0x36, 0x64, 0x66, 0x38, 0x31, 0x30, 0x35, 0x64, - 0x63, 0x34, 0x39, 0x38, 0x32, 0x62, 0x65, 0x64, 0x30, 0x31, 0x30, 0x35, 0x37, 0x66, 0x63, 0x32, - 0x66, 0x65, 0x64, 0x64, 0x34, 0x39, 0x38, 0x64, 0x35, 0x64, 0x63, 0x61, 0x63, 0x30, 0x37, 0x34, - 0x62, 0x32, 0x65, 0x30, 0x36, 0x37, 0x30, 0x62, 0x66, 0x38, 0x33, 0x36, 0x37, 0x32, 0x39, 0x37, - 0x36, 0x30, 0x61, 0x39, 0x64, 0x33, 0x62, 0x37, 0x37, 0x64, 0x33, 0x61, 0x62, 0x63, 0x39, 0x0a, - 0x7e, 0x21, 0x73, 0x69, 0x67, 0x69, 0x64, 0x3d, 0x37, 0x37, 0x37, 0x39, 0x32, 0x62, 0x31, 0x63, - 0x30, 0x32, 0x3a, 0x30, 0x3a, 0x62, 0x35, 0x63, 0x33, 0x36, 0x31, 0x65, 0x38, 0x65, 0x39, 0x63, - 0x32, 0x31, 0x35, 0x34, 0x65, 0x38, 0x32, 0x63, 0x33, 0x65, 0x39, 0x30, 0x32, 0x66, 0x64, 0x66, - 0x63, 0x33, 0x33, 0x37, 0x34, 0x36, 0x38, 0x62, 0x30, 0x39, 0x32, 0x61, 0x37, 0x63, 0x34, 0x64, - 0x38, 0x64, 0x63, 0x36, 0x38, 0x35, 0x63, 0x33, 0x37, 0x65, 0x62, 0x31, 0x30, 0x65, 0x65, 0x34, - 0x66, 0x33, 0x63, 0x31, 0x37, 0x63, 0x63, 0x30, 0x62, 0x62, 0x31, 0x64, 0x30, 0x32, 0x34, 0x31, - 0x36, 0x37, 0x65, 0x38, 0x63, 0x62, 0x30, 0x38, 0x32, 0x34, 0x64, 0x31, 0x32, 0x32, 0x36, 0x33, - 0x34, 0x32, 0x38, 0x33, 0x37, 0x33, 0x35, 0x38, 0x32, 0x64, 0x61, 0x33, 0x64, 0x30, 0x61, 0x39, - 0x61, 0x31, 0x34, 0x62, 0x33, 0x36, 0x65, 0x34, 0x35, 0x34, 0x36, 0x63, 0x33, 0x31, 0x37, 0x65, - 0x38, 0x31, 0x31, 0x65, 0x36, 0x0a, 0x7e, 0x21, 0x73, 0x69, 0x67, 0x74, 0x73, 0x3d, 0x31, 0x34, - 0x37, 0x62, 0x32, 0x66, 0x37, 0x30, 0x34, 0x37, 0x34, 0x0a -}; -#define ZT_DEFAULT_ROOT_TOPOLOGY_LEN 1530 diff --git a/topology/bin2c.c b/topology/bin2c.c deleted file mode 100644 index 91ce7d14..00000000 --- a/topology/bin2c.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - Converts input from stdin into an array of binary data for use in C. - - License: Public Domain - - Usage: app VariableName < input > output.c -*/ - -#include /* uintXX_t */ -#include /* PRIuXX macros */ -#include - -static char const * appName = 0; - -static void usage() -{ - printf("Usage: %s OBJECT_NAME < input > output.c\n\n", appName ); -} - -int main( int argc, char const ** argv ) -{ - appName = argv[0]; - if( (argc != 2) || (argv[1][0] == '-') ) - { - usage(); - return 1; - } - char const * varname = argv[1]; - enum { bufSize = 1024 * 8 }; - unsigned char buf[bufSize]; - size_t rd = 0; - size_t i = 0; - size_t flip = 0; - - printf( "static unsigned char %s[] = {\n\t", varname); - uint32_t size = 0; - while( 0 != (rd = fread( buf, 1, bufSize, stdin ) ) ) - { - size += rd; - for(i = 0; i < rd; ++i ) - { - printf( "0x%02x", buf[i] ); - if( !( (rd < bufSize) && (i == rd-1)) ) putchar(','); - if( 16 == ++flip ) - { - flip = 0; - printf("\n\t"); - } - else putchar(' '); - } - } - printf("\n};\n", varname ); - printf("#define %s_LEN %llu\n",varname,(unsigned long long)size); - //printf( "enum { %s_length = %"PRIu32"%s }; ", varname, size,"UL"); - //printf("enum { %s_length = sizeof(%s) };\n", varname, varname ); - return 0; -} diff --git a/topology/mktopology.cpp b/topology/mktopology.cpp deleted file mode 100644 index b1d53683..00000000 --- a/topology/mktopology.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Makes topology dictionary out of source dictionary and signs with - * 'topology.secret', which must be present (or symlinked) from where - * this is run. */ - -/* Just type 'make' and then run (Only tested on Linux) */ - -#include -#include -#include - -#include -#include -#include - -#include "../node/Utils.hpp" -#include "../node/Identity.hpp" -#include "../node/Dictionary.hpp" - -using namespace ZeroTier; - -int main(int argc,char **argv) -{ - std::string buf; - - if (!Utils::readFile("topology.secret",buf)) { - std::cerr << "Cannot read topology.secret" << std::endl; - return 1; - } - Identity topologyAuthority(buf); - - Dictionary topology; - - Dictionary supernodes; - std::map supernodeDictionaries(Utils::listDirectory("supernodes")); - for(std::map::iterator sn(supernodeDictionaries.begin());sn!=supernodeDictionaries.end();++sn) { - if ((sn->first.length() == 10)&&(!sn->second)) { - buf.clear(); - if (!Utils::readFile((std::string("supernodes/")+sn->first).c_str(),buf)) { - std::cerr << "Cannot read supernodes/" << sn->first << std::endl; - return 1; - } - supernodes[sn->first] = buf; - } - } - topology["supernodes"] = supernodes.toString(); - - if (!topology.sign(topologyAuthority)) { - std::cerr << "Unable to sign!" << std::endl; - return 1; - } - - std::cout << topology.toString(); - return 0; -} diff --git a/topology/supernodes/36f63d6574 b/topology/supernodes/36f63d6574 deleted file mode 100644 index b90ba8be..00000000 --- a/topology/supernodes/36f63d6574 +++ /dev/null @@ -1,5 +0,0 @@ -id=36f63d6574:0:67a776487a1a99b32f413329f2b67c43fbf6152e42c6b66e89043e69d93e48314c7d709b58a83016bd2612dd89400b856e18c553da94892f7d3ca16bf2c92c24 -udp=198.211.127.172/9993 -tcp=198.211.127.172/443 -desc=Amsterdam, Netherlands -dns=shub-niggurath.zerotier.com diff --git a/topology/supernodes/7e19876aba b/topology/supernodes/7e19876aba deleted file mode 100644 index 23c2ad24..00000000 --- a/topology/supernodes/7e19876aba +++ /dev/null @@ -1,5 +0,0 @@ -id=7e19876aba:0:2a6e2b2318930f60eb097f70d0f4b028b2cd6d3d0c63c014b9039ff35390e41181f216fb2e6fa8d95c1ee9667156411905c3dccfea78d8c6dfafba688170b3fa -udp=198.199.97.220/9993 -tcp=198.199.97.220/443 -desc=San Francisco, California, USA -dns=nyarlathotep.zerotier.com diff --git a/topology/supernodes/8acf059fe3 b/topology/supernodes/8acf059fe3 deleted file mode 100644 index 438e67a3..00000000 --- a/topology/supernodes/8acf059fe3 +++ /dev/null @@ -1,5 +0,0 @@ -id=8acf059fe3:0:482f6ee5dfe902319b419de5bdc765209c0ecda38c4d6e4fcf0d33658398b4527dcd22f93112fb9befd02fd78bf7261b333fc105d192a623ca9e50fc60b374a5 -udp=162.243.77.111/9993 -tcp=162.243.77.111/443 -desc=New York, New York, USA -dns=cthulhu.zerotier.com diff --git a/topology/supernodes/9d219039f3 b/topology/supernodes/9d219039f3 deleted file mode 100644 index 5b21cf62..00000000 --- a/topology/supernodes/9d219039f3 +++ /dev/null @@ -1,5 +0,0 @@ -id=9d219039f3:0:01f0922a98e3b34ebcbff333269dc265d7a020aab69d72be4d4acc9c8c9294785771256cd1d942a90d1bd1d2dca3ea84ef7d85afe6611fb43ff0b74126d90a6e -udp=128.199.197.217/9993 -tcp=128.199.197.217/443 -desc=Singapore -hn=mi-go.zerotier.com diff --git a/topology/topology.public b/topology/topology.public deleted file mode 100644 index 7897b616..00000000 --- a/topology/topology.public +++ /dev/null @@ -1 +0,0 @@ -77792b1c02:0:b5c361e8e9c2154e82c3e902fdfc337468b092a7c4d8dc685c37eb10ee4f3c17cc0bb1d024167e8cb0824d12263428373582da3d0a9a14b36e4546c317e811e6 \ No newline at end of file -- cgit v1.2.3