diff options
author | Kees Bos <k.bos@capitar.com> | 2015-05-06 12:05:20 +0200 |
---|---|---|
committer | Kees Bos <k.bos@capitar.com> | 2015-05-06 12:05:20 +0200 |
commit | a425bbc67301bf486fe5b0aba8adb59ae791403e (patch) | |
tree | 460b6c5a5c2ed852903fac2a9703c6f06534f79f /root-topology | |
parent | 845955dea53035e8472059ff03feca9f47c0d5fa (diff) | |
download | infinitytier-a425bbc67301bf486fe5b0aba8adb59ae791403e.tar.gz infinitytier-a425bbc67301bf486fe5b0aba8adb59ae791403e.zip |
Renamed supernode to rootserver
Diffstat (limited to 'root-topology')
-rw-r--r-- | root-topology/README.md | 6 | ||||
-rw-r--r-- | root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.dict | 2 | ||||
-rw-r--r-- | root-topology/mktopology.cpp | 18 | ||||
-rw-r--r-- | root-topology/rootservers/7e19876aba (renamed from root-topology/supernodes/7e19876aba) | 0 | ||||
-rw-r--r-- | root-topology/rootservers/8841408a2e (renamed from root-topology/supernodes/8841408a2e) | 0 | ||||
-rw-r--r-- | root-topology/rootservers/8acf059fe3 (renamed from root-topology/supernodes/8acf059fe3) | 0 | ||||
-rw-r--r-- | root-topology/rootservers/9d219039f3 (renamed from root-topology/supernodes/9d219039f3) | 0 | ||||
-rw-r--r-- | root-topology/test/README.md | 2 | ||||
-rwxr-xr-x | root-topology/test/create-test-root-topology.sh | 12 |
9 files changed, 20 insertions, 20 deletions
diff --git a/root-topology/README.md b/root-topology/README.md index 2614d3d9..c9c3a908 100644 --- a/root-topology/README.md +++ b/root-topology/README.md @@ -2,9 +2,9 @@ This folder contains the source files to compile the signed network root topolog Keys in the root topology dictionary are: - * **supernodes**: contains another Dictionary mapping supernode address to supernode definition - * **##########**: supernode address, contains supernode definition - * **id**: supernode identity (public) in string-serialized format + * **rootservers**: contains another Dictionary mapping rootserver address to rootserver definition + * **##########**: rootserver address, contains rootserver definition + * **id**: rootserver identity (public) in string-serialized format * **udp**: comma-delimited list of ip/port UDP addresses of node * **tcp**: *DEPRECATED* comma-delimited list of ip/port TCP addresses of node * **desc**: human-readable description (optional) diff --git a/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.dict b/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.dict index 8aa828f0..94cac7d0 100644 --- a/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.dict +++ b/root-topology/ZT_DEFAULT_ROOT_TOPOLOGY.dict @@ -1,4 +1,4 @@ -supernodes=7e19876aba\=id\\\=7e19876aba:0:2a6e2b2318930f60eb097f70d0f4b028b2cd6d3d0c63c014b9039ff35390e41181f216fb2e6fa8d95c1ee9667156411905c3dccfea78d8c6dfafba688170b3fa\\nudp\\\=198.199.97.220/9993\\ntcp\\\=198.199.97.220/443\\ndesc\\\=San Francisco, California, USA\\ndns\\\=nyarlathotep.zerotier.com\\n\n8841408a2e\=id\\\=8841408a2e:0:bb1d31f2c323e264e9e64172c1a74f77899555ed10751cd56e86405cde118d02dffe555d462ccf6a85b5631c12350c8d5dc409ba10b9025d0f445cf449d92b1c\\nudp\\\=107.191.46.210/9993\\ntcp\\\=107.191.46.210/443\\ndesc\\\=Paris, France\\ndns\\\=shoggoth.zerotier.com\\n\n8acf059fe3\=id\\\=8acf059fe3:0:482f6ee5dfe902319b419de5bdc765209c0ecda38c4d6e4fcf0d33658398b4527dcd22f93112fb9befd02fd78bf7261b333fc105d192a623ca9e50fc60b374a5\\nudp\\\=162.243.77.111/9993\\ntcp\\\=162.243.77.111/443\\ndesc\\\=New York, New York, USA\\ndns\\\=cthulhu.zerotier.com\\n\n9d219039f3\=id\\\=9d219039f3:0:01f0922a98e3b34ebcbff333269dc265d7a020aab69d72be4d4acc9c8c9294785771256cd1d942a90d1bd1d2dca3ea84ef7d85afe6611fb43ff0b74126d90a6e\\nudp\\\=128.199.197.217/9993\\ntcp\\\=128.199.197.217/443\\ndesc\\\=Singapore\\ndns\\\=mi-go.zerotier.com\\n\n +rootservers=7e19876aba\=id\\\=7e19876aba:0:2a6e2b2318930f60eb097f70d0f4b028b2cd6d3d0c63c014b9039ff35390e41181f216fb2e6fa8d95c1ee9667156411905c3dccfea78d8c6dfafba688170b3fa\\nudp\\\=198.199.97.220/9993\\ntcp\\\=198.199.97.220/443\\ndesc\\\=San Francisco, California, USA\\ndns\\\=nyarlathotep.zerotier.com\\n\n8841408a2e\=id\\\=8841408a2e:0:bb1d31f2c323e264e9e64172c1a74f77899555ed10751cd56e86405cde118d02dffe555d462ccf6a85b5631c12350c8d5dc409ba10b9025d0f445cf449d92b1c\\nudp\\\=107.191.46.210/9993\\ntcp\\\=107.191.46.210/443\\ndesc\\\=Paris, France\\ndns\\\=shoggoth.zerotier.com\\n\n8acf059fe3\=id\\\=8acf059fe3:0:482f6ee5dfe902319b419de5bdc765209c0ecda38c4d6e4fcf0d33658398b4527dcd22f93112fb9befd02fd78bf7261b333fc105d192a623ca9e50fc60b374a5\\nudp\\\=162.243.77.111/9993\\ntcp\\\=162.243.77.111/443\\ndesc\\\=New York, New York, USA\\ndns\\\=cthulhu.zerotier.com\\n\n9d219039f3\=id\\\=9d219039f3:0:01f0922a98e3b34ebcbff333269dc265d7a020aab69d72be4d4acc9c8c9294785771256cd1d942a90d1bd1d2dca3ea84ef7d85afe6611fb43ff0b74126d90a6e\\nudp\\\=128.199.197.217/9993\\ntcp\\\=128.199.197.217/443\\ndesc\\\=Singapore\\ndns\\\=mi-go.zerotier.com\\n\n ~!ed25519=b7493f5a4b79a1dcc423fd25d2d8aa8d6293c490a12ceb6395417dd5868c17bfbcee685de58019d21f92576a78a45235d342efa2a00a544ded34766dd32d6f0e11809197f9baeedf4c6a0e8d2d657d280a579f2f2478b2f7c7a08089a5016b55 ~!sigid=77792b1c02:0:b5c361e8e9c2154e82c3e902fdfc337468b092a7c4d8dc685c37eb10ee4f3c17cc0bb1d024167e8cb0824d12263428373582da3d0a9a14b36e4546c317e811e6 ~!sigts=14ae42d0314 diff --git a/root-topology/mktopology.cpp b/root-topology/mktopology.cpp index 00ada7b7..f0ad5b55 100644 --- a/root-topology/mktopology.cpp +++ b/root-topology/mktopology.cpp @@ -30,21 +30,21 @@ int main(int argc,char **argv) if (OSUtils::readFile("template.dict",buf)) topology.fromString(buf); - // Read all entries in supernodes/ that correspond to supernode entry dictionaries - // and add them to topology under supernodes/ subkey. - Dictionary supernodes; - std::vector<std::string> supernodeDictionaries(OSUtils::listDirectory("supernodes")); - for(std::vector<std::string>::const_iterator sn(supernodeDictionaries.begin());sn!=supernodeDictionaries.end();++sn) { + // Read all entries in rootservers/ that correspond to rootserver entry dictionaries + // and add them to topology under rootservers/ subkey. + Dictionary rootservers; + std::vector<std::string> rootserverDictionaries(OSUtils::listDirectory("rootservers")); + for(std::vector<std::string>::const_iterator sn(rootserverDictionaries.begin());sn!=rootserverDictionaries.end();++sn) { if (sn->length() == 10) { buf.clear(); - if (!OSUtils::readFile((std::string("supernodes/")+(*sn)).c_str(),buf)) { - std::cerr << "Cannot read supernodes/" << *sn << std::endl; + if (!OSUtils::readFile((std::string("rootservers/")+(*sn)).c_str(),buf)) { + std::cerr << "Cannot read rootservers/" << *sn << std::endl; return 1; } - supernodes[*sn] = buf; + rootservers[*sn] = buf; } } - topology["supernodes"] = supernodes.toString(); + topology["rootservers"] = rootservers.toString(); if ((topologyAuthority)&&(topologyAuthority.hasPrivate())) { // Sign topology with root-topology-authority.secret diff --git a/root-topology/supernodes/7e19876aba b/root-topology/rootservers/7e19876aba index 23c2ad24..23c2ad24 100644 --- a/root-topology/supernodes/7e19876aba +++ b/root-topology/rootservers/7e19876aba diff --git a/root-topology/supernodes/8841408a2e b/root-topology/rootservers/8841408a2e index 09258f4e..09258f4e 100644 --- a/root-topology/supernodes/8841408a2e +++ b/root-topology/rootservers/8841408a2e diff --git a/root-topology/supernodes/8acf059fe3 b/root-topology/rootservers/8acf059fe3 index 438e67a3..438e67a3 100644 --- a/root-topology/supernodes/8acf059fe3 +++ b/root-topology/rootservers/8acf059fe3 diff --git a/root-topology/supernodes/9d219039f3 b/root-topology/rootservers/9d219039f3 index 1602f35e..1602f35e 100644 --- a/root-topology/supernodes/9d219039f3 +++ b/root-topology/rootservers/9d219039f3 diff --git a/root-topology/test/README.md b/root-topology/test/README.md index 332f8297..ae702243 100644 --- a/root-topology/test/README.md +++ b/root-topology/test/README.md @@ -1,6 +1,6 @@ Test Root Topology Script ====== -This builds a test-root-topology from any number of running test-supernode-# Docker containers. This can then be used with the (undocumented) -T (override root topology) option to run test networks under Docker. +This builds a test-root-topology from any number of running test-rootserver-# Docker containers. This can then be used with the (undocumented) -T (override root topology) option to run test networks under Docker. Once you have a local Docker test network running you can use iptables rules to simulate a variety of network pathologies, or you can just use it to test any new changes to the protocol or node behavior at some limited scale. diff --git a/root-topology/test/create-test-root-topology.sh b/root-topology/test/create-test-root-topology.sh index 86c0577c..cb628729 100755 --- a/root-topology/test/create-test-root-topology.sh +++ b/root-topology/test/create-test-root-topology.sh @@ -5,18 +5,18 @@ if [ ! -e ../mktopology ]; then exit 1 fi -echo 'Populating supernodes/* with all Docker test-supernode-* container IPs and identities...' +echo 'Populating rootservers/* with all Docker test-rootserver-* container IPs and identities...' -rm -rf supernodes -mkdir supernodes +rm -rf rootservers +mkdir rootservers -for cid in `docker ps -f 'name=test-supernode-*' -q`; do +for cid in `docker ps -f 'name=test-rootserver-*' -q`; do id=`docker exec $cid cat /var/lib/zerotier-one/identity.secret | cut -d : -f 1-3` ztaddr=`echo $id | cut -d : -f 1` ip=`docker exec $cid ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'` echo $cid $ztaddr $id $ip - echo "id=$id" >supernodes/$ztaddr - echo "udp=$ip/9993" >>supernodes/$ztaddr + echo "id=$id" >rootservers/$ztaddr + echo "udp=$ip/9993" >>rootservers/$ztaddr done echo 'Creating test-root-topology...' |